Hydrospheredata / hydro-serving

MLOps Platform
http://docs.hydrosphere.io
Apache License 2.0
271 stars 42 forks source link

hydro serving cli breaks in `hs profile status` #294

Closed BeardedWhale closed 3 years ago

BeardedWhale commented 5 years ago

Feature: Add description to hs profile

Add description to CLI how I should format my model name and version when I run hs profile status MODEL_VERSION and fix value error when parsing model name.

1. Not enough info on format of model name

$ hs profile status --help
Usage: hs profile status [OPTIONS] MODEL_VERSION

Options:
  --help  Show this message and exit.

2. model name without version causes runtime error:

$  hs profile status face_recognition

Traceback (most recent call last):
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/bin/hs", line 10, in <module>
    sys.exit(hs_cli())
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/Users/elizavetabatanina/hydra/hydro-serving-example/venv/lib/python3.7/site-packages/hydroserving/cli/commands/profile.py", line 54, in status
    model, version = model_version.split(":")
ValueError: not enough values to unpack (expected 2, got 1)

From this I can conclude that MODEL_VERSION actually stands for MODEL_NAME:VERSION:

$  hs profile status face_recognition:30
Looking for profiling status for model id=319 name=face_recognition version=30
Data profiling status: DataProfileStatus.NotRegistered
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.