nvflare.app_opt.tracking.wandb.wandb_receiver module

class WandBReceiver(wandb_args: dict, mode: str = 'offline', events: List[str] | None = None, process_timeout: float = 10.0)[source]

Bases: AnalyticsReceiver

Receives analytic data.

Parameters:

events (optional, List[str]) – A list of event that this receiver will handle.

finalize(fl_ctx: FLContext)[source]

Called at EventType.END_RUN.

Parameters:

fl_ctx (FLContext) – the FLContext

get_task_queue(record_origin)[source]
initialize(fl_ctx: FLContext)[source]

Initializes the receiver.

Called after EventType.START_RUN.

Parameters:

fl_ctx (FLContext) – fl context.

save(fl_ctx: FLContext, shareable: Shareable, record_origin: str)[source]

Saves the received data.

Specific implementations of AnalyticsReceiver will implement save in their own way.

Parameters:
  • fl_ctx (FLContext) – fl context.

  • shareable (Shareable) – the received message.

  • record_origin (str) – the sender of this message / record.

class WandBTask(task_owner, task_type, task_data, step)[source]

Bases: NamedTuple

Create new instance of WandBTask(task_owner, task_type, task_data, step)

step: int

Alias for field number 3

task_data: dict

Alias for field number 2

task_owner: str

Alias for field number 0

task_type: str

Alias for field number 1