Fix silent TypeError, resource leaks, typos, and CUDA skip logic - #2764
Closed
shantoshdurai wants to merge 1 commit into
Closed
Fix silent TypeError, resource leaks, typos, and CUDA skip logic#2764shantoshdurai wants to merge 1 commit into
shantoshdurai wants to merge 1 commit into
Conversation
- decoding.py: `return TypeError(...)` → `raise TypeError(...)` so dtype mismatches in `_get_audio_features` are actually surfaced instead of returning the exception object as a value - __init__.py, tokenizer.py, normalizers/english.py: replace bare `open()` calls with context managers to ensure file handles are closed promptly - __init__.py: fix double-word typo "does not not match" - transcribe.py: fix typo "receipted" → "received" - audio.py: accept `os.PathLike` (e.g. `pathlib.Path`) in `log_mel_spectrogram`, not just `str` - tests/conftest.py: enforce `requires_cuda` marker as a proper skip when CUDA is unavailable, instead of only registering the marker name
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.
return TypeError(...)→raise TypeError(...)so dtype mismatches in_get_audio_featuresare actually surfaced instead of returning the exception object as a valueopen()calls with context managers to ensure file handles are closed promptlyos.PathLike(e.g.pathlib.Path) inlog_mel_spectrogram, not juststrrequires_cudamarker as a proper skip when CUDA is unavailable, instead of only registering the marker name