You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: run_tests_with_ollama.sh proceeds silently when Ollama warmup times out #759
The run_tests_with_ollama.sh script has a fast path for when it detects an existing Ollama server (lines 82–84), but it blindly trusts that server without verifying it is actually functional. If the existing server is in a bad state, the entire test run fails with Ollama connectivity errors rather than a clear setup failure.
What goes wrong
When the script detects Ollama already running, it skips starting its own server and proceeds directly to model pulls and warmups. If a warmup times out, the script logs a warning but carries on anyway:
Warning: warmup for granite4:micro timed out (will load on first test)
The subsequent tests then error with "could not create OllamaModelBackend: ollama server not running at None" rather than failing fast. The run still takes the full ~80 minutes working through connection timeouts on every affected test before reporting the failures.
Suggested improvements
Treat a warmup timeout as a fatal error rather than a warning — either die() with a clear message or attempt to restart the server
When reusing an existing server, verify it is responsive with a lightweight check (e.g. ollama ps) before proceeding to warmups
Consider adding a --force-restart-ollama flag for environments where stale servers are common
Context
Encountered during a manual cluster test run on an IBM LSF p-series GPU node (preemptable queue). The node had a stale Ollama server from a previous session that was running but unresponsive. Re-running after confirming no Ollama process was running produced a clean result.
Checked current main (2026-04-20) — partially addressed by PR #765 and subsequent script work, but not fully resolved.
Fixed: the root cause of the original reported failure (stale unresponsive server). The renamed script (test/scripts/run_tests_with_ollama_and_vllm.sh) now does a curl .../api/tags health check before reusing an existing server, so a non-responsive Ollama process is no longer silently trusted. OLLAMA_EXTERNAL=1 and OLLAMA_SKIP_WARMUP=1 env guards were also added.
Still open: a warmup timeout is still logged as a warning (Warning: warmup for $model timed out) rather than treated as a fatal error. The --force-restart-ollama flag was not added.
@avinash2692 I just posted an updated status from Claude, but I'm unsure if the remaining items are actionable or if just want to close this as fixed with what we have since the core issue was already addressed
@ajbozarth : I think this should be solved in the current version of the file.
When reusing an existing server, verify it is responsive with a lightweight check (e.g. ollama ps) before proceeding to warmups
This is being done using a curl to /api/tags to get a quick health check of the server before the tests run. The timeout during the warmup is just a warning cause --max-time there is set to 120 for now (just to avoid hangups). This might slowdown the first pytest but the pytest timeout is set to a higher number (800 I think) so we should be good with the warmup happening there.
Happy to close this and mark this as fixed. We can revisit if some edge case was looked over.
Activity
ajbozarth commentedon Mar 27, 2026
cc @avinash2692
ajbozarth commentedon Mar 27, 2026
found when testing #742
ajbozarth commentedon Mar 31, 2026
@avinash2692 did #765 fix this? should it be closed?
ajbozarth commentedon Apr 20, 2026
Updated status from Claude:
Checked current
main(2026-04-20) — partially addressed by PR #765 and subsequent script work, but not fully resolved.Fixed: the root cause of the original reported failure (stale unresponsive server). The renamed script (
test/scripts/run_tests_with_ollama_and_vllm.sh) now does acurl .../api/tagshealth check before reusing an existing server, so a non-responsive Ollama process is no longer silently trusted.OLLAMA_EXTERNAL=1andOLLAMA_SKIP_WARMUP=1env guards were also added.Still open: a warmup timeout is still logged as a warning (
Warning: warmup for $model timed out) rather than treated as a fatal error. The--force-restart-ollamaflag was not added.ajbozarth commentedon Apr 20, 2026
@avinash2692 I just posted an updated status from Claude, but I'm unsure if the remaining items are actionable or if just want to close this as fixed with what we have since the core issue was already addressed
avinash2692 commentedon Apr 21, 2026
@ajbozarth : I think this should be solved in the current version of the file.
This is being done using a curl to
/api/tagsto get a quick health check of the server before the tests run. The timeout during the warmup is just a warning cause--max-timethere is set to120for now (just to avoid hangups). This might slowdown the first pytest but the pytest timeout is set to a higher number (800I think) so we should be good with the warmup happening there.Happy to close this and mark this as fixed. We can revisit if some edge case was looked over.