-
Notifications
You must be signed in to change notification settings - Fork 620
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
[MNT] isolate matplotlib
as soft dependency
#1636
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1636 +/- ##
==========================================
- Coverage 90.19% 90.10% -0.10%
==========================================
Files 32 32
Lines 4734 4768 +34
==========================================
+ Hits 4270 4296 +26
- Misses 464 472 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Isolates
matplotlib
as soft dependency in a new soft dep setall_extras
. #1616The imports happen in
plot_sth
methods throughout the code base, some attached to classes, some not.This allows to use
pytorch-forecasting
without plotting or graphical logging, or use a different plotting backend manually.Isolation strategy:
matplotlib
raises an exceptionmatplotlib
is additional or part of the logic, absence ofmatplotlib
causes the specific parts to be skipped. Example:log_gradient_flow
- this is crucial, as raising an exception would prevent the models from running.