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

Skip to content

[espnet3-10] Merge espnet3 branch into master#6304

Merged
sw005320 merged 440 commits intomasterfrom
espnet3
Dec 15, 2025
Merged

[espnet3-10] Merge espnet3 branch into master#6304
sw005320 merged 440 commits intomasterfrom
espnet3

Conversation

Masao-Someki and others added 30 commits June 30, 2025 10:51
[espnet-3] Merge ESPnet master branch into espnet3 branch
- Due to the review comment for `multiple_iterator` flag, I recognized that the exception with the flag is not properly tested. I've added a new test case for this fix.
- I mistakenly removed important line when fixing the flake8..
@Fhrozen Fhrozen requested a review from sw005320 November 21, 2025 10:26
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.

  • Can you remove the egs directory?
    • check whether some scripts are used in egs2 by using a grep for symlink
    • move them in espnet2
    • config files must not be used, and you can safely remove them
  • Why did you change espnet.utils --> espnet2.legacy.utils?
    • espnet.utils.cli_utils seems to be frequently used, and we can move this to espnet2.utils
  • ditto espnet.nets --> espnet2.legacy.nets
    • to remove espnet1?
    • espnet2.legacy.nets.pytorch_backend --> espnet2.legacy.nets (we don't need pytorch_backend

Comment on lines +163 to +167
# - name: test espnet3 integration
# run: ./ci/test_integration_espnet3.sh
# - uses: codecov/codecov-action@v2
# with:
# flags: test_integration_espnet3
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, currently we don't have them. I will activate this in recipe-related PR!

Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this file have such a large change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I refactored the beam search test to use espnet2 models from using espnet-1 model. Models are built via ASRTask.build_model from espnet2, and the encoder/LM setup follows the espnet2 APIs.

@@ -42,4 +42,4 @@ export PATH=${PYTHON_DIR}:\${PATH}
EOF

. ./activate_python.sh
python3 -m pip install -U pip wheel
python3 -m pip install -U pip==25.2 wheel
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this? pip==25.2

@sw005320
Copy link
Contributor

  • Can you remove the egs directory?

    • check whether some scripts are used in egs2 by using a grep for symlink
    • move them in espnet2
    • config files must not be used, and you can safely remove them
  • Why did you change espnet.utils --> espnet2.legacy.utils?

    • espnet.utils.cli_utils seems to be frequently used, and we can move this to espnet2.utils
  • ditto espnet.nets --> espnet2.legacy.nets

    • to remove espnet1?
    • espnet2.legacy.nets.pytorch_backend --> espnet2.legacy.nets (we don't need pytorch_backend

Some of them (e.g., remove egs) can be done later PR

@Masao-Someki
Copy link
Contributor Author

I double-checked all removed espnet functions using a full static analysis pipeline.
It identifies every espnet2 -> espnet dependency, recursively resolves internal calls inside espnet, and verifies that all required symbols exist in espnet2/legacy.

Except for one known aliasing case (TransformerLoss), everything was fully consistent.
All CI tests pass as well, so we can be confident that the removed functions were truly unused and safe to delete.

All the tools and output resources are uploaded in the following gist:
https://gist.github.com/Masao-Someki/1955ee8930cd5dc63da5fcab31c68454

@Masao-Someki
Copy link
Contributor Author

Masao-Someki commented Dec 12, 2025

The pip version change (adding ==25.2) comes from a CI bug we hit when building warp-transducer in editable mode with pip 25.3. With pip 25.3, warp-transducer/pytorch_binding/setup.py is executed in a temporary environment where torch is not installed. Because setup.py imports torch at module import time, this results in a ModuleNotFoundError.

With pip 25.2, pip falls back to the legacy editable path (= setup.py develop) or otherwise runs setup.py without strict build isolation, so it sees the main environment where torch is already available and the build succeeds.

It seems the real reason is that the --no-build-isolation flag inside the installation script is not taking effect under pip 25.3. As a result, warp-transducer’s setup.py is executed inside pip’s isolated build environment, where torch is unavailable.

I am not sure why under the current master branch it works, and in espnet3 branch it doesn't. Pinning the pip version to 25.2 is the simplest workaround for now, but if needed I would investigate the exact behavior of pip 25.3 in more detail...

@Fhrozen
Copy link
Member

Fhrozen commented Dec 14, 2025

@Masao-Someki, Please list the TODO items (or add TODO(Nelson)) that will need attention after merging this PR.
like:

  • Remove constraint at pip==25.2
    or similar. I will test and fix these issues later.

@Masao-Someki
Copy link
Contributor Author

@Fhrozen
Thank you, here are the todos.

  • Remove egs folder
  • directory structure update
    • espnet2.legacy.utils -> espnet2.utils
    • espnet2.legacy.nets.pytorch_backend -> espnet2.legacy.nets
  • Find a better workaround for pip version
  • Add integration test (mainly in the recipe PR)

@Fhrozen Fhrozen requested a review from sw005320 December 14, 2025 07:24
@sw005320 sw005320 merged commit c61e211 into master Dec 15, 2025
66 of 74 checks passed
@sw005320 sw005320 deleted the espnet3 branch December 15, 2025 12:37
@sw005320
Copy link
Contributor

Done!

@Fhrozen Fhrozen added this to the v.202601 milestone Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASR Automatic speech recogntion CI Travis, Circle CI, etc Documentation ESPnet1 ESPnet2 ESPnet3 Installation LM mergify MT Machine translation size:XXL This PR changes 1000+ lines, ignoring generated files. TTS Text-to-speech

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants