schrodinger.seam.viz.render module

class schrodinger.seam.viz.render.Styler(seam_events: List[schrodinger.seam.runners.events.SeamEvent])

Bases: object

__init__(seam_events: List[schrodinger.seam.runners.events.SeamEvent])
style(transform_id: str) str
class schrodinger.seam.viz.render.ColorByStatusStyler(seam_events: List[schrodinger.seam.runners.events.SeamEvent])

Bases: schrodinger.seam.viz.render.Styler

The nodes will be styled colored based on the inferred status of the transform (e.g. running, completed). The status is based on the stages that the transform has been seen in.

__init__(seam_events: List[schrodinger.seam.runners.events.SeamEvent])
style(transform_id: str, expanded_nodes: List[str]) str
class schrodinger.seam.viz.render.ColorByStageStatusStyler(seam_events: List[schrodinger.seam.runners.events.SeamEvent])

Bases: schrodinger.seam.viz.render.Styler

__init__(seam_events: List[schrodinger.seam.runners.events.SeamEvent])
style(transform_id: str, expanded_nodes: List[str]) str
class schrodinger.seam.viz.render.ColorByLicenseStyler(seam_events: List[schrodinger.seam.runners.events.SeamEvent])

Bases: schrodinger.seam.viz.render.Styler

Implements styling based on the licenses required by the transforms.

The style for a transform is determined by the licenses required by the transform and its subtransforms. The style is a striped rectangle with colors based on the licenses required by the transform. The colors are determined by a hash of the license id. If a transform requires multiple licenses, the colors are combined in a striped pattern.

__init__(seam_events: List[schrodinger.seam.runners.events.SeamEvent])
style(transform_id: str, expanded_nodes) str
class schrodinger.seam.viz.render.PipelineRenderer(pipeline_proto, options, expanded_nodes: Optional[List[str]] = None)

Bases: apache_beam.runners.render.PipelineRenderer

A PipelineRenderer that has a few extensions from the base beam PipelineRender:

  • It can render a pipeline with a subset of the nodes expanded.

  • It can render a pipeline with custom node styles.

  • The rendered graph is clickable and will call a javascript function

    when a node is clicked.

Intended mostly for use with the seam watcher.

__init__(pipeline_proto, options, expanded_nodes: Optional[List[str]] = None)
setStyler(styler: schrodinger.seam.viz.render.Styler)

Sets a callback that will be called to get the style for a transform. The callback should take a transform id and return a string that will be used as the style for that transform.

style(transform_id)
transform_attributes(transform_id)
to_dot()
classmethod userPipelineFromSeamEvents(seam_events: typing.List[schrodinger.seam.runners.events.SeamEvent], expanded_nodes: typing.Optional[typing.List[str]] = None, styler_cls: schrodinger.seam.viz.render.Styler = <class 'schrodinger.seam.viz.render.ColorByStatusStyler'>) str

Renders a pipeline from a list of seam events and returns the dot string. The pipeline will be rendered with the user labels as the nodes.

The rendered graph is clickable and will call a javascript function when a node is clicked.

classmethod stagePipelineFromSeamEvents(seam_events: List[schrodinger.seam.runners.events.SeamEvent])

Renders a pipeline from a list of seam events. The pipeline will be rendered with the stage names as the nodes. The nodes will be colored based on the status of the stage (e.g. running, completed). The rendered graph