schrodinger.seam.yaml.decorators module¶
- schrodinger.seam.yaml.decorators.yaml_transform(cls: Optional[Type[PTransform]] = None, *, name: Optional[str] = None) Union[Type[PTransform], Callable[[Type[PTransform]], Type[PTransform]]]¶
Decorator to register a PTransform for use in SEAM YAML pipelines.
Decorated transforms are automatically discovered by the SEAM YAML provider system and made available for use in YAML pipeline definitions.
Example usage:
@yaml_transform(name="LigFilter") class FilterLigands(PTransformWithConfig): ... @yaml_transform # Uses class name as YAML name class MyTransform(beam.PTransform): ...
- Parameters:
cls – The transform class (when used without parentheses).
name – Optional custom name for the transform in YAML. If not provided, the class name is used.
- Returns:
The decorated class (unchanged, but registered in the YAML registry).
- schrodinger.seam.yaml.decorators.get_yaml_transforms() Dict[str, Type[PTransform]]¶
Get all registered YAML transforms.
This function is called by the SEAM YAML provider system to discover transforms that have been decorated with @yaml_transform.
- Returns:
Dictionary mapping YAML names to transform classes.
- class schrodinger.seam.yaml.decorators.SchemadStructureWrapper(ptransform_instance, input_field='structure', output_field='structure')¶
Bases:
PTransformWrapper PTransform for applying Structure-based transforms to Beam Rows.
This is used by legacy Row-based transforms that need to extract a Structure from a Row field, process it, and put it back into a Row.
For new transforms, prefer working directly with Structure objects using the @yaml_transform decorator.
- ROW_METADATA_FIELD = 's_seam_row_metadata'¶
- __init__(ptransform_instance, input_field='structure', output_field='structure')¶
- expand(pcoll: PCollection)¶