mlem
mlem copied to clipboard
Add -c help WIP
I was investigating how we can add help to -c
options. I was able to do this (but in a bit nasty way)
You can check it out with mlem declare2 env docker --help
. Should work with other mlem declare2
commands.
I didnt add field types, defaults and support for complex/nested objects yet
cc @aguschin @jorgeorpinel @omesser
close https://github.com/iterative/mlem/issues/214 close https://github.com/iterative/mlem/issues/233
I guess this is related to https://github.com/iterative/mlem/issues/233 ? If so cc @dberenbaum
I'm not sure I'm getting this mlem declare2 syntax TBH. Maybe a bit more explanation or quick demo in the PR description?
Some examples:
mlem declare --help
mlem declare env --help
mlem declare env docker --help
Now it looks like this
Made less dirty and added for other commands
This breaks backward compatibility for some of them because of rearranged arguments (mlem serve model type
-> mlem serve type model
)
Also we'll need to fill all docstrings for classes and their fields
Also iterative/mlem#351 is still an issue as well as this: some models has __root__
field and we need to handle this
Just a comment: I see --conf
was left there. Now we can remove it, I suppose?
Left it for 1) backward compatibility 2) not sure all field names can be safely translated into option names
Codecov Report
:exclamation: No coverage uploaded for pull request base (
release/0.3.0@5cef637
). Click here to learn what that means. Patch has no changes to coverable lines.
Additional details and impacted files
@@ Coverage Diff @@
## release/0.3.0 #363 +/- ##
================================================
Coverage ? 90.59%
================================================
Files ? 82
Lines ? 6856
Branches ? 0
================================================
Hits ? 6211
Misses ? 645
Partials ? 0
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Don't you think it will confuse users to have two places to specify those?
Left it for 1) backward compatibility
I won't worry much about backward compatibility since we're breaking it anyway.
not sure all field names can be safely translated into option names
Should we write tests for it? To make sure all options are translated properly (didn't check if you did that already).
I've installed this and checked it out. At the first glance, looks good. Great job, @mike0sv! I'll try it out more thoroughly tomorrow.
@jorgeorpinel, @dberenbaum, I invited you to MLEM Demo this week, @mike0sv will showcase this there. We'll have a record in case you won't be available, but waiting on your feedback here as well.
also closes iterative/mlem#351
@jorgeorpinel we kinda need to merge this to unblock other PRs, I will address your feedback in a separate PR though
need to merge this to unblock other PRs
Sure! Didn't mean to block. I noticed the PR was approved but sometimes there's still other feedback that can def. wait or be rejected. Up to you!