Skip to content

Refactor deprecated torch.cuda.amp.autocast #521

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

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Conversation

WenjieDu
Copy link
Owner

What does this PR do?

  1. fixing FutureWarning: torch.cuda.amp.autocast(args...) is deprecated since torch 2.4 #520;

Before submitting

  • Was this discussed/approved via a GitHub issue? Please add a link to it if that's the case.

@WenjieDu
Copy link
Owner Author

This PR is only for torch>=2.4, so hold it here for future merge.

@coveralls
Copy link
Collaborator

coveralls commented Sep 24, 2024

Pull Request Test Coverage Report for Build 13460517510

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 4 of 6 (66.67%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 83.015%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pypots/nn/modules/reformer/local_attention.py 4 6 66.67%
Files with Coverage Reduction New Missed Lines %
pypots/forecasting/csdi/model.py 1 85.71%
pypots/imputation/csdi/model.py 1 85.29%
Totals Coverage Status
Change from base Build 13459953986: 0.01%
Covered Lines: 12336
Relevant Lines: 14860

💛 - Coveralls

Copy link

github-actions bot commented Oct 9, 2024

This pull request had no activity for 14 days. It will be closed in 1 week unless there is some new activity.

@github-actions github-actions bot added the stale label Oct 9, 2024
@WenjieDu WenjieDu added keep Keep this issue away from being stale. warning and removed stale labels Oct 9, 2024
Copy link

This pull request had no activity for 14 days. It will be closed in 1 week unless there is some new activity.

@github-actions github-actions bot added the stale label Oct 24, 2024
@github-actions github-actions bot closed this Oct 31, 2024
@WenjieDu WenjieDu reopened this Nov 24, 2024
@WenjieDu WenjieDu merged commit bc792dc into dev Feb 21, 2025
7 checks passed
@WenjieDu WenjieDu deleted the (refactor)torch_warning branch February 21, 2025 16:07
@phro
Copy link

phro commented Mar 11, 2025

I am still getting the deprecation warning. I believe the version comparison is inverted. The condition should read torch.__version < "2.4", not >=.

@WenjieDu
Copy link
Owner Author

WenjieDu commented Mar 12, 2025

Right, we have fixed it in this commit ff94813. Thanks for reminding us, Jesse. We will release new version 0.12 with known bug fixes and new features later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Keep this issue away from being stale. refactoring warning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants