flwr-nightly 1.7.0.dev20240119__py3-none-any.whl → 1.7.0.dev20240123__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- flwr/common/configsrecord.py +11 -2
- flwr/common/metricsrecord.py +11 -2
- flwr/common/recordset_compat.py +401 -0
- flwr/common/serde.py +195 -17
- flwr/proto/recordset_pb2.py +68 -0
- flwr/proto/recordset_pb2.pyi +305 -0
- flwr/proto/recordset_pb2_grpc.py +4 -0
- flwr/proto/recordset_pb2_grpc.pyi +4 -0
- flwr/proto/task_pb2.py +16 -23
- flwr/proto/task_pb2.pyi +20 -70
- {flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/METADATA +1 -1
- {flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/RECORD +15 -11
- flwr/common/recordset_utils.py +0 -87
- {flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/entry_points.txt +0 -0
{flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/RECORD
RENAMED
@@ -25,18 +25,18 @@ flwr/client/secure_aggregation/secaggplus_handler.py,sha256=2jKtRhoJaVRmMJgJ2v8V
|
|
25
25
|
flwr/client/typing.py,sha256=75vC6dpzv99PLRztPzaGPik2OifFZbgxvHVDMIA_C30,1219
|
26
26
|
flwr/common/__init__.py,sha256=qttep0POwoigzB5pcraZa4YMt9jsCSfeibcrTQMUjIc,2884
|
27
27
|
flwr/common/address.py,sha256=iTAN9jtmIGMrWFnx9XZQl45ZEtQJVZZLYPRBSNVARGI,1882
|
28
|
-
flwr/common/configsrecord.py,sha256=
|
28
|
+
flwr/common/configsrecord.py,sha256=i41syiXeG4CyWr4ujOCxTDBZKiClNnNgR4xbufxThh0,4799
|
29
29
|
flwr/common/constant.py,sha256=J-BpHv6OFmrA37SeS4En8Nsy7yJdoNJWHCtbdnjIxSc,1120
|
30
30
|
flwr/common/date.py,sha256=UWhBZj49yX9LD4BmatS_ZFZu_-kweGh0KQJ1djyWWH4,891
|
31
31
|
flwr/common/dp.py,sha256=hF45cPElXxcQsh4AoquAyaTrNi0xCrIcKx7xOcV_1XU,1782
|
32
32
|
flwr/common/flowercontext.py,sha256=pC8Vjw9ToNX4i8oMuvSSJrZEccJhPN9i60b1apQnQWE,2562
|
33
33
|
flwr/common/grpc.py,sha256=qVLB0d6bCuaBRW5YB0vEZXsR7Bo3R2lh4ONiCocqwRI,2270
|
34
34
|
flwr/common/logger.py,sha256=qX_gqEyrmGOH0x_r8uQ1Vskz4fGvEij9asdo4DUOPY8,4135
|
35
|
-
flwr/common/metricsrecord.py,sha256=
|
35
|
+
flwr/common/metricsrecord.py,sha256=n9789VVdjEPX0o7Je_1wRuzs7LkLh5d37QRyN0iVmRY,4783
|
36
36
|
flwr/common/parameter.py,sha256=-bFAUayToYDF50FZGrBC1hQYJCQDtB2bbr3ZuVLMtdE,2095
|
37
37
|
flwr/common/parametersrecord.py,sha256=v5RmvJI1Y5iJhgIhdatZj7FItRRuaEmTKkCGDRFPQDU,4413
|
38
38
|
flwr/common/recordset.py,sha256=OeRcBMGqx9vutWRz1xkujBPHlVpU58R1EcFRHEQrePo,2351
|
39
|
-
flwr/common/
|
39
|
+
flwr/common/recordset_compat.py,sha256=6j9NWzb_DJ4RApPnsHtKQnB2jKs-ToUjkSVeTxt3XBI,13611
|
40
40
|
flwr/common/retry_invoker.py,sha256=H_hKqKaEI8vZPywWmoAtJYkcUnKhlYc4kV63zRY0kWA,10856
|
41
41
|
flwr/common/secure_aggregation/__init__.py,sha256=29nHIUO2L8-KhNHQ2KmIgRo_4CPkq4LgLCUN0on5FgI,731
|
42
42
|
flwr/common/secure_aggregation/crypto/__init__.py,sha256=dz7pVx2aPrHxr_AwgO5mIiTzu4PcvUxRq9NLBbFcsf8,738
|
@@ -46,7 +46,7 @@ flwr/common/secure_aggregation/ndarrays_arithmetic.py,sha256=KAHCEHGSTJ6mCgnC8dT
|
|
46
46
|
flwr/common/secure_aggregation/quantization.py,sha256=appui7GGrkRPsupF59TkapeV4Na_CyPi73JtJ1pimdI,2310
|
47
47
|
flwr/common/secure_aggregation/secaggplus_constants.py,sha256=m5UDo7IgRkMS3yixhzz7DhhAv6VAQMCghglMygSPU_k,1606
|
48
48
|
flwr/common/secure_aggregation/secaggplus_utils.py,sha256=PleDyDu7jHNAfbRoEaoQiOjxG6iMl9yA8rNKYTfnyFw,3155
|
49
|
-
flwr/common/serde.py,sha256=
|
49
|
+
flwr/common/serde.py,sha256=WGTBE1uj0iUYLMWFAV-798qJq8ThA9TZf6WvNLQAHXc,24844
|
50
50
|
flwr/common/telemetry.py,sha256=se_-pHgEWcmN09ChSpTeek72l1UJHf7GbwXBB1KXBjQ,7683
|
51
51
|
flwr/common/typing.py,sha256=3Wu6Ol1Ja6Gb0WdlcXVEn1EHYJbc4oRRJA81vEegxBo,4382
|
52
52
|
flwr/common/version.py,sha256=A0MKvyKPrV8wLg0YCAODTqM71v26NEH36c6JYtfgg0o,667
|
@@ -69,8 +69,12 @@ flwr/proto/node_pb2.py,sha256=1zfXEvgGObglIcaVb4SLFmOcHZvA8eHzEtMFM5A6FYY,1081
|
|
69
69
|
flwr/proto/node_pb2.pyi,sha256=aX3BHhgXvJE1rvcRnEE_gB-5GcaFQ0SJ88yTE223bjI,751
|
70
70
|
flwr/proto/node_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
71
71
|
flwr/proto/node_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
72
|
-
flwr/proto/
|
73
|
-
flwr/proto/
|
72
|
+
flwr/proto/recordset_pb2.py,sha256=un8L0kvBcgFXQIiQweOseeIJBjlOozUvQY9uTQ42Dqo,6009
|
73
|
+
flwr/proto/recordset_pb2.pyi,sha256=NPzCJWAj1xLWzeZ_xZ6uaObQjQfWGnnqlLtn4J-SoFY,14161
|
74
|
+
flwr/proto/recordset_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
75
|
+
flwr/proto/recordset_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
76
|
+
flwr/proto/task_pb2.py,sha256=oaDHLj9hNK6Ms8xN5cMQUWXppYErhka8b-DWrgsr4xg,4393
|
77
|
+
flwr/proto/task_pb2.pyi,sha256=RsKe-sLiAPApxf_byX4C0m5rIOIJlX7Nw6fGFP3MpuE,8751
|
74
78
|
flwr/proto/task_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
75
79
|
flwr/proto/task_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
76
80
|
flwr/proto/transport_pb2.py,sha256=cURzfpCgZvH7GEvBPLvTYijE3HvhK1MePjINk4xYArk,9781
|
@@ -137,8 +141,8 @@ flwr/simulation/ray_transport/__init__.py,sha256=FsaAnzC4cw4DqoouBCix6496k29jACk
|
|
137
141
|
flwr/simulation/ray_transport/ray_actor.py,sha256=S_E-7Bk0ONWx12b0ObP3CtzJSEL3yPxpFVcYfkDx6Es,17044
|
138
142
|
flwr/simulation/ray_transport/ray_client_proxy.py,sha256=RziUVY9PmuI8fJEbra-Vk9oWwRxALDZOeF1fAW-a9wg,9430
|
139
143
|
flwr/simulation/ray_transport/utils.py,sha256=e0mkFOgOXSJHSQdiipoggF-DLBXaJZVytx9auQ35fCg,3368
|
140
|
-
flwr_nightly-1.7.0.
|
141
|
-
flwr_nightly-1.7.0.
|
142
|
-
flwr_nightly-1.7.0.
|
143
|
-
flwr_nightly-1.7.0.
|
144
|
-
flwr_nightly-1.7.0.
|
144
|
+
flwr_nightly-1.7.0.dev20240123.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
145
|
+
flwr_nightly-1.7.0.dev20240123.dist-info/METADATA,sha256=XF_ER6sHNCXFEBtGfpBAVv-UiWDsxDuZUgE5J-Vaado,13440
|
146
|
+
flwr_nightly-1.7.0.dev20240123.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
147
|
+
flwr_nightly-1.7.0.dev20240123.dist-info/entry_points.txt,sha256=1uLlD5tIunkzALMfMWnqjdE_D5hRUX_I1iMmOMv6tZI,181
|
148
|
+
flwr_nightly-1.7.0.dev20240123.dist-info/RECORD,,
|
flwr/common/recordset_utils.py
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
# Copyright 2024 Flower Labs GmbH. All Rights Reserved.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
# ==============================================================================
|
15
|
-
"""RecordSet utilities."""
|
16
|
-
|
17
|
-
|
18
|
-
from typing import OrderedDict
|
19
|
-
|
20
|
-
from .parametersrecord import Array, ParametersRecord
|
21
|
-
from .typing import Parameters
|
22
|
-
|
23
|
-
|
24
|
-
def parametersrecord_to_parameters(
|
25
|
-
record: ParametersRecord, keep_input: bool = False
|
26
|
-
) -> Parameters:
|
27
|
-
"""Convert ParameterRecord to legacy Parameters.
|
28
|
-
|
29
|
-
Warning: Because `Arrays` in `ParametersRecord` encode more information of the
|
30
|
-
array-like or tensor-like data (e.g their datatype, shape) than `Parameters` it
|
31
|
-
might not be possible to reconstruct such data structures from `Parameters` objects
|
32
|
-
alone. Additional information or metadta must be provided from elsewhere.
|
33
|
-
|
34
|
-
Parameters
|
35
|
-
----------
|
36
|
-
record : ParametersRecord
|
37
|
-
The record to be conveted into Parameters.
|
38
|
-
keep_input : bool (default: False)
|
39
|
-
A boolean indicating whether entries in the record should be deleted from the
|
40
|
-
input dictionary immediately after adding them to the record.
|
41
|
-
"""
|
42
|
-
parameters = Parameters(tensors=[], tensor_type="")
|
43
|
-
|
44
|
-
for key in list(record.data.keys()):
|
45
|
-
parameters.tensors.append(record.data[key].data)
|
46
|
-
|
47
|
-
if not keep_input:
|
48
|
-
del record.data[key]
|
49
|
-
|
50
|
-
return parameters
|
51
|
-
|
52
|
-
|
53
|
-
def parameters_to_parametersrecord(
|
54
|
-
parameters: Parameters, keep_input: bool = False
|
55
|
-
) -> ParametersRecord:
|
56
|
-
"""Convert legacy Parameters into a single ParametersRecord.
|
57
|
-
|
58
|
-
Because there is no concept of names in the legacy Parameters, arbitrary keys will
|
59
|
-
be used when constructing the ParametersRecord. Similarly, the shape and data type
|
60
|
-
won't be recorded in the Array objects.
|
61
|
-
|
62
|
-
Parameters
|
63
|
-
----------
|
64
|
-
parameters : Parameters
|
65
|
-
Parameters object to be represented as a ParametersRecord.
|
66
|
-
keep_input : bool (default: False)
|
67
|
-
A boolean indicating whether parameters should be deleted from the input
|
68
|
-
Parameters object (i.e. a list of serialized NumPy arrays) immediately after
|
69
|
-
adding them to the record.
|
70
|
-
"""
|
71
|
-
tensor_type = parameters.tensor_type
|
72
|
-
|
73
|
-
p_record = ParametersRecord()
|
74
|
-
|
75
|
-
num_arrays = len(parameters.tensors)
|
76
|
-
for idx in range(num_arrays):
|
77
|
-
if keep_input:
|
78
|
-
tensor = parameters.tensors[idx]
|
79
|
-
else:
|
80
|
-
tensor = parameters.tensors.pop(0)
|
81
|
-
p_record.set_parameters(
|
82
|
-
OrderedDict(
|
83
|
-
{str(idx): Array(data=tensor, dtype="", stype=tensor_type, shape=[])}
|
84
|
-
)
|
85
|
-
)
|
86
|
-
|
87
|
-
return p_record
|
{flwr_nightly-1.7.0.dev20240119.dist-info → flwr_nightly-1.7.0.dev20240123.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|
File without changes
|