Make real metric caches explicit#76
Merged
ftshijt merged 4 commits intoMay 19, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/setup_huggingface_cache.sh.Diff Notes
README.md,docs/ci.md,docs/metric_migration.md: document real-model cache preparation and explicit env vars.tools/setup_huggingface_cache.sh,versa/huggingface_cache.py: add shared cache configuration, cached-file detection, and offline loading helpers.versa/utterance_metrics/discrete_speech.py,versa/utterance_metrics/emo_vad.py,versa/utterance_metrics/nomad.py: update optional model-backed metric setup paths and availability checks.versa/scorer_shared.py,versa/utils_shared.py,versa/bin/scorer_chunk.py: tighten scoring validation and preserve nested duplicate file basenames.scripts/survey/get_wer.py: replaceevalparsing with JSON /ast.literal_evaland fix ESPnet fallback selection.tools/install_fairseq.sh,tools/install_scoreq.sh: respect explicitPYTHON=...and fall back topython3whenpythonis unavailable.test/test_metrics/*,test/test_pipeline/*: assert expected summary keys and cover the new behavior.pyproject.toml: includematplotlibin the audio extra used by metric paths.Root Cause
The real-model failures came from package availability checks passing while required model/checkpoint assets were missing or stored in hidden/inconsistent cache locations. Some pipeline tests also iterated over returned summary keys, so an empty or incomplete metric output could look successful.
CI Fix
The latest CI failure on
c66ba0fwas thecode-qualityjob's Black check. GitHub reported five unformatted files:test/test_metrics/test_asr_matching.pytest/test_pipeline/test_base_metrics_pipeline.pyversa/huggingface_cache.pyversa/utils_shared.pyversa/utterance_metrics/discrete_speech.pyCommit
c4edd48formats those files and fixes the stale-cache review issue in the discrete-speech loader patching.The follow-up
core-testsfailure was a packaging/import issue:test_definition.pyimportedscripts.survey.get_wer, butscriptsis not importable afterpip install -e .[test]in CI. Commit2341953keeps the regression coverage and loadsscripts/survey/get_wer.pyby file path instead.Commit
4af57bckeeps the optional fairseq/scoreq installers portable on environments that only exposepython3.Validation
.codex-test-venv/bin/python -m black --check $(git ls-files '*.py')-> pass.codex-test-venv/bin/python -m flake8 versa scripts test setup.py --count --select=E9,F63,F7,F82 --show-source --statistics->0.codex-test-venv/bin/python -m pytest -q test/test_metrics/test_definition.py->7 passed.codex-test-venv/bin/python -m pytest -q test/test_metrics/test_discrete_speech.py test/test_metrics/test_emo_vad.py test/test_metrics/test_definition.py test/test_pipeline/test_base_metrics_pipeline.py->40 passed.codex-test-venv/bin/python -c "import versa; print(versa.__version__)"->1.0.0bash -n tools/setup_huggingface_cache.sh-> passbash -n tools/install_fairseq.sh tools/install_scoreq.sh-> passgit diff --check-> passNotes
The broader CI flake8 command is configured with
--exit-zero; it still reports existing style warnings across the repo but does not fail the job. The remaining skipped real-model item in local full-suite validation isscoreq_versawhen that optional package is not installed.