nvflare.edge.assessors.num module

class NumAssessor(num_updates_for_model, max_model_version, max_model_history, device_selection_size, min_hole_to_fill=1, device_reuse=True)[source]

Bases: Assessor

Init FLComponent.

The FLComponent is the base class of all FL Components. (executors, controllers, responders, filters, aggregators, and widgets are all FLComponents)

FLComponents have the capability to handle and fire events and contain various methods for logging.

assess(fl_ctx: FLContext) Assessment[source]

This is called by SAGE to assess the situation of the current task, and decides whether the task should continue to run.

Note: the fl_ctx contains task info that could be used to make assessment.

Parameters:

fl_ctx – FLContext object

Returns: an Assessment value.

process_child_update(update: ~nvflare.apis.shareable.Shareable, fl_ctx: ~nvflare.apis.fl_context.FLContext) -> (<class 'bool'>, typing.Optional[nvflare.apis.shareable.Shareable])[source]
start_task(fl_ctx: FLContext) Shareable[source]

This is called by SAGE at the start of a task.

Parameters:

fl_ctx – FLContext object

Returns: task data to be sent to clients