tfx.orchestration.experimental.core.task_scheduler.TaskScheduler

Interface for task schedulers.

mlmd_handle A handle to the MLMD db.
pipeline The pipeline IR proto.
task Task to be executed.

Methods

cancel

View source

Cancels task scheduler.

This method will be invoked from a different thread than the thread that's blocked on call to schedule. cancel must return immediately when called. Upon cancellation, schedule method is expected to stop any ongoing work, clean up and return as soon as possible.

schedule

View source

Schedules task execution and returns the results of execution.

This method blocks until task execution completes (successfully or not) or until explicitly cancelled by a call to cancel. When cancelled, schedule is expected to stop any ongoing work, clean up and return as soon as possible. Note that cancel will be invoked from a different thread than schedule and hence the concrete implementations must be thread safe.