otf.local_scheduler: Run workflows locally#

A toy local scheduler to demonstrate how to use OTF

otf.local_scheduler.defer(fn, /, *args, **kwargs)#

Schedules fn(*args, **kwargs) to be executed in a separate process.

Must be called from within a Scheduler context.

class otf.local_scheduler.Future(scheduler_id, local_id, task)#

Handle on the result of a deferred computation

class otf.local_scheduler.Scheduler#

Class to run workflows locally.

run(wf, /, *args, **kwargs)#

Run an async workflow.

All the futures (ie: the values we “await” on) must be created via dispatch().

class otf.local_scheduler.Checkpoint(parent, suspension)#
suspension#

A snapshot of the running workflow

Type

Suspension

parent#

The parent step in the computation

Type

Checkpoint

class otf.local_scheduler.Result(parent, value)#

The result of running a workflow

value#

The result of the computation

Type

T

parent#

The parent step in the computation

Type

Checkpoint