Reject beam search options up front instead of inconsistently - #20
Merged
Merged
Conversation
Beam search is not implemented, but beam_size and patience behaved differently depending on the path: with batch_size=1, beam_size raised NotImplementedError from deep inside decoding and patience alone raised "patience requires beam_size"; with batching both were silently dropped. The LightningWhisperMLX docstring listed them as supported, and the CLI exposed --patience, which always failed because there is no --beam-size. transcribe() now raises NotImplementedError for either option before loading the model, the docstrings say what is and isn't supported, and --patience is removed from the CLI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TMXYMqgLAykqRApmbRfpTA
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.
What does this PR do?
Closes #10.
Beam search isn't implemented, but
beam_sizeandpatiencebehaved differently depending on the path:batch_size=1,beam_sizeraisedNotImplementedErrorfrom deep inside decoding, andpatiencealone raised "patience requires beam_size".LightningWhisperMLXdocstring listed them as supported.--patience, which always failed because there's no--beam-size.Now:
transcribe()raisesNotImplementedErrorfor either option before loading the model, in both paths.transcribe()andLightningWhisperMLXdocstrings say what is and isn't supported, including thatbest_ofandhallucination_silence_thresholdonly apply withbatch_size=1.--patienceis removed from the CLI.How was this tested?
pytest): 80 passed, 1 skippedvayu audio.mp3)tests/test_beam_search.py: both options are rejected at batch sizes 1 and 4, unset (None) values still work, the wrapper rejectsbeam_size, and the CLI no longer accepts--patience. Six fail onmain.claude-reviewwill fail as on #12 (the repository'sCLAUDE_CODE_OAUTH_TOKENsecret, see this comment).🤖 Generated with Claude Code
https://claude.ai/code/session_01TMXYMqgLAykqRApmbRfpTA
Generated by Claude Code