-
Notifications
You must be signed in to change notification settings - Fork 4
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
Model names #196
Model names #196
Conversation
fix names 2 cleanup fix getting torch model names fix model name retrieval for non-pipelines
Coverage reportClick to see where and how coverage changed
The report is truncated to 25 files out of 29. To see the full report, please visit the workflow summary page. This report was generated by python-coverage-comment-action |
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.
LGTM.
Have one suggestion for NeuralNetTorch
model names.
Also, do you think it would be useful to have a getter function / attribute for all emulators that return the model name? e.g.
> model = NeuralNetTorch(module='mlp')
> model.model_name
NNMLP
> model = RandomForest()
> model.model_name
RandomForest
autoemulate/emulators/__init__.py
Outdated
"SupportVectorMachines": SupportVectorMachines(), | ||
"XGBoost": XGBoost(), | ||
"NeuralNet": NeuralNetTorch(module="mlp"), |
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.
Should we have a prefix of NN
followed by <module name>
for all NeuralNetTorch
model?
e.g.
"NNMLP": NeuralNetTorch(module="mlp")
"NNRBF": NeuralNetTorch(module="rbf")
so that
- users can immediately tell they belongs to
NeuralNetTorch
- they will be close to each other when we sort all the model names alphabetically for printing.
- in
pytest
, we can test every model that has prefixNN
instead of hard-coding their names in our test cases.
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.
I like this suggestion - what do you think @mastoffel?
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.
both good suggestions! I'm on it.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #196 +/- ##
==========================================
+ Coverage 88.09% 90.31% +2.21%
==========================================
Files 44 44
Lines 2083 2085 +2
==========================================
+ Hits 1835 1883 +48
+ Misses 248 202 -46 ☔ View full report in Codecov by Sentry. |
This would be easy to implement through accessing @property
def model_name(self):
return self.__class__.__name__ ...at least I think...? |
|
Sounds like a good solution to me! |
Ok, implemented both of @bryanlimy's suggestions.
|
Maybe would be good if you could quickly have an eye on this too @bryanlimy ! Lots of changes here, but I think it's mostly fine. |
LGTM! |
self.models
todict
withmodel_names : model
get_model_name()
to get model name from that dictresolves #175 and #190