Scikit-learn
human-activity-recognition
wearable
wrist
time-series
cpu
scikit-learn
File size: 1,154 Bytes
4731b11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""``wisp`` command line: the 0.2.0 commands plus ``wisp recipes``.

``wisp list``, ``inventory``, ``predict``, ``evaluate``, ``family-fit``, ``select-fit`` and
``search`` are the 0.2.0 commands of ``wisp_release.cli`` (unchanged). ``wisp recipes``
prints the recipe catalog as JSON lines.
"""
from __future__ import annotations

import json
import sys


def _recipes(argv):
    import argparse
    from wisp import recipes
    parser = argparse.ArgumentParser(prog="wisp recipes", description="Print the recipe catalog")
    parser.add_argument("--source", choices=("fixed", "cis_subset", "search_best"))
    args = parser.parse_args(argv)
    for rid, recipe in recipes._catalog().items():
        if args.source is None or recipe.source == args.source:
            print(json.dumps(recipe.describe(), sort_keys=True))
    return 0


def main(argv: list[str] | None = None) -> int:
    argv = list(sys.argv[1:] if argv is None else argv)
    if argv and argv[0] == "recipes":
        return _recipes(argv[1:])
    from wisp_release.cli import main as release_main
    return release_main(argv)


if __name__ == "__main__":
    raise SystemExit(main())