Client¶
- class Client[source]¶
Bases :
ABC
Abstract base class for Flower clients.
Methods
evaluate
(ins)Evaluate the provided parameters using the locally held dataset.
fit
(ins)Refine the provided parameters using the locally held dataset.
Get the run context from this client.
get_parameters
(ins)Return the current local model parameters.
get_properties
(ins)Return set of client's properties.
set_context
(context)Apply a run context to this client.
Return client (itself).
Attributes
Getter for Context client attribute.
- evaluate(ins: EvaluateIns) EvaluateRes [source]¶
Evaluate the provided parameters using the locally held dataset.
- Paramètres:
ins (EvaluateIns) – The evaluation instructions containing (global) model parameters received from the server and a dictionary of configuration values used to customize the local evaluation process.
- Renvoie:
The evaluation result containing the loss on the local dataset and other details such as the number of local data examples used for evaluation.
- Type renvoyé:
- fit(ins: FitIns) FitRes [source]¶
Refine the provided parameters using the locally held dataset.
- Paramètres:
ins (FitIns) – The training instructions containing (global) model parameters received from the server and a dictionary of configuration values used to customize the local training process.
- Renvoie:
The training result containing updated parameters and other details such as the number of local training examples used for training.
- Type renvoyé:
- get_parameters(ins: GetParametersIns) GetParametersRes [source]¶
Return the current local model parameters.
- Paramètres:
ins (GetParametersIns) – The get parameters instructions received from the server containing a dictionary of configuration values.
- Renvoie:
The current local model parameters.
- Type renvoyé:
- get_properties(ins: GetPropertiesIns) GetPropertiesRes [source]¶
Return set of client’s properties.
- Paramètres:
ins (GetPropertiesIns) – The get properties instructions received from the server containing a dictionary of configuration values.
- Renvoie:
The current client properties.
- Type renvoyé: