Skip to content

Fix silent TypeError, resource leaks, typos, and CUDA skip logic - #2764

Closed
shantoshdurai wants to merge 1 commit into
openai:mainfrom
shantoshdurai:fix/bugs-and-resource-leaks
Closed

Fix silent TypeError, resource leaks, typos, and CUDA skip logic#2764
shantoshdurai wants to merge 1 commit into
openai:mainfrom
shantoshdurai:fix/bugs-and-resource-leaks

Conversation

@shantoshdurai

Copy link
Copy Markdown
  • 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

- 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
@shantoshdurai shantoshdurai closed this by deleting the head repository Jul 21, 2026
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