Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Fix docstrings #398

Merged
merged 14 commits into from
Sep 19, 2022
Merged

Fix docstrings #398

merged 14 commits into from
Sep 19, 2022

Conversation

mike0sv
Copy link
Contributor

@mike0sv mike0sv commented Sep 9, 2022

Address docsting feedback from #363

@mike0sv mike0sv requested a review from jorgeorpinel September 9, 2022 01:30
@mike0sv mike0sv self-assigned this Sep 9, 2022
@mike0sv mike0sv requested a review from a team September 9, 2022 01:30
@mike0sv mike0sv temporarily deployed to internal September 9, 2022 01:30 Inactive
@mike0sv mike0sv temporarily deployed to internal September 9, 2022 03:07 Inactive
@mike0sv mike0sv temporarily deployed to internal September 12, 2022 17:21 Inactive
mlem/cli/apply.py Outdated Show resolved Hide resolved
mlem/cli/main.py Outdated
Comment on lines 511 to 515
help="Path to MLEM model object",
metavar=PATH_METAVAR,
)
option_data = Option(
..., "-d", "--data", help="Path to MLEM data object", metavar=PATH_METAVAR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearer 👍🏼 though maybe "model/data MLEM object" would be a better phrasing (keep "MLEM object" together). No strong opinion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aguschin wdyt?

Copy link
Contributor

@aguschin aguschin Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO MLEM model object is sounds better than model MLEM object.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it .mlem path or path to an actual directory / file that MLEM creates? MLEM model object ideally should be just "Path to model"

Copy link
Contributor

@jorgeorpinel jorgeorpinel Sep 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's the path to the .mlem file which is why I suggested (somewhere) to add (.mlem file) just to be extra clear. Or maybe indeed we should avoid "object" completely and just say "data .mlem file"/ ".mlem file for the data".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's a path to an actual model. E.g. if you have model.pkl and model.pkl.mlem nearby, the argument should be model.pkl (although it should work if one supplies model.pkl.mlem as well).

The thing is, if there is no model.pkl.mlem, MLEM won't understand what it is. So it should be MLEM object (== model.pkl.mlem should exist) for this to work, not just a binary saved with pickle/joblib or csv file saved with pandas.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What @aguschin said is correct, I just see it the other way around - you should specify path to .mlem file, but omitting .mlem suffix also works. But if somehow you have aaa.mlem that uses bbb.pkl file, you can't specify bbb.pkl - you can use aaa.mlem or aaa. But generally bbb.pkl == aaa, unless you tamper with mlem files manually.
As for what @shcheklein said: I added MLEM Object to imply that it only works with models saved by MLEM. We can omit it, but I think this will make it less clear. We can also do Path to MLEM model probably

Copy link
Contributor

@aguschin aguschin Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path to MLEM model and Path to MLEM dataset sounds good to me. More concise than Path to MLEM data object

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is merged but just FYI this is similar to dvc push (and other commands) which targets can be either tracked files/dirs or .dvc files. See e.g. https://dvc.org/doc/command-reference/push for ideas on good phrasing around this.

mlem/cli/declare.py Outdated Show resolved Hide resolved
@jorgeorpinel jorgeorpinel mentioned this pull request Sep 13, 2022
@mike0sv mike0sv temporarily deployed to internal September 13, 2022 10:36 Inactive
@mike0sv mike0sv temporarily deployed to internal September 13, 2022 10:43 Inactive
@mike0sv mike0sv temporarily deployed to internal September 13, 2022 10:44 Inactive
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Base: 86.91% // Head: 87.81% // Increases project coverage by +0.90% 🎉

Coverage data is based on head (b00960d) compared to base (33031e0).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@                Coverage Diff                @@
##           release/0.3.0     #398      +/-   ##
=================================================
+ Coverage          86.91%   87.81%   +0.90%     
=================================================
  Files                 92       92              
  Lines               7808     7821      +13     
=================================================
+ Hits                6786     6868      +82     
+ Misses              1022      953      -69     
Impacted Files Coverage Δ
mlem/cli/config.py 95.55% <ø> (ø)
mlem/cli/deployment.py 89.13% <ø> (ø)
mlem/cli/link.py 100.00% <ø> (ø)
mlem/cli/types.py 94.64% <ø> (ø)
mlem/contrib/docker/base.py 87.76% <ø> (ø)
mlem/contrib/dvc.py 60.29% <ø> (ø)
mlem/contrib/fastapi.py 95.38% <ø> (ø)
mlem/contrib/lightgbm.py 94.50% <ø> (ø)
mlem/contrib/numpy.py 98.34% <ø> (ø)
mlem/contrib/pip/base.py 100.00% <ø> (ø)
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

# Conflicts:
#	mlem/contrib/docker/base.py
#	mlem/contrib/heroku/meta.py
#	mlem/core/objects.py
@mike0sv mike0sv temporarily deployed to internal September 16, 2022 10:06 Inactive
@mike0sv mike0sv temporarily deployed to internal September 19, 2022 11:50 Inactive
@mike0sv mike0sv temporarily deployed to internal September 19, 2022 12:39 Inactive
@mike0sv mike0sv temporarily deployed to internal September 19, 2022 12:44 Inactive
@mike0sv mike0sv temporarily deployed to internal September 19, 2022 12:57 Inactive
@mike0sv mike0sv temporarily deployed to internal September 19, 2022 13:43 Inactive
@mike0sv mike0sv merged commit 28dd702 into release/0.3.0 Sep 19, 2022
@mike0sv mike0sv deleted the fix/0.3-docs-feedback branch September 19, 2022 14:59
@jorgeorpinel jorgeorpinel added the A: docs DEPRECATED Area: user documentation; See github.com/iterative/mlem.ai/labels/A%3A%20docs label Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: docs DEPRECATED Area: user documentation; See github.com/iterative/mlem.ai/labels/A%3A%20docs
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants