Skip to content

Better error messages for incompatible models#786

Open
joanise wants to merge 7 commits intomainfrom
dev.ej/model-error-messages
Open

Better error messages for incompatible models#786
joanise wants to merge 7 commits intomainfrom
dev.ej/model-error-messages

Conversation

@joanise
Copy link
Copy Markdown
Member

@joanise joanise commented Apr 15, 2026

PR Goal?

Two related changes to improve how we handle old and/or incompatible models.

  • everyvoice checkpoint inspect now uses the embedded model_info to directly target the right class, if possible, with the same fallback cascade as before if it doesn't work
  • starting the demo/app via everyvoice demo or a specific app.py script like we do on HF should produce more helpful error messages in cases of failures.

Fixes?

My hope is to reduce the troubleshooting efforts required next time we try to start a model with the wrong version of EV.

Feedback sought?

@SamuelLarkin the changes in checkpoint.py refactor your code, please review the code carefully

@deltork opinion on the error messages since you were troubleshooting the system that brought me to want to make these improvements.

Priority?

normal

Tests added?

yeah, not really. We don't have models saved in the repo accessible for CI, so none of these exception are exercised. I want to create a bank of old models created with various versions of EV for regression testing, but that's not a job for this PR.

How to test?

everyvoice inspect a variety of models and see slightly improved output, and especially no errors due to trying other kinds of models in the cases where the model_info field tells us what the right kind is.

Confidence?

high

Version change?

nah

Related PRs?

nope

@joanise joanise requested review from SamuelLarkin and deltork April 15, 2026 14:55
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Apr 15, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  everyvoice/demo/app.py  51% smaller
  everyvoice/tests/test_cli.py  46% smaller
  everyvoice/base_cli/checkpoint.py  40% smaller
  everyvoice/utils/__init__.py  3% smaller
  everyvoice/cli.py  0% smaller
  everyvoice/config/text_config.py  0% smaller
  pyproject.toml Unsupported file format

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

CLI load time: 0:00.27
Pull Request HEAD: 21fc92dec8781292dae4aca56c884df53df650b4
Imports that take more than 0.1 s:
import time: self [us] | cumulative | imported package
import time:      1707 |     127255 | everyvoice.cli

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 92.06349% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.51%. Comparing base (0efb318) to head (21fc92d).

Files with missing lines Patch % Lines
everyvoice/base_cli/checkpoint.py 89.58% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #786      +/-   ##
==========================================
+ Coverage   82.97%   83.51%   +0.54%     
==========================================
  Files          47       47              
  Lines        4158     4198      +40     
  Branches      611      614       +3     
==========================================
+ Hits         3450     3506      +56     
+ Misses        576      561      -15     
+ Partials      132      131       -1     

☔ 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.

@joanise joanise changed the title Dev.ej/model error messages Better error messages for incompatible models Apr 15, 2026
@joanise joanise force-pushed the dev.ej/model-error-messages branch from 432d290 to 8ffaf42 Compare April 16, 2026 22:42
@joanise joanise force-pushed the dev.ej/model-error-messages branch from 8ffaf42 to 21fc92d Compare April 20, 2026 20:17
@joanise joanise requested a review from roedoejet April 27, 2026 20:12
Copy link
Copy Markdown
Member

@roedoejet roedoejet left a comment

Choose a reason for hiding this comment

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

A nice solid improvement on checkpoint inspection including some sensible refactoring. Lgtm, thanks @joanise !

if punctuation in self.all_except_punctuation:
raise ValueError(
f"Sorry, the symbol '{punctuation}' occurs in both your declared punctuation and in your other symbol set. Please inspect your text configuration and either remove the symbol from the punctuation or other symbol set."
f"Sorry, the symbol '{punctuation}' occurs in both your declared punctuation and in your other symbol set. If you are training a model, please inspect your text configuration and either remove the symbol from the punctuation or other symbol set. If you are trying to use an existing model, it was probably trained with an older version of EveryVoice, please downgrade EveryVoice."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there no way to suggest a version?

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