Skip to content
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

fix documentation to match pytorch-lightning #1244

Merged
merged 12 commits into from
Sep 28, 2022

Conversation

gdevos010
Copy link
Contributor

@gdevos010 gdevos010 commented Sep 26, 2022

the gpus arg in PyTorch Lightning has been deprecated in favor of devices

fixed broken PyTorch Lightning link

https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html#gpus

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2022

Codecov Report

Base: 94.02% // Head: 93.97% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (46ff8c6) compared to base (d97932a).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1244      +/-   ##
==========================================
- Coverage   94.02%   93.97%   -0.05%     
==========================================
  Files          73       73              
  Lines        8215     8182      -33     
==========================================
- Hits         7724     7689      -35     
- Misses        491      493       +2     
Impacted Files Coverage Δ
darts/models/forecasting/block_rnn_model.py 98.24% <ø> (-0.04%) ⬇️
darts/models/forecasting/nbeats.py 98.11% <ø> (ø)
darts/models/forecasting/nhits.py 99.27% <ø> (-0.01%) ⬇️
darts/models/forecasting/rnn_model.py 97.64% <ø> (ø)
darts/models/forecasting/tcn_model.py 96.96% <ø> (ø)
darts/models/forecasting/tft_model.py 97.53% <ø> (ø)
...arts/models/forecasting/torch_forecasting_model.py 87.08% <ø> (-0.40%) ⬇️
darts/models/forecasting/transformer_model.py 100.00% <ø> (ø)
darts/logging.py 96.29% <0.00%> (-1.86%) ⬇️
darts/utils/statistics.py 88.65% <0.00%> (-1.04%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for another PR :)
We would have to adapt the parts of the code where we generate params dicts for PyTorch Lightning Trainer with "gpus". Otherwise the deprecation warning will not disappear.

I added a suggestion.

darts/models/forecasting/torch_forecasting_model.py Outdated Show resolved Hide resolved
Copy link
Contributor

@hrzn hrzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, however we could consider moving these comments to actual docstring, and remove the support for torch_device_str, WDYT?

darts/models/forecasting/torch_forecasting_model.py Outdated Show resolved Hide resolved
docs/userguide/timeseries.md Show resolved Hide resolved
@dennisbader
Copy link
Collaborator

LGTM, however we could consider moving these comments to actual docstring, and remove the support for torch_device_str, WDYT?

Agreed 👍

@gdevos010 gdevos010 requested review from hrzn and dennisbader and removed request for dennisbader and hrzn September 27, 2022 23:03
Copy link
Contributor

@hrzn hrzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @gdevos010 !
Just have a small question about the pytorch lightning version (>=1.7.0) check in torch_forecasting_model.py: is this needed?

darts/models/forecasting/torch_forecasting_model.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :) Only thing is that we should set the 3 parameters by default "accelerator", "gpus" (or "devices"), "auto_select_gpus", as we decided to always use CPU by default.

After that we can merge :)

@gdevos010
Copy link
Contributor Author

@dennisbader we should be good to merge now

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looks perferct now 👍 Thanks a lot for all the effort @gdevos010!

@dennisbader dennisbader merged commit d852911 into unit8co:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants