Skip to content

Follow the temperature schedule in batched fallback - #15

Merged
CodeWithBehnam merged 1 commit into
mainfrom
claude/lucid-franklin-gsu7v4
Sep 30, 2026
Merged

CodeWithBehnam merged 1 commit into
mainfrom
claude/lucid-franklin-gsu7v4

Conversation

@CodeWithBehnam

Copy link
Copy Markdown
Owner

What does this PR do?

Closes #5.

  • Batched decoding always decoded at 0.0, then retried failing segments once at 1.0, whatever temperature the caller passed:
    • temperature=0.0 still triggered a retry.
    • The default schedule jumped straight to its noisiest step.
    • Retried results were never re-checked.
  • decode_batch_with_fallback now walks the same schedule as the one-window path. At each step it re-decodes only the segments that still fail, as one smaller batch. A single temperature means no fallback.
  • The pass/fail check (needs_fallback) is shared by both paths instead of being duplicated.
  • best_of is still dropped in batched mode, now with a comment saying why: DecodingTask only supports it for a single segment.
  • The test stub now numbers windows by their spectrogram content, so a re-decode maps back to the same window.

How was this tested?

  • Tested with audio file(s)
  • Ran existing tests (pytest): 30 passed
  • Tested CLI (vayu audio.mp3)

tests/test_temperature_fallback.py covers:

  • a single temperature means no fallback (batch sizes 1 and 3)
  • only the failing window is re-decoded at 0.2, then 0.4
  • the last result is kept when the schedule runs out
  • silent segments don't fall back
  • the sequential path still walks the schedule

The three batched tests fail on main.

claude-review will fail as on #12 (the repository's CLAUDE_CODE_OAUTH_TOKEN secret, see this comment).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TMXYMqgLAykqRApmbRfpTA


Generated by Claude Code

Batched decoding always decoded at 0.0 and retried failing segments once
at 1.0, whatever temperature the caller passed: temperature=0.0 still
triggered a retry, the default schedule jumped straight to its noisiest
step, and retried results were never re-checked.

decode_batch_with_fallback now walks the same schedule as the one-window
path, re-decoding only the segments that still fail at each step as one
smaller batch. A single temperature means no fallback. The pass/fail
check is shared by both paths.

The test stub now numbers windows by their mel content so a re-decode
maps back to the same window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TMXYMqgLAykqRApmbRfpTA
@CodeWithBehnam
CodeWithBehnam merged commit 2569f55 into main Sep 30, 2026
3 of 4 checks passed
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.

Batched temperature fallback ignores the temperature argument

2 participants