worker.coordinator.comm_coordinator¶
CommCoordinator¶
- class ding.worker.coordinator.comm_coordinator.CommCoordinator(cfg: dict, callback_fn: Dict[str, Callable], logger: logging.Logger)[source]¶
- Overview:
the communication part of coordinator(coordinator intercollector)
- Interface:
__init__ , start, close, __del__, send_collector_task, send_learner_task
- __init__(cfg: dict, callback_fn: Dict[str, Callable], logger: logging.Logger) None [source]¶
- Overview:
init the interactor of coordinator
- Arguments:
cfg (
dict
): The config file of communication coordinatorcallback_fn (
Dict[str, Callable]
): The callback functions given by coordinatorlogger (
logging.Logger
): The text logger.
- send_collector_task(collector_task: dict) bool [source]¶
- Overview:
send the collector_task to collector_task threads and execute
- Arguments:
collector_task (
dict
): the collector_task to send