Repository navigation
fix: keep the real cause when align model loading fails - #5
Conversation
Every non-network failure in load_align_model is reported as
ValueError: The chosen align_model "jonatasgrosman/wav2vec2-large-xlsr-53-russian"
could not be found in huggingface (...) or torchaudio (...)
regardless of what actually went wrong. Hit this on an interrupted
download: the underlying error was
OSError: Can't load feature extractor for '<model>'. ... make sure
'<model>' is the correct path to a directory containing a
preprocessor_config.json file
but the message said the model does not exist. It does — the very next
run loaded it from cache without touching the network. A gated repo or a
cache permission problem lands in the same branch and reads the same way.
The original exception was already chained with `from e`, but the chained
traceback is not what a CLI user sees; they see the message.
- put the cause into the raised message and the log line
- swap `print` for `logger.error`, matching the rest of the module
- soften the wording: a load failure is not proof the model is missing
- add a test covering the non-network branch (the existing test only
exercises the network path)
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Problem
load_align_modelreports every non-network failure as "model could not be found", whatever actually happened:I hit this on an interrupted download while
whisper-large-v3was being fetched in parallel. The real error was:The model exists and is fine — the very next run loaded it from cache without touching the network. But the message sent me checking whether the repo had been renamed or pulled, which it hadn't. A gated repo or a cache permission problem lands in the same branch and reads identically.
The cause was chained with
from e, but a CLI user sees the message, not the chained traceback.Changes
printforlogger.error— the rest of the module logs, these two calls bypassed itBefore:
After:
Verification
Independent of #4 — no overlapping files.