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

Skip to content

Fix HF tests by switching them to upstream testing models#6261

Merged
sw005320 merged 3 commits intoespnet:masterfrom
akreal:fix-hf-testing
Oct 16, 2025
Merged

Fix HF tests by switching them to upstream testing models#6261
sw005320 merged 3 commits intoespnet:masterfrom
akreal:fix-hf-testing

Conversation

@akreal
Copy link
Contributor

@akreal akreal commented Oct 14, 2025

I created copies of the upstream HF testing models in the past, and some of them became incompatible with the recent versions of HF Transformers because of the parameter naming or configuration format. The migration process for old models is not quite clear to me, because HF created new versions of models from scratch (I found only one migrated example: https://huggingface.co/hf-internal-testing/tiny-random-gpt2/commits/main).

The reason to create my copies of the HF testing models was to support PyTorch<1.6, because all original models used the new PyTorch torch.save format. Now this is not required, so all tests can be switched to the upstream testing models, which are maintained by HF.

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Bugfix labels Oct 14, 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 is a great step towards improving test maintenance by switching to upstream Hugging Face testing models. The changes are mostly straightforward replacements of model names. I found one potential issue in the test setup where the vocabulary size for the generated token list might be too small for one of the new test models (BloomForCausalLM), which could lead to test failures or incorrect behavior. I've added a specific comment with a suggestion to address this.

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6261       +/-   ##
===========================================
+ Coverage   23.88%   56.77%   +32.88%     
===========================================
  Files         888      889        +1     
  Lines       84196    84361      +165     
===========================================
+ Hits        20114    47898    +27784     
+ Misses      64082    36463    -27619     
Flag Coverage Δ
test_integration_espnet2 46.80% <ø> (?)
test_integration_espnetez 36.92% <ø> (-0.02%) ⬇️
test_python_espnet2 51.20% <ø> (?)
test_python_espnetez 12.81% <ø> (-0.01%) ⬇️
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.

@sw005320 sw005320 merged commit 81477a2 into espnet:master Oct 16, 2025
32 checks passed
@sw005320
Copy link
Contributor

Thanks!!

@Fhrozen Fhrozen added this to the v.202512 milestone Oct 26, 2025
@Fhrozen Fhrozen modified the milestones: v.202512, v.202511 Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants