Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix the deprecated amp interface#6036

Merged
sw005320 merged 6 commits intoespnet:masterfrom
ftshijt:ftshijt-patch-2
Feb 26, 2025
Merged

Fix the deprecated amp interface#6036
sw005320 merged 6 commits intoespnet:masterfrom
ftshijt:ftshijt-patch-2

Conversation

@ftshijt
Copy link
Collaborator

@ftshijt ftshijt commented Feb 5, 2025

Why?

The old amp setup has been deprecated in later version of pytorch, throwing warning msg all the time.

See also

Warning msg would be something like:

/usr/local/lib/python3.11/dist-packages/espnet2/enh/loss/criterions/time_domain.py:446: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/layers/tcn.py:458: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/layers/tcn.py:499: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/layers/bsrnn.py:290: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/layers/bsrnn.py:331: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/separator/tfgridnetv3_separator.py:369: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/layers/uses.py:392: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/layers/uses.py:421: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/decoder/stft_decoder.py:58: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)
/usr/local/lib/python3.11/dist-packages/espnet2/enh/encoder/stft_encoder.py:79: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
  @torch.cuda.amp.autocast(enabled=False)

@mergify mergify bot added the ESPnet2 label Feb 5, 2025
@codecov
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.48%. Comparing base (b57dd04) to head (78d9473).
Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6036       +/-   ##
===========================================
+ Coverage   38.19%   62.48%   +24.28%     
===========================================
  Files         566      153      -413     
  Lines       51080    17090    -33990     
===========================================
- Hits        19511    10679     -8832     
+ Misses      31569     6411    -25158     
Flag Coverage Δ
test_integration_espnet1 62.48% <ø> (?)
test_integration_espnetez ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sw005320 sw005320 merged commit c185e58 into espnet:master Feb 26, 2025
40 checks passed
@sw005320
Copy link
Contributor

Thanks, @ftshijt.

@sw005320 sw005320 added this to the v.202503 milestone Feb 26, 2025
Shikhar-S pushed a commit to Shikhar-S/espnet that referenced this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants