-
Notifications
You must be signed in to change notification settings - Fork 874
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
support wrapped models in grid search #2133
base: master
Are you sure you want to change the base?
support wrapped models in grid search #2133
Conversation
Interesting the test In the master branch i get the same error, so i think something with |
Hi @andresliszt, the failing unit tests come from PyTorch Lightning version 2.1.3. For now I'll make a PR to set an an upper cap on pytorch_lightning<=2.1.2, and will relax it once they release the new version. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2133 +/- ##
==========================================
+ Coverage 93.77% 93.91% +0.14%
==========================================
Files 138 135 -3
Lines 14647 13397 -1250
==========================================
- Hits 13735 12582 -1153
+ Misses 912 815 -97 ☔ View full report in Codecov by Sentry. |
Hello!, thanks for this amazing project. I am experiencing the same issue as the one mentioned in here . This pull request aims to add a way to include the arguments of the wrapped model in the grid, instead of just passing a list of instances of the wrapped model to the grid constructor
Fixes #2104 .
Summary
When the
model
key is found in theparameters
dictionary passed to thegridsearch
classmethod (meaning we are in the context of a model that wraps another), the class method expects either a list of wrapped model instances , or it expects a dictionary with a special key calledmodel_class
whose value is the class of the model to be wrapped. The other keys in the dictionary are the parameters that will be used to construct the grid dedicated to the wrapped model. Example