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

Skip to content

[espnet3-6] Add evaluation scripts#6178

Merged
sw005320 merged 37 commits intoespnet:espnet3from
Masao-Someki:espnet3/evaluation_stage
Oct 20, 2025
Merged

[espnet3-6] Add evaluation scripts#6178
sw005320 merged 37 commits intoespnet:espnet3from
Masao-Someki:espnet3/evaluation_stage

Conversation

@Masao-Someki
Copy link
Contributor

What did you change?

  • Added a new inference module under espnet3/inference/, including:

    • abs_metrics.py: Abstract base class for evaluation metrics.
    • inference_runner.py: A comprehensive, configurable inference engine supporting streaming and parallelism.
    • score_runner.py: Evaluation runner for decoding outputs using custom metrics.
  • Introduced espnet3/task.py with helpers for task-specific model instantiation (get_espnet_model) and configuration saving.


Why did you make this change?

To modularize and generalize the inference and evaluation pipelines in ESPnet3:

  • Enables easier implementation and reuse of evaluation logic.
  • Supports both offline and streaming inference.
  • Allows flexible configuration with Hydra and parallel execution with Dask.

Is your PR small enough?

Yes.

  • ✅ Fewer than 20 files changed.
  • ✅ Fewer than 1000 lines changed.

It has many files under test_utils/espnet3/, which is mainly used for invalid test cases.


Additional Context

Note: Since I couldn't find a way to run CI with parallel processing, this PR does not contain unit tests.

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jun 29, 2025
@mergify mergify bot added the ESPnet2 label Jun 29, 2025
@Masao-Someki Masao-Someki mentioned this pull request Jun 27, 2025
52 tasks
@mergify mergify bot added the CI Travis, Circle CI, etc label Jun 29, 2025
@Fhrozen Fhrozen requested a review from Copilot June 30, 2025 21:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a variety of evaluation scripts and configuration updates for the ESPnet3 evaluation and inference pipelines. Key changes include:

  • New test utilities and configuration files for score evaluation and dataloader setup.
  • Several integration tests and unit tests for inference, score runners, trainers, hybrid optimizers, and dataloader builders.
  • Removal of legacy modules in the espnetez package to streamline the codebase.

Reviewed Changes

Copilot reviewed 72 out of 75 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test_utils/espnet3/stats/stats_dummy Adds a dummy stats file used for testing dataloader configuration.
test_utils/espnet3/scores/* Adds new score files for testing sorted, ID mismatches, and missing files.
test_utils/espnet3/config/*.yaml Updates to configuration files for scoring tasks and dataloader settings.
test/espnet3/* New integration and unit tests covering inference runners, trainers, model schedulers, hybrid optimizers and dataloader builders.
espnetez/* Removal of outdated or redundant modules including trainer, task, preprocess/tokenizer, sentencepiece, dataset, and dataloader.

valid:
iter_factory:
batch_size: 2
num_workers": 0
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

The key 'num_workers"' appears to include an extra quote. It should be corrected to 'num_workers: 0' to follow proper YAML syntax.

Suggested change
num_workers": 0
num_workers: 0

Copilot uses AI. Check for mistakes.
@Fhrozen Fhrozen added this to the v.202509 milestone Aug 11, 2025
@mergify
Copy link
Contributor

mergify bot commented Aug 11, 2025

This pull request is now in conflict :(

@mergify mergify bot added the conflicts label Aug 11, 2025
@Fhrozen Fhrozen modified the milestones: v.202509, v.202512 Sep 12, 2025
@mergify mergify bot removed the conflicts label Sep 22, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 15, 2025
@Masao-Someki
Copy link
Contributor Author

@sw005320 @Emrys365
I fixed the code and bugs pointed out by Emry's review. If this looks okay to you, I will now move on to some of the utility that is required for training and move on to the recipe!

@sw005320
Copy link
Contributor

Please fix the CI error

@Masao-Someki
Copy link
Contributor Author

The CI error for espnet2 package comes from huggingface side.
I think this should be fixed in other PR into master branch.

@sw005320
Copy link
Contributor

Please check #6261

Can you import the espnet master now in another PR?

@Masao-Someki
Copy link
Contributor Author

Thank you, I will merge master into espnet3 branch!

@Masao-Someki
Copy link
Contributor Author

@sw005320
I merged the master branch and all CI has passed. Could you check this PR again and if this looks okay to you, please merge this PR!

@Masao-Someki
Copy link
Contributor Author

When using this runners I found a issue in running parallel processing in sync mode. (rank is not passed via environment variable)
I will re-check this package and fix them

@sw005320
Copy link
Contributor

Can you make the test time shorter?
50 second is too large

Masao-Someki and others added 5 commits October 18, 2025 13:23
- Cancel all futures when one future got error
- Close local clients after the job
- For local clusters it is not properly closed and they remain alive during tests..
@sw005320 sw005320 merged commit 55e04b9 into espnet:espnet3 Oct 20, 2025
33 checks passed
@sw005320
Copy link
Contributor

Thanks!

@Fhrozen Fhrozen modified the milestones: v.202512, v.202511 Nov 14, 2025
@Masao-Someki Masao-Someki deleted the espnet3/evaluation_stage branch November 26, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Travis, Circle CI, etc ESPnet2 ESPnet3 Evaluation lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants