vertebrae.execution.base

Execution backend protocol and benchmark execution errors.

Exceptions

BenchmarkExecutionError

Failure raised by an artifact-backed benchmark stage.

Classes

ExecutionBackend

Protocol for local or distributed execution backends.

Module Contents

class vertebrae.execution.base.ExecutionBackend[source]

Bases: Protocol

Protocol for local or distributed execution backends.

submit(fn, job)[source]

Submit a single job and return a backend-specific handle.

Parameters:
  • fn (Callable[[Any], Any])

  • job (Any)

Return type:

Any

gather(handles)[source]

Collect submitted job results in handle order.

Parameters:

handles (Iterable[Any])

Return type:

List[Any]

status(handle)[source]

Return a backend-specific job status string.

Parameters:

handle (Any)

Return type:

str

map(fn, jobs)[source]

Map a callable over jobs while preserving input order.

Parameters:
  • fn (Callable[[Any], Any])

  • jobs (Iterable[Any])

Return type:

List[Any]

exception vertebrae.execution.base.BenchmarkExecutionError(backend, stage, job_identity, cause)[source]

Bases: RuntimeError

Failure raised by an artifact-backed benchmark stage.

Parameters:
  • backend (Any)

  • stage (str)

  • job_identity (str)

  • cause (Exception)