SealedRun

SealedRun#

class SealedRun#

Immutable view of a closed Run in an Experiment.

SealedRun exposes run-level attachments by name and the sequence of Solve records created by Run.log_solve. The status property is "finished", "failed", or "interrupted" depending on how the Run was closed.

__repr__() str#
attachment_media_type(name: str) str#

OCI media type of a run-level attachment.

get_attachment(name: str) Any#

Read a run-level attachment by name.

The returned Python object is decoded from the attachment media type.

get_blob(name: str) bytes#

Read raw bytes of a run-level attachment by name.

get_instance(name: str) Instance#

Read an Instance run-level attachment by name.

get_json(name: str) Any#

Read a JSON run-level attachment by name.

get_parametric_instance(name: str) ParametricInstance#

Read a ParametricInstance run-level attachment by name.

get_sample_set(name: str) SampleSet#

Read a SampleSet run-level attachment by name.

get_solution(name: str) Solution#

Read a Solution run-level attachment by name.

get_with_codec(codec: type[AttachmentCodec[T]], name: str) T#

Read a run-level attachment by name and decode it with a codec.

The codec class must provide media_type, encode(value) -> bytes, and decode(bytes) -> object. This method validates the stored media type against the codec before decoding.

write_attachment(name: str, path: str | PathLike | Path, overwrite: bool = False) Path#

Write a run-level attachment to a filesystem path.

If path names an existing directory, the attachment filename stored by log_file is used inside that directory. Otherwise path is treated as the destination file path.

property attachment_names: list[str]#

Read-only property.

Names of run-level attachments.

property run_id: int#

Read-only property.

Integer identifier of this run within its Experiment.

property solves: list[Solve]#

Read-only property.

Solve records logged in this run, ordered by solve_id.

property status: str#

Read-only property.

Run lifecycle status: "finished", "failed", or "interrupted".

property trace: Optional[TraceResult]#

Read-only property.

Stored trace for this run, or None when this run was recorded without trace storage.