• Docs >
  • worker.coordinator.comm_coordinator
Shortcuts

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

__del__() None[source]
Overview:

__del__ method will close the coordinator interactor

__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 coordinator

  • callback_fn (Dict[str, Callable]): The callback functions given by coordinator

  • logger (logging.Logger): The text logger.

close() None[source]
Overview:

close the coordinator interactor

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

send_learner_task(learner_task: dict) bool[source]
Overview:

send the learner_task to learner_task threads and execute

Arguments:
  • learner_task (dict): the learner_task to send

start() None[source]
Overview:

start the coordinator interactor and manage resources and connections