sktime / pytorch-forecasting

Time series forecasting with PyTorch
https://pytorch-forecasting.readthedocs.io/
MIT License
3.99k stars 631 forks source link

[MNT] isolate `pytorch-optimizer` as soft dependency #1641

Closed fkiraly closed 2 months ago

fkiraly commented 2 months ago

Isolates pytorch-optimizer as soft dependency in a new soft dep set all_extras. https://github.com/jdb78/pytorch-forecasting/issues/1616

The imports happen only in BaseModel, when resolving aliases for optimizer.

Isolation consists of two steps:

Deprecation messages and actions are added, to changne the default to "adam" from 1.2.0, in order to minimize the number of dependencies in default parameter settings

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 45.00000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 90.14%. Comparing base (95fa06c) to head (38daba9).

Files with missing lines Patch % Lines
pytorch_forecasting/models/base_model.py 45.00% 11 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1641 +/- ## ========================================== + Coverage 90.10% 90.14% +0.04% ========================================== Files 32 32 Lines 4768 4780 +12 ========================================== + Hits 4296 4309 +13 + Misses 472 471 -1 ``` | [Flag](https://app.codecov.io/gh/jdb78/pytorch-forecasting/pull/1641/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jan+Beitner) | Coverage Δ | | |---|---|---| | [cpu](https://app.codecov.io/gh/jdb78/pytorch-forecasting/pull/1641/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jan+Beitner) | `90.14% <45.00%> (+0.04%)` | :arrow_up: | | [pytest](https://app.codecov.io/gh/jdb78/pytorch-forecasting/pull/1641/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jan+Beitner) | `90.14% <45.00%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jan+Beitner#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.