Skip to content

Keep the table name when a row's url is the bare Hub marker - #110

Merged
sw005320 merged 1 commit into
masterfrom
fix/hf-repo-id-empty
Oct 19, 2026
Merged

sw005320 merged 1 commit into
masterfrom
fix/hf-repo-id-empty

Conversation

@sw005320

Copy link
Copy Markdown
Collaborator

What failed

The scheduled Model test run (run 39211176651) failed on 2 of 146 models with HFValidationError: ... '':

  • byan/librispeech_asr_train_asr_conformer_raw_bpe_batch_bins30000000_accum_grad3_optim_conflr0.001_sp
  • reazon-research/reazonspeech-espnet-v1

Cause

Four table.csv rows store https://huggingface.co/ (the marker with a trailing slash) as their url. _resolve_huggingface treated it as a full repository URL and returned its empty tail as the repo id, so snapshot_download("") was called. The two pyf98/speechcommands_* SLU rows have the same fault but the model test does not load them.

Fix

Only take the URL tail as the repo id when it is non-empty; otherwise keep the table name. Added test_table_row_with_bare_hub_marker_url_keeps_its_name, which fails without the change ({'cache_dir': ''}) and passes with it.

Checked locally

  • pytest test/: 180 passed
  • black, flake8: clean
  • Not re-run: the real download and inference for the two models. The next scheduled model test run will cover that.

🤖 Generated with Claude Code

Four table.csv rows store "https://huggingface.co/" as their url.
_resolve_huggingface read that as a full repository URL and returned its
empty tail as the repo id, so snapshot_download raised HFValidationError
on "". The scheduled model test failed on two of them
(byan/librispeech_asr_train_asr_conformer_..., reazon-research/
reazonspeech-espnet-v1); the two pyf98 speechcommands SLU rows had the
same fault but are not loaded by the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: espnet/espnet_model_zoo/.coderabbit.yaml
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 071bc247-b3cd-4440-b029-8eec398a9d95
📥 Commits

Reviewing files that changed from the base of the PR and between 5874a94 and 107d436.

📒 Files selected for processing: 2
  • espnet_model_zoo/downloader.py
  • test/test_downloader.py
📝 Walkthrough

The Hugging Face URL resolver now strips surrounding slashes from the extracted repository ID and returns a canonical URL only when the ID is nonempty. A new test covers a marker-only URL and checks that the tag is used as the repository name during download and unpack.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 107d4

Marker-only Hub URLs now retain the table name as the repository ID, with focused download-path coverage. No material merge risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: preserving the table name when the URL is the bare Hugging Face Hub marker.
Description check Passed The description is directly related to the changeset. It explains the failure, root cause, fix, test coverage, and validation results.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.93%. Comparing base (5874a94) to head (107d436).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   63.91%   63.93%   +0.02%     
==========================================
  Files           5        5              
  Lines        1258     1259       +1     
==========================================
+ Hits          804      805       +1     
  Misses        454      454              

☔ View full report in Codecov by Harness.
📢 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 b1fde25 into master Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants