mlem
mlem copied to clipboard
CLI: too many `-c` arguments without enough detail about what's required
Examples from the docs:
$ mlem pack rf pip -c target=build/ -c package_name=example_mlem_get_started
$ mlem apply-remote http test_x.csv -c host="0.0.0.0" -c port=8080 --json
$ mlem create env heroku staging -c api_key=<you api key>
$ mlem create deployment heroku myservice -c app_name=example-mlem-get-started -c model=model -c env=staging
$ mlem apply-remote http test_x.csv -c host=http://my-mlem-service.herokuapp.com -c port=80 --json
It feels like -c
is being used as a catch-all and a way to avoid specifying the actual expected options for each command. It's not clear what each -c
option is doing (if anything), which ones are required, and what values are expected.
related to https://github.com/iterative/mlem/issues/214
We have mlem types
now, but we should try and add this to help
Where can we find a list of all possible config options per command? I was pointed to https://github.com/iterative/mlem/blob/main/tests/contrib/test_heroku.py before but it's unclear what the config options are in there.
@mike0sv, could you please answer the Jorge's question?
you can run mlem types env heroku
and it will print all available options for it
in general, mlem types <object type> <implementation name>
The reason to use -c
instead of --<option name>
is because different implementations have different set of options. and adding options dynamically will probably require a lot of our cli framework butchering. we might do it later
From documentation point of view, we need a dedicated page for each implementation (not only target envs, but other base classes too). It's huge amount of work but it needs to be done at some point
dedicated page for each implementation (not only target envs, but other base classes too)
Agree: https://github.com/iterative/mlem.ai/issues/143
Documenting all existing config options may also help us design a more segmented config CLI later (for this issue).
For the record, @mike0sv is testing a way to show all of these -c
args in command's help in #363
closed by #363 🎸