flip.utils
FLIP Utilities module containing helper functions.
- Exports:
Utils: Utility class with static helper methods
get_model_weights_diff: Compute weight differences for federated updates
Submodules
Classes
Utility class with static helper methods. |
Functions
|
Compute the weights differences to send a weight update. |
Package Contents
- flip.utils.get_model_weights_diff(original_weights: collections.OrderedDict, new_weights: collections.OrderedDict, iterations: int) nvflare.apis.dxo.DXO
Compute the weights differences to send a weight update.
- Parameters:
original_weights (OrderedDict) – weights coming from the server (before training)
new_weights (OrderedDict) – weights coming out of the server (post training)
iterations (int) – number of iterations
- Returns:
DXO containing the weight updates for the server.
- Return type:
DXO
- class flip.utils.Utils
Utility class with static helper methods.
- static is_valid_uuid(val: Any) bool
Check if a value is a valid UUID.
- Parameters:
val – Value to check (will be converted to string)
- Returns:
True if valid UUID, False otherwise
- Return type:
bool
- static is_string_empty(val: str) bool
Check if a string is empty or contains only whitespace.
- Parameters:
val – String to check
- Returns:
True if empty or whitespace-only, False otherwise
- Return type:
bool