nvflare.apis.impl.bcast_manager module
- class BcastForeverTaskManager[source]
Bases:
TaskManagerTask manager for broadcast controller with forever waiting time.
- check_task_exit(task: Task) Tuple[bool, TaskCompletionStatus][source]
Determine whether the task should exit.
- Parameters:
task (Task) – an instance of Task
- Tuple[bool, TaskCompletionStatus]:
first entry in the tuple means whether to exit the task or not. If it’s True, the task should exit. second entry in the tuple indicates the TaskCompletionStatus.
- check_task_send(client_task: ClientTask, fl_ctx: FLContext) TaskCheckStatus[source]
Determine whether the task should be sent to the client.
- Parameters:
client_task (ClientTask) – the task processing state of the client
fl_ctx (FLContext) – fl context that comes with the task request
- Returns:
NO_BLOCK for not sending the task, SEND for OK to send
- Return type:
TaskCheckStatus
- class BcastTaskManager(task: Task, min_responses: int = 0, wait_time_after_min_received: int = 0)[source]
Bases:
TaskManagerTask manager for broadcast controller.
- Parameters:
task (Task) – an instance of Task
min_responses (int, optional) – the minimum number of responses so this task is considered finished. Defaults to 0.
wait_time_after_min_received (int, optional) – additional wait time for late clients to contribute their results. Defaults to 0.
- check_task_exit(task: Task) Tuple[bool, TaskCompletionStatus][source]
Determine if the task should exit.
- Parameters:
task (Task) – an instance of Task
- Tuple[bool, TaskCompletionStatus]:
first entry in the tuple means whether to exit the task or not. If it’s True, the task should exit. second entry in the tuple indicates the TaskCompletionStatus.