mlem icon indicating copy to clipboard operation
mlem copied to clipboard

CLI: too many `-c` arguments without enough detail about what's required

Open dberenbaum opened this issue 2 years ago • 7 comments

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.

dberenbaum avatar May 06 '22 18:05 dberenbaum

related to https://github.com/iterative/mlem/issues/214

aguschin avatar May 07 '22 11:05 aguschin

We have mlem types now, but we should try and add this to help

mike0sv avatar Jun 01 '22 13:06 mike0sv

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.

jorgeorpinel avatar Jul 19 '22 21:07 jorgeorpinel

@mike0sv, could you please answer the Jorge's question?

aguschin avatar Jul 20 '22 07:07 aguschin

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

mike0sv avatar Jul 20 '22 23:07 mike0sv

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).

jorgeorpinel avatar Jul 23 '22 19:07 jorgeorpinel

For the record, @mike0sv is testing a way to show all of these -c args in command's help in #363

aguschin avatar Aug 02 '22 04:08 aguschin

closed by #363 🎸

aguschin avatar Oct 07 '22 17:10 aguschin