Description
Under sustained load on a 32GB M1 Mac with granite4:micro, generate_from_raw occasionally returns ModelOutputThunk(value="") for one or more of its parallel requests — not due to a caught exception, but as a legitimate empty response from Ollama itself.
Evidence: In a 20-run soak test, 18/20 runs had at least one empty result. The FancyLogger.warning added in #598 did not fire during these runs, confirming the empty string was Ollama's actual response, not a swallowed exception.
Current behaviour
generate_from_raw uses asyncio.gather(return_exceptions=True), so non-exception empty responses pass through silently. Tests now use assert all(r.value for r in results) to surface this clearly (added in #598).
Suspected causes
- Machine exhaustion — 32GB M1 running other workloads, Ollama NUM_PARALLEL≥4 with 4.6GB model, context auto-capped at 32K. May not reproduce on idle/cold machine.
- Ollama bug — server returns empty body for some requests at high concurrency, not reflecting a real OOM or timeout.
Next steps
Related
/label bug, ollama
Description
Under sustained load on a 32GB M1 Mac with
granite4:micro,generate_from_rawoccasionally returnsModelOutputThunk(value="")for one or more of its parallel requests — not due to a caught exception, but as a legitimate empty response from Ollama itself.Evidence: In a 20-run soak test, 18/20 runs had at least one empty result. The
FancyLogger.warningadded in #598 did not fire during these runs, confirming the empty string was Ollama's actual response, not a swallowed exception.Current behaviour
generate_from_rawusesasyncio.gather(return_exceptions=True), so non-exception empty responses pass through silently. Tests now useassert all(r.value for r in results)to surface this clearly (added in #598).Suspected causes
Next steps
CONTEXT_WINDOW: 2048(added in test: fix flaky ollama tests, remove stale xfails, add diagnostic logging #598) reduces or eliminates the issuetimeoutonOllamaModelBackend.__init__so tests can set a ceilingRelated
generate_from_raw(removereturn_exceptions=True)/label bug, ollama