Questions about TFX? Join us at Google I/O!

tfx.orchestration.experimental.core.task_manager.TaskManager

TaskManager acts on the tasks fetched from the task queues.

TaskManager instance can be used as a context manager:

mlmd_handle ML metadata db connection.
task_queue Task queue.
max_active_task_schedulers Maximum number of task schedulers that can be active at once.
max_dequeue_wait_secs Maximum time to wait when dequeuing if the queue is empty.
process_all_queued_tasks_before_exit All existing items in the queues are processed before exiting the context manager. This is useful for deterministic behavior in tests.

Methods

done

View source

Returns True if the main task management thread has exited.

Raises
RuntimeError If done called without entering the task manager context.

exception

View source

Returns exception raised by the main task management thread (if any).

Raises
RuntimeError If exception called without entering the task manager context or if the main thread is not done (done returns False).

last_mlmd_publish_time

View source

Returns time-since-epoch of last MLMD publish; None if never published.

__enter__

View source

__exit__

View source