Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: switch away from deprecated jiwer methods #2937

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/unittests/text/test_mer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

def _reference_jiwer_mer(preds: Union[str, list[str]], target: Union[str, list[str]]):
try:
from jiwer import compute_measures
from jiwer import mer
except ImportError:
pytest.skip("test requires jiwer package to be installed")
return compute_measures(target, preds)["mer"]
return mer(target, preds)


@pytest.mark.parametrize(
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/text/test_wer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

def _reference_jiwer_wer(preds: Union[str, list[str]], target: Union[str, list[str]]):
try:
from jiwer import compute_measures
from jiwer import wer
except ImportError:
pytest.skip("test requires jiwer package to be installed")

return compute_measures(target, preds)["wer"]
return wer(target, preds)


@pytest.mark.parametrize(
Expand Down
Loading