Repository navigation
fix(nightly): stop the macOS nightly dying in the Qwen stage on a runner short of memory - #339
Conversation
…requests room On GitHub's macOS runner the fp32 recognizer sat in swap through the Qwen stage, and a FLEURS request crossing the app's 120 s limit twice ended the night with no summary on three nights. The nightly frees the recognizer, notes the process memory before and after, gives each clip 600 s, and logs any restart with its reason.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe nightly evaluation configures Qwen request timeouts and logging. It also moves FLEURS scoring and performance measurements into a stage, then releases the loaded models and records process memory. ChangesNightly evaluation
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change only affects the nightly evaluation script. It raises the Qwen request timeout and frees model memory after the FLEURS stage, which should reduce macOS runner timeouts. No merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…S night's slow Qwen requests (#352) The macOS nightly is red again (#349, run 37606036081). The Qwen stage gave up with `qwen3-asr-1.7b is unavailable: The operation timed out.` #339 gave FLEURS requests 600 s, and the night still died. ## Why #339 did not help The request that fails is not a FLEURS clip. It is in the long unit, which already had a 30-minute limit. The order of `llama-server … exited` lines in the log shows this. The stage stops four servers in order (the 150-request run, the default-cache control, the long unit cut into pieces, the long unit uncut). On every red night the failure comes after the first two: | run | control server stopped | first failure | gave up | |---|---|---|---| | 37111994427 (10-03) | 10:22:23 | 10:33:27 | 10:39:44 (+377 s) | | 37296356046 (10-05) | 11:43:03 | 11:51:58 | 11:58:16 (+378 s) | | 37448592189 (10-06) | 11:57:22 (the cut long unit passed, 12:02:43) | 12:13:15 | 12:19:34 (+379 s) | | 37606036081 (10-07, with #339) | 12:00:48 | 12:11:35 | 12:17:56 (+381 s) | The retry fails between 377 and 381 s after the restart on every night. That is a fixed clock, and none of the engine's limits (120, 600 or 1,800 s) matches it. The clock is Bun's own. `fetch` gives up on a response that sends nothing for about 360 s. On Bun 1.4.2 a request to a server that answers after 420 s failed with `TimeoutError: The operation timed out.` after 360.3 s, with a 0 MB body and with a 12 MB one, even though its `AbortSignal.timeout` was 1,800 s. That is the same message an `AbortSignal` timeout gives. #339's check waited 330 s, which is under the limit. llama-server sends nothing until the whole answer is ready. A long-unit request on the 3-core runner can take more than 6 minutes. The retry then gives up after about 15 s of model load plus 360 s. A llama-server start of Qwen3-ASR-1.7B Q8_0 reached `/health` in 13 to 16 s on an Apple silicon Mac that was short of memory. ## The fix - `QwenEngine` passes `timeout: false` to `fetch`. The caller's `timeoutMs` and its abort signal are now the only clocks on a request. The app's 120 s default does not change, so a dictation or a call's final pass behaves as before. Only a limit above 360 s (the nightly's 600 s and 30 minutes) now holds for its full length. - The macOS leg's job limit goes from 150 to 200 minutes, and the Linux and Windows legs keep 150. A passing night took 128 minutes, and on 10-07 the long unit started 15 minutes later than on that night. Once the slow requests can finish, the old limit would end the night before the dictation stage. - `QWEN_GATE.requestMs`'s comment no longer says FLEURS requests ended those nights. There is no retry and no "unavailable on this runner" verdict. A real hang still fails at the engine's own limit, and a restart still fails the `restarts` row. ## Evidence - New test, `a request waits its whole timeoutMs`: the engine runs in a child process with `BUN_CONFIG_HTTP_IDLE_TIMEOUT=1`, which makes Bun give up on a silent response after about 8 s, against a fake llama-server that answers after 10 s. Before the fix it failed with the night's own error: `qwen3-asr-1.7b is unavailable: The operation timed out.` after 16.1 s, once per attempt. With the fix it passes in 10.3 s, with one request. - The 18 test files that use the fake llama-server or the Qwen engine: 220 pass, 0 fail. `check:static` is clean. - A full night on this branch is running: https://github.com/GeiserX/akou/actions/runs/37677751848 Refs #349. The `report` job closes it on the next green night on main.
On GitHub's macOS runner the nightly died in the Qwen stage on three of the last four nights (runs 37111994427, 37296356046 and 37448592189) with
qwen3-asr-1.7b is unavailable: The operation timed out. The night printed no summary and uploaded no latency table.What the runs show:
qwenRun, which uses the app's 120 s limit. The long-unit requests have 1,800 s, and the failing stage ended about 6 minutes after the previous server stopped. I ruled out a hidden 300 s limit in Bun'sfetch: on Bun 1.4.2 a request to a server that waits 330 s gets its answer, both in-process and from a separate process with a 12 MB body.qwenRunand the long units passed nolog.The fix, all in
scripts/eval/nightly.ts:fleursStage, and the recognizer is released (models.release()) before the next stage. A note records this process's memory before and after.QWEN_GATE.requestMs). The stage gates memory, WER and silence, not wall-clock time. The app's 120 s default is unchanged. A restart on the main server still fails therestartsrow.Evidence, dispatch 37554382699 on this branch (full night):
parakeet-tdt-0.6b-v3-fp32 let go before the next stage: this process at 3079 MB, then 83 MB,restarts.qwen3-asr-1.7b0, and all 39 rows ok.The macOS leg took about 2 h 8 min of its 150 min timeout.
Summary by CodeRabbit