declearn.main.utils.aggregate_clients_data_info
Validate and aggregate clients' data-info dictionaries.
This functions wraps declearn.data_info.aggregate_data_info
,
catches KeyError and ValueError and runs further analysis to
identify their cause and raise a custom AggregationError that
stores a general error message and client-wise ones in order
to report on failure causes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clients_data_info |
Dict[str, Dict[str, Any]]
|
Client-wise data-info dict that are to be aggregated. |
required |
required_fields |
Set[str]
|
Optional set of fields to target among provided information. If set, raise if a field is missing from any client, and use only these fields in the returned dict. |
required |
Raises:
Type | Description |
---|---|
AggregationError
|
In case any error is raised when calling |
Returns:
Name | Type | Description |
---|---|---|
data_info |
dict[str, any]
|
Aggregated data specifications derived from individual ones,
with |
Source code in declearn/main/utils/_data_info.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|