-
Notifications
You must be signed in to change notification settings - Fork 976
Improved parameter validation for TorchForecastingModel
#2908
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
Improved parameter validation for TorchForecastingModel
#2908
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2908 +/- ##
==========================================
- Coverage 95.52% 95.45% -0.07%
==========================================
Files 146 146
Lines 15703 15710 +7
==========================================
- Hits 15000 14996 -4
- Misses 703 714 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Do you want me to add a test for this? I can use the example from the original issue for it |
dennisbader
left a comment
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.
Hi @tRosenflanz and thanks a lot for the PR 🚀
Yes, a unit test would be great :) Could you also:
- try to improve the code coverage with the new tests (from the
codecovcomment above). - add an entry to
CHANGELOG.mddescribing your change
|
Can I rework the Also I will remove that uncovered Try/except block - it only comes into play with very exotic cases that should probably be forbidden anyway like using double inheritance with C implemented types like |
|
Hi @tRosenflanz, removing the try / except sounds good. Probably better to let it fail then continue silently and we won't know what went wrong. I would prefer a new test. You can pretty much copy-paste the |
…hub.com/tRosenflanz/darts into improvement/better_parameter_validation
dennisbader
left a comment
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.
Perfect, thanks a lot @tRosenflanz, this really simplifies subclassing from TFM 🚀
I pushed a minor change to also test that passing the positional arguments works.
Fixes #2843
Summary
Simple improvement to consider parameters of the full class inheritance of the checked class instead of specific classes for
TorchForecastingModel