Coordinator¶
Coordinator.
-
class
Coordinator
(strategy, cluster)[source]¶ Bases:
object
Coordinator is responsible for running user code on a cluster.
Has one main method, launch_clients, which runs the user’s code on every node of the cluster. Since all we pass to each worker are their worker id and the distribution strategy, this means that each worker will do its own full graph transformation based on the strategy. Then the workers will sync up when they run the graphs.
join is called by atexit so that we can try to make sure the remote processes are killed with the chief’s process is ended.