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


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.



View source

Returns True if the main task management thread has exited.

RuntimeError If done called without entering the task manager context.


View source

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

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


View source

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


View source


View source