-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove 'model_' from ML doc field names #924
Conversation
…tected 'model_' namespace
@munrojm, per our discussion |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #924 +/- ##
==========================================
- Coverage 90.54% 88.87% -1.68%
==========================================
Files 139 109 -30
Lines 13203 10048 -3155
==========================================
- Hits 11955 8930 -3025
+ Misses 1248 1118 -130 ☔ View full report in Codecov by Sentry. |
@@ -55,8 +55,8 @@ def __init__( | |||
model_name = {"chgnetcalculator": "chgnet"}.get(model_name, model_name) | |||
pkg_name = {"m3gnet": "matgl"}.get(model_name, model_name) | |||
self.provenance = dict( | |||
model_name=model_name, | |||
model_version=version(pkg_name), | |||
name=model_name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is just model
ok? clearer what it refers to than name
imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me! Changing to model
also doesn't result in any runtime warnings, so should be all good.
The fields
model_name
andmodel_version
in the MLDoc clash with the protected namespacemodel_
that exists in Pydantic 2. See here, where the warning arises to prevent collisions withBaseModel
s methods.Proposed fix is to change
model_name
andmodel_version
to justname
andmodel