nvflare.app_opt.psi.dh_psi.dh_psi_task_handler module

class DhPSITaskHandler(local_psi_id: str)[source]

Bases: TaskHandler

Executor for Diffie-Hellman-based Algorithm PSI.

It handles the communication and FLARE server task delegation User will write an interface local component : PSI to provide client items and get intersection

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.

calculate_intersection(shareable: Shareable)[source]
create_request(shareable: Shareable)[source]
execute_task(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable[source]

Executes a task.

Parameters:
  • task_name – task name

  • shareable – input data

  • fl_ctx – FLContext

  • abort_signal (Signal) – signal to check during execution to determine whether this task is aborted.

Returns:

Output data

get_items()[source]
get_items_size()[source]
initialize(fl_ctx: FLContext)[source]

This is called when client is start Run. At this point the server hasn’t communicated to the local component yet. :param fl_ctx: fl_ctx: FLContext of the running environment

process_request(shareable: Shareable)[source]
setup(shareable: Shareable, client_name: str)[source]
check_items_uniqueness(items)[source]