Skip to content
Snippets Groups Projects
Commit 0e34318e authored by François  LAURENT's avatar François LAURENT
Browse files

--help argument to tagging-backend

parent d2bec3fc
No related branches found
No related tags found
No related merge requests found
...@@ -177,8 +177,10 @@ class Labels: ...@@ -177,8 +177,10 @@ class Labels:
elif len(key) == 3: elif len(key) == 3:
run, larva, timestamp = key run, larva, timestamp = key
self.set_timestep(run, larva, timestamp, value) self.set_timestep(run, larva, timestamp, value)
elif len(key) < 1:
raise IndexError("too few dimensions")
else: else:
raise IndexError("too few of many dimensions") raise IndexError("too many dimensions")
else: else:
run = key run = key
self.set_run(run, value) self.set_run(run, value)
......
...@@ -14,6 +14,7 @@ Usage: tagging-backend [train|predict] --model-instance <name> ...@@ -14,6 +14,7 @@ Usage: tagging-backend [train|predict] --model-instance <name>
tagging-backend train ... --skip-make-dataset --skip-build-features tagging-backend train ... --skip-make-dataset --skip-build-features
tagging-backend predict ... --make-dataset --build-features tagging-backend predict ... --make-dataset --build-features
tagging-backend predict ... --sandbox <token> tagging-backend predict ... --sandbox <token>
tagging-backend --help
`tagging-backend` typically is run using `poetry run`. `tagging-backend` typically is run using `poetry run`.
A name must be provided to identify the trained model and its location within A name must be provided to identify the trained model and its location within
...@@ -83,9 +84,9 @@ def main(fun=None): ...@@ -83,9 +84,9 @@ def main(fun=None):
format="%(levelname)s:%(name)s: %(message)s") format="%(levelname)s:%(name)s: %(message)s")
if fun is None: if fun is None:
# called by scripts/tagging-backend # called by scripts/tagging-backend
if not sys.argv[1:]: if not sys.argv[1:] or any(arg == '--help' for arg in sys.argv):
help(True) help(True)
sys.exit("too few input arguments; subcommand expected: 'train' or 'predict'") #sys.exit("too few input arguments; subcommand expected: 'train' or 'predict'")
return return
train_or_predict = sys.argv[1] train_or_predict = sys.argv[1]
project_dir = model_instance = None project_dir = model_instance = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment