nvflare.apis.fl_context module¶
- class FLContext[source]¶
Bases:
object
Init the FLContext.
The FLContext is used to passed data between FL Components. It can be thought of as a dictionary that stores key/value pairs called props (properties).
- Visibility: private props are only visible to local components,
public props are also visible to remote components
- Stickiness: sticky props become available in all future FL Contexts,
non-sticky props will only be available in the current FL Context
- MASK_PRIVATE = 2¶
- MASK_STICKY = 1¶
- class FLContextManager(engine, identity_name: str, job_id: str, public_stickers, private_stickers)[source]¶
Bases:
object
FLContextManager manages the creation and updates of FLContext objects for a run.
NOTE: The engine may create a new FLContextManager object for each RUN!
Init the FLContextManager.
- Parameters
engine – the engine that created this FLContextManager object
identity_name (str) – identity name
job_id – the job id
public_stickers – public sticky properties that are copied into or copied from
private_stickers – private sticky properties that are copied into or copied from