-
Notifications
You must be signed in to change notification settings - Fork 303
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
Replace deprecated pytorch methods #1814
Conversation
lipeng31
commented
Nov 27, 2024
- torch.cuda.amp.GradScaler(...) => torch.amp.GradScaler("cuda", ...)
- torch.cuda.amp.autocast(...) => torch.amp.autocast("cuda", ...)
- torch.cuda.amp.GradScaler(...) => torch.amp.GradScaler("cuda", ...) - torch.cuda.amp.autocast(...) => torch.amp.autocast("cuda", ...)
could you make it backward compatible? |
I read the PyTorch docs and found the first version that provides both |
Last commit fails some checks. I'll fix it soon. |
Along with reformatting to pass black lint. - egs/libritts/ASR/zipformer/train.py - egs/libritts/CODEC/encodec/encodec.py - egs/ljspeech/TTS/vits/vits.py - egs/wenetspeech4tts/TTS/valle/train.py
Hi @csukuangfj , I have completed the code revision. There are some checks that still haven't passed, which I believe are unrelated to the changes I've made. Could you please review the pull request? Thank you. |
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.
Thank you for your contribution!
@lipeng31 Could you resolve the conflicts? |
Conflicts resolved, please review it, thanks. |
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.
Thank you!