schrodinger.seam.testing.preemption module¶
Script to stress-test the pre-emption recovery capabilities of the SeamRunner
$ $SCHRODINGER/run seam_example.py rescount –per-residue-cpu-time 5 -HOST localhost JobId: 3401dbc8-453a-11f0-ab3a-0e12ef37faee
# This will simulate pre-emption events for all SubJobs of 3401dbc8 $ $SCHRODINGER/run preemption.py 3401dbc8-453a-11f0-ab3a-0e12ef37faee
- class schrodinger.seam.testing.preemption.SubJobPreEmptionSimulator(driver_job_id: str, period: Optional[timedelta] = None, chance: float = 0.5, termination_check: Optional[Callable[[], bool]] = None)¶
Bases:
object
Simulate pre-emption events for sub-jobs of a given driver job.
- __init__(driver_job_id: str, period: Optional[timedelta] = None, chance: float = 0.5, termination_check: Optional[Callable[[], bool]] = None)¶
- Parameters:
driver_job_id – JobID of the driver job
period – Time interval between preemption events (default is 30 seconds)
chance – Probability of preemption occurring at each interval (default is 0.5)
termination_check – A callable that returns True when the simulator should stop
- start()¶
- static nodefail(job_id: str)¶
- schrodinger.seam.testing.preemption.get_parser() ArgumentParser ¶
- schrodinger.seam.testing.preemption.main(args: list[str] | None = None)¶