stormlog.infer.vllm_execution_import

Import a vLLM execution-hook log into an inference artifact.

The artifact’s infer.artifact record supplies the run and session; its infer.request records supply the X-Request-Id values the reducer binds to; its phase and trace windows let foreign-only iterations be placed; and the entities it already holds, with the high-water marks of earlier imports, keep a re-import from writing anything twice. The reduced records are appended through append_inference_capture as an engine adapter’s capture. The raw log itself is never registered as an attachment: it names other clients’ requests.

Functions

execution_foreign_schemes(records)

How each epoch's other clients were written by earlier imports.

execution_high_water(records)

The highest sequence each epoch was imported to, from earlier imports.

flush_execution_log(directory, *[, ...])

Ask every live epoch's writer to seal its open segment, and wait for proof that it did: the flush file gone, or a record written after the request (a heartbeat comes every second).

import_execution_into_artifact(artifact, ...)

Append the log's new, final iterations to artifact; return the capture.

record_failed_execution_import(artifact, ...)

Record that the log was configured but could not be imported.

reduce_to_capture(read, facts[, options])

Reduce a read log into an engine capture for append_inference_capture.

run_facts_from_records(records, run_id, ...)

What an artifact's records tell the reducer about the run.

stormlog.infer.vllm_execution_import.execution_foreign_schemes(records)[source]

How each epoch’s other clients were written by earlier imports.

Parameters:

records (Iterable[CorrelationEvent | LegacyInferenceRecord])

Return type:

dict[str, str]

stormlog.infer.vllm_execution_import.execution_high_water(records)[source]

The highest sequence each epoch was imported to, from earlier imports.

Parameters:

records (Iterable[CorrelationEvent | LegacyInferenceRecord])

Return type:

dict[str, int]

stormlog.infer.vllm_execution_import.flush_execution_log(directory, *, timeout_seconds=10.0, poll_seconds=0.25, importer=None, sleep=<built-in function sleep>, clock=<built-in function monotonic>)[source]

Ask every live epoch’s writer to seal its open segment, and wait for proof that it did: the flush file gone, or a record written after the request (a heartbeat comes every second). Ended epochs need no flush; an epoch whose liveness cannot be judged from here is asked like a live one.

Parameters:
  • directory (str | Path)

  • timeout_seconds (float)

  • poll_seconds (float)

  • importer (Importer | None)

  • sleep (Callable[[float], None])

  • clock (Callable[[], float])

Return type:

dict[str, Any]

stormlog.infer.vllm_execution_import.import_execution_into_artifact(artifact, directory, *, raw_foreign_ids=False, envelope_path=None, importer=None, server_stopped=False)[source]

Append the log’s new, final iterations to artifact; return the capture.

The capture’s summary, recorded on the engine adapter’s capability event, carries each epoch’s high-water mark, which the next import starts from. server_stopped says the server that wrote the log is no longer running, so an epoch without goodbye is gone and its pending steps are final; without it, an epoch whose liveness cannot be judged from here (another host or boot) keeps them for a later import.

Parameters:
  • artifact (str | Path)

  • directory (str | Path)

  • raw_foreign_ids (bool)

  • envelope_path (str | Path | None)

  • importer (Importer | None)

  • server_stopped (bool)

Return type:

EngineCapture

stormlog.infer.vllm_execution_import.record_failed_execution_import(artifact, directory, error, *, envelope_path=None)[source]

Record that the log was configured but could not be imported.

The engine adapter’s capability event then says what was supported and that nothing was collected, with the error in its summary, so the analysis reports partial coverage rather than an absent component.

Parameters:
  • artifact (str | Path)

  • directory (str | Path)

  • error (str)

  • envelope_path (str | Path | None)

Return type:

EngineCapture

stormlog.infer.vllm_execution_import.reduce_to_capture(read, facts, options=None)[source]

Reduce a read log into an engine capture for append_inference_capture.

Parameters:
Return type:

EngineCapture

stormlog.infer.vllm_execution_import.run_facts_from_records(records, run_id, session_id)[source]

What an artifact’s records tell the reducer about the run.

Parameters:
Return type:

RunFacts