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

Skip to content

Add Pytorch version 2.9#6272

Merged
sw005320 merged 24 commits intoespnet:masterfrom
Fhrozen:pr-torchver
Nov 14, 2025
Merged

Add Pytorch version 2.9#6272
sw005320 merged 24 commits intoespnet:masterfrom
Fhrozen:pr-torchver

Conversation

@Fhrozen
Copy link
Member

@Fhrozen Fhrozen commented Oct 25, 2025

What did you change?

This pull request updates the supported and tested PyTorch versions across the project, including CI workflows, documentation, and installation scripts. The main focus is to add support for PyTorch 2.9.0, remove references to older versions, and ensure compatibility in CI pipelines and installation logic.

PyTorch version updates:

  • Updated all CI workflow matrices in .github/workflows/ci_on_ubuntu.yml, .github/workflows/ci_on_macos.yml, .github/workflows/ci_on_windows.yml, and .github/workflows/ci_on_debian12.yml to use PyTorch 2.7.0/2.7.1 and 2.9.0, removing 2.6.0 and ensuring the latest versions are tested. [1] [2] [3] [4] [5] [6] [7] [8]

  • Updated the documentation table in README.md to reflect supported PyTorch versions: 2.5.1, 2.7.1, 2.8.0, and 2.9.0.

Installation and compatibility logic:

  • Enhanced tools/installers/install_torch.sh to add installation logic for PyTorch 2.9.0, including CUDA version fallback and Python version checks, and updated the upper limit to 2.9.1.

  • Updated the TH_VERSION environment variable in CI and documentation publishing workflows to match the new supported PyTorch versions. [1] [2]

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. CI Travis, Circle CI, etc Installation labels Oct 25, 2025
@mergify mergify bot added the README label Oct 25, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for PyTorch 2.9.0 by updating the installation script and documentation. The changes in README.md are correct. In tools/installers/install_torch.sh, while the logic for PyTorch 2.9.0 is consistent with the rest of the script, I've identified a significant maintainability issue due to code duplication for CUDA fallback logic. I've suggested a refactoring to improve the script's robustness and ease of future updates.

@codecov
Copy link

codecov bot commented Oct 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.24%. Comparing base (ca9dcf0) to head (e6f2640).
⚠️ Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6272      +/-   ##
==========================================
- Coverage   56.43%   56.24%   -0.19%     
==========================================
  Files         897      897              
  Lines       84917    84917              
==========================================
- Hits        47923    47762     -161     
- Misses      36994    37155     +161     
Flag Coverage Δ
test_integration_espnet2 45.90% <ø> (-0.94%) ⬇️
test_integration_espnetez 35.65% <ø> (-1.29%) ⬇️
test_python_espnet2 50.89% <ø> (+<0.01%) ⬆️
test_python_espnetez 12.72% <ø> (ø)
test_utils 18.77% <ø> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@sw005320 sw005320 left a comment

Choose a reason for hiding this comment

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

Thanks, @Fhrozen!
Once you fix the CI, please merge this PR.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 25, 2025
@Fhrozen Fhrozen added this to the v.202512 milestone Oct 26, 2025
@sw005320 sw005320 mentioned this pull request Oct 27, 2025
@sw005320
Copy link
Contributor

what is the status of this PR?

@Fhrozen
Copy link
Member Author

Fhrozen commented Nov 13, 2025

I am still checking some issues with tests raised due to updates of torchaudio. I will fix by the weekend.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 14, 2025
@Fhrozen Fhrozen requested a review from sw005320 November 14, 2025 21:43
@Fhrozen Fhrozen modified the milestones: v.202512, v.202511 Nov 14, 2025
Copy link
Contributor

@sw005320 sw005320 left a comment

Choose a reason for hiding this comment

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

LGTM, but I have some questions.

env:
ESPNET_PYTHON_VERSION: 3.10
TH_VERSION: 2.1.2
TH_VERSION: 2.5.1
Copy link
Contributor

Choose a reason for hiding this comment

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

why 2.5.1?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was using the minimum CI version. But I can use a higher version if required.

# ESPnet: end-to-end speech processing toolkit

|system/pytorch ver.|2.5.1|2.6.0|2.7.1|2.8.0|
|system/pytorch ver.|2.5.1|2.7.1|2.8.0|2.9.0|
Copy link
Contributor

Choose a reason for hiding this comment

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

why 2.5.1 instead of 2.6.0?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are some backward incompatibilities (https://github.com/pytorch/pytorch/releases/tag/v2.6.0) between 2.5.1 and 2.6.0. I keep 2.5 to watch these incompatibilities, but I can move forward to 2.6, and remove 2.5.

@sw005320
Copy link
Contributor

I see.
We can go with 2.5.1, then.

@sw005320 sw005320 merged commit beec612 into espnet:master Nov 14, 2025
35 checks passed
@Fhrozen Fhrozen deleted the pr-torchver branch November 14, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Travis, Circle CI, etc Installation lgtm This PR has been approved by a maintainer README size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants