Skip to content

Fail fast when provider has a terminal failure - #300

Merged
undfined merged 5 commits into
mainfrom
undfined/fail-fast
Aug 19, 2026
Merged

undfined merged 5 commits into
mainfrom
undfined/fail-fast

Conversation

@undfined

@undfined undfined commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fail fast when an inference provider enters an unrecoverable state instead of treating each affected request as an independent failure or waiting for results that can no longer arrive.

Changes

  • Classify vLLM EngineDeadError failures—including wrapped exceptions—as terminal provider errors.
  • Propagate terminal errors through chat, batch, concurrent-dispatch, and streaming execution paths.
  • Cancel sibling requests when a terminal failure is detected.
  • Treat the non-zero exit of any inference worker as fatal, even if other workers remain alive.
  • Track pending results by model, task, and instance identity to detect missing, duplicate, or unexpected results.
  • Include unresolved instance counts and a bounded preview in fatal error messages.
  • Preserve results already emitted when batch iteration fails partway through.
  • Prevent metrics-reporting failures from being misreported as inference failures.
  • Keep progress reporting below 100% when a run terminates before completing all instances.

Motivation

Previously, an unrecoverable provider failure could be caught by generic per-request error handling. In streaming mode, asynchronous task failures could also be swallowed. With multiple workers, this could leave the runner processing additional requests or waiting indefinitely for results from a worker that could no longer produce them.

This change makes terminal failures explicit and propagates them to the runner so the evaluation exits promptly with actionable information about unfinished work.

Testing

Added regression coverage for:

  • direct and wrapped vLLM EngineDeadError classification;
  • terminal-error propagation and sibling cancellation in concurrent dispatch;
  • chat and batch processing paths;
  • streaming failure propagation;
  • duplicate and unexpected result detection;
  • pending-instance reporting in fatal errors;
  • detection of a single failed worker while others remain alive;
  • incomplete progress reporting.

@undfined
undfined requested review from YashasSamaga and a lite review from Copilot and removed request for Copilot August 18, 2026 16:52
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.

2 participants