schrodinger.seam.examples.haystack module

A pedagogical example workflow to demonstrate how logging and works with seam.

The workflow creates a collection of strings, most of which are “haystalk” and a few of which are “needle”. The workflow then processes each item in the collection, sleeping for a fixed amount of time for each “haystalk”/”needle” and aggregating them into lists.

To get a sense of how logging works, run this example and read the README found in the generated “seam/logs” directory.

Basic usage (est. walltime: 1m)

$SCHRODINGER/run seam_example.py haystack

Parallelized usage with jobserver (est. walltime: 5m)

$SCHRODINGER/run seam_example.py haystack –per-stalk-sleep-time 0.001 -HOST localhost:8

schrodinger.seam.examples.haystack.parse_args(args)
class schrodinger.seam.examples.haystack.Bale(sleep_per_item: float, error_on_needle: bool)

Bases: schrodinger.seam.examples.haystack.Bale

A DoFn that aggregates elements into lists and sleeps for a fixed amount of time per element.

finish_bundle()

Called after a bundle of elements is processed on a worker.

schrodinger.seam.examples.haystack.main(args=None)