schrodinger.seam.reporting.pipeline_snapshot module¶
Load and query recorded Seam pipelines and their output counts.
- class schrodinger.seam.reporting.pipeline_snapshot.PipelineSnapshot(pipeline_proto: Pipeline, output_counts: dict[str, int])¶
Bases:
objectIndexes a recorded pipeline’s transforms, leaf producers, and counts.
- __init__(pipeline_proto: Pipeline, output_counts: dict[str, int])¶
- classmethod fromSeamDir(seam_dir: schrodinger.seam.runners._seamdir.SeamDir | pathlib.Path | str) Self¶
Load a snapshot from a completed Seam run.
- Parameters:
seam_dir – completed Seam run directory
- Raises:
ValueError – if the run did not complete successfully
- walkTransforms() Iterator[PTransform]¶
Yield transforms in canonical root and subtransform order.
- getTransform(unique_name: str) org.apache.beam.model.pipeline.v1.beam_runner_api_pb2.PTransform | None¶
- static getDisplayData(transform: PTransform, key: str) str | None¶
Return a labelled display-data string value by key.
- resolveCountedOutput(unique_name: str, output_tag: str | None = None) str¶
Resolve one transform output to its unique counted leaf producer.
An explicit
output_tagselects that output. Otherwise, the sole output or Beam’s untagged default output is selected. A transform with multiple tagged outputs and no untagged default requires an explicit tag. Within the selected transform’s subtree, the PCollection must have exactly one leaf producer in the snapshot’s output counts. Leaves belonging to downstream transforms are not candidates.- Raises:
ValueError – if the transform or output does not exist, output selection is ambiguous, or the selected PCollection does not have exactly one counted leaf producer
- getPCollectionCount(pcoll_id: str) int | None¶
Return a PCollection’s count when it has one counted leaf producer.