schrodinger.seam.runners.events module¶
Module with events that are created by the Seam pipeline runner.
During a pipeline run, these events will be emitted to an events file in the Seam directory. The events file is a JSON Lines file, where each line is a JSON object with a “urn” (Universal Resource Name) field that identifies the type of event and a “timestamp” field that indicates when the event occurred. The rest of the fields are specific to the event type.
These events can be consumed by other tools to monitor the progress of a pipeline run or to analyze various metrics about the pipeline run.
- class schrodinger.seam.runners.events.Metrics(transform_cputimes, pcoll_counts)¶
Bases:
NamedTuple- transform_cputimes: dict¶
Alias for field number 0
- pcoll_counts: dict¶
Alias for field number 1
- class schrodinger.seam.runners.events.PipelineStatus¶
Bases:
Enum- RUNNING = 'Running'¶
- COMPLETED = 'Completed'¶
- FAILED = 'Failed'¶
- class schrodinger.seam.runners.events.SeamEvent(*args, _param_type=<object object>, **kwargs)¶
Bases:
CompoundParam- URN = None¶
- pipeline_id: str¶
A parameter of the class.
- timestamp: float¶
A parameter of the class.
- classmethod fromJsonImplementation(json_event)¶
Sets the value of this compound param value object from a JSON dict.
Warning
This should never be called directly.
- toJsonImplementation(*args, **kwargs)¶
Returns a JSON representation of this value object.
Warning
This should never be called directly.
- pipeline_idChanged¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idReplaced¶
A
pyqtSignalemitted by instances of the class.
- timestampChanged¶
A
pyqtSignalemitted by instances of the class.
- timestampReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.seam.runners.events.PipelineStarted(*args, _param_type=<object object>, **kwargs)¶
Bases:
SeamEventEvent emitted when a pipeline starts.
- Attributes:
- payloadless_user_pipeline (bytes): The encoded pipeline proto that was
passed to the pipeline runner.
- payloadless_stage_pipeline (bytes): The encoded pipeline proto that was
actually executed. This pipeline has been optimized and is a set of “stages”.
- URN = 'seam:runner_events:PipelineStarted'¶
- payloadless_user_pipeline: bytes¶
A parameter of the class.
- payloadless_stage_pipeline: bytes¶
A parameter of the class.
- payloadless_stage_pipelineChanged¶
A
pyqtSignalemitted by instances of the class.
- payloadless_stage_pipelineReplaced¶
A
pyqtSignalemitted by instances of the class.
- payloadless_user_pipelineChanged¶
A
pyqtSignalemitted by instances of the class.
- payloadless_user_pipelineReplaced¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idChanged¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idReplaced¶
A
pyqtSignalemitted by instances of the class.
- timestampChanged¶
A
pyqtSignalemitted by instances of the class.
- timestampReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.seam.runners.events.PipelineFinished(*args, _param_type=<object object>, **kwargs)¶
Bases:
SeamEventEvent emitted when a pipeline finishes.
- Attributes:
duration (float): The duration of the pipeline run in seconds.
- URN = 'seam:runner_events:PipelineFinished'¶
- duration: float¶
A parameter of the class.
- durationChanged¶
A
pyqtSignalemitted by instances of the class.
- durationReplaced¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idChanged¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idReplaced¶
A
pyqtSignalemitted by instances of the class.
- timestampChanged¶
A
pyqtSignalemitted by instances of the class.
- timestampReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.seam.runners.events.StageStarted(*args, _param_type=<object object>, **kwargs)¶
Bases:
SeamEventEvent emitted when a stage starts.
- URN = 'seam:runner_events:StageStarted'¶
- stage_name: str¶
A parameter of the class.
- pipeline_idChanged¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idReplaced¶
A
pyqtSignalemitted by instances of the class.
- stage_nameChanged¶
A
pyqtSignalemitted by instances of the class.
- stage_nameReplaced¶
A
pyqtSignalemitted by instances of the class.
- timestampChanged¶
A
pyqtSignalemitted by instances of the class.
- timestampReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.seam.runners.events.StageFinished(*args, _param_type=<object object>, **kwargs)¶
Bases:
SeamEventEvent emitted when a stage finishes.
- URN = 'seam:runner_events:StageFinished'¶
- stage_name: str¶
A parameter of the class.
- metrics: ExecutionMetrics¶
A parameter of the class.
- metricsChanged¶
A
pyqtSignalemitted by instances of the class.
- metricsReplaced¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idChanged¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idReplaced¶
A
pyqtSignalemitted by instances of the class.
- stage_nameChanged¶
A
pyqtSignalemitted by instances of the class.
- stage_nameReplaced¶
A
pyqtSignalemitted by instances of the class.
- timestampChanged¶
A
pyqtSignalemitted by instances of the class.
- timestampReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.seam.runners.events.StageFailed(*args, _param_type=<object object>, **kwargs)¶
Bases:
SeamEventEvent emitted when a stage fails.
- URN = 'seam:runner_events:StageFailed'¶
- stage_name: str¶
A parameter of the class.
- error_message: str¶
A parameter of the class.
- error_messageChanged¶
A
pyqtSignalemitted by instances of the class.
- error_messageReplaced¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idChanged¶
A
pyqtSignalemitted by instances of the class.
- pipeline_idReplaced¶
A
pyqtSignalemitted by instances of the class.
- stage_nameChanged¶
A
pyqtSignalemitted by instances of the class.
- stage_nameReplaced¶
A
pyqtSignalemitted by instances of the class.
- timestampChanged¶
A
pyqtSignalemitted by instances of the class.
- timestampReplaced¶
A
pyqtSignalemitted by instances of the class.
- class schrodinger.seam.runners.events.SeamEvents(events_path: Union[str, Path])¶
Bases:
objectA class that encapsulates seam events from a pipeline run.
This class provides methods to access the events and extract useful information such as the user pipeline proto, optimized pipeline proto, metrics, etc.
- __init__(events_path: Union[str, Path])¶
Initialize a SeamEvents object from seam events file.
- iter_events() Iterator[SeamEvent]¶
Iterate over events without loading all of them into memory at once.
- Yields:
SeamEvent objects, one at a time
- get_user_pipeline() Pipeline¶
Get the user pipeline proto that was passed to the pipeline runner.
- get_optimized_pipeline() Pipeline¶
Get the optimized pipeline proto that was actually executed.
- get_pipeline_status() str¶
Get the status of the pipeline run.
- get_duration() float¶
Get the duration of the pipeline run in seconds.
- get_total_cpu_time() float¶
Get the total CPU time used by the pipeline in seconds.