flwr-nightly 1.20.0.dev20250715__py3-none-any.whl → 1.20.0.dev20250717__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flwr/client/grpc_rere_client/connection.py +7 -7
- flwr/client/rest_client/connection.py +8 -7
- flwr/common/{inflatable_grpc_utils.py → inflatable_protobuf_utils.py} +12 -10
- flwr/common/record/array.py +2 -2
- flwr/common/serde.py +0 -28
- flwr/compat/client/app.py +14 -31
- flwr/proto/appio_pb2.py +18 -22
- flwr/proto/appio_pb2.pyi +21 -22
- flwr/proto/clientappio_pb2.py +12 -31
- flwr/proto/clientappio_pb2.pyi +0 -142
- flwr/proto/clientappio_pb2_grpc.py +128 -24
- flwr/proto/clientappio_pb2_grpc.pyi +57 -16
- flwr/server/fleet_event_log_interceptor.py +4 -0
- flwr/server/grid/grpc_grid.py +12 -9
- flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +2 -5
- flwr/server/superlink/serverappio/serverappio_servicer.py +5 -9
- flwr/superexec/exec_event_log_interceptor.py +4 -0
- flwr/superexec/exec_license_interceptor.py +4 -0
- flwr/superexec/exec_user_auth_interceptor.py +4 -0
- flwr/supernode/runtime/run_clientapp.py +21 -15
- flwr/supernode/servicer/clientappio/clientappio_servicer.py +94 -25
- {flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/METADATA +1 -1
- {flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/RECORD +25 -26
- flwr/common/inflatable_rest_utils.py +0 -99
- {flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/entry_points.txt +0 -0
@@ -72,6 +72,10 @@ class ExecUserAuthInterceptor(grpc.ServerInterceptor): # type: ignore
|
|
72
72
|
by validating auth metadata sent by the user. Continue RPC call if user is
|
73
73
|
authenticated, else, terminate RPC call by setting context to abort.
|
74
74
|
"""
|
75
|
+
# Only apply to Exec service
|
76
|
+
if not handler_call_details.method.startswith("/flwr.proto.Exec/"):
|
77
|
+
return continuation(handler_call_details)
|
78
|
+
|
75
79
|
# One of the method handlers in
|
76
80
|
# `flwr.superexec.exec_servicer.ExecServicer`
|
77
81
|
method_handler: grpc.RpcMethodHandler = continuation(handler_call_details)
|
@@ -43,18 +43,20 @@ from flwr.common.serde import (
|
|
43
43
|
run_from_proto,
|
44
44
|
)
|
45
45
|
from flwr.common.typing import Fab, Run
|
46
|
+
from flwr.proto.appio_pb2 import ( # pylint: disable=E0611
|
47
|
+
PullAppInputsRequest,
|
48
|
+
PullAppInputsResponse,
|
49
|
+
PullAppMessagesRequest,
|
50
|
+
PullAppMessagesResponse,
|
51
|
+
PushAppMessagesRequest,
|
52
|
+
PushAppOutputsRequest,
|
53
|
+
PushAppOutputsResponse,
|
54
|
+
)
|
46
55
|
|
47
56
|
# pylint: disable=E0611
|
48
57
|
from flwr.proto.clientappio_pb2 import (
|
49
58
|
GetRunIdsWithPendingMessagesRequest,
|
50
59
|
GetRunIdsWithPendingMessagesResponse,
|
51
|
-
PullClientAppInputsRequest,
|
52
|
-
PullClientAppInputsResponse,
|
53
|
-
PullMessageRequest,
|
54
|
-
PullMessageResponse,
|
55
|
-
PushClientAppOutputsRequest,
|
56
|
-
PushClientAppOutputsResponse,
|
57
|
-
PushMessageRequest,
|
58
60
|
RequestTokenRequest,
|
59
61
|
RequestTokenResponse,
|
60
62
|
)
|
@@ -203,12 +205,14 @@ def pull_clientappinputs(
|
|
203
205
|
log(INFO, "[flwr-clientapp] Pull `ClientAppInputs` for token %s", masked_token)
|
204
206
|
try:
|
205
207
|
# Pull Message
|
206
|
-
|
207
|
-
|
208
|
+
pull_msg_res: PullAppMessagesResponse = stub.PullMessage(
|
209
|
+
PullAppMessagesRequest(token=token)
|
210
|
+
)
|
211
|
+
message = message_from_proto(pull_msg_res.messages_list[0])
|
208
212
|
|
209
213
|
# Pull Context, Run and (optional) FAB
|
210
|
-
res:
|
211
|
-
|
214
|
+
res: PullAppInputsResponse = stub.PullClientAppInputs(
|
215
|
+
PullAppInputsRequest(token=token)
|
212
216
|
)
|
213
217
|
context = context_from_proto(res.context)
|
214
218
|
run = run_from_proto(res.run)
|
@@ -221,7 +225,7 @@ def pull_clientappinputs(
|
|
221
225
|
|
222
226
|
def push_clientappoutputs(
|
223
227
|
stub: ClientAppIoStub, token: str, message: Message, context: Context
|
224
|
-
) ->
|
228
|
+
) -> PushAppOutputsResponse:
|
225
229
|
"""Push ClientAppOutputs to SuperNode."""
|
226
230
|
masked_token = mask_string(token)
|
227
231
|
log(INFO, "[flwr-clientapp] Push `ClientAppOutputs` for token %s", masked_token)
|
@@ -233,11 +237,13 @@ def push_clientappoutputs(
|
|
233
237
|
try:
|
234
238
|
|
235
239
|
# Push Message
|
236
|
-
_ = stub.PushMessage(
|
240
|
+
_ = stub.PushMessage(
|
241
|
+
PushAppMessagesRequest(token=token, messages_list=[proto_message])
|
242
|
+
)
|
237
243
|
|
238
244
|
# Push Context
|
239
|
-
res:
|
240
|
-
|
245
|
+
res: PushAppOutputsResponse = stub.PushClientAppOutputs(
|
246
|
+
PushAppOutputsRequest(token=token, context=proto_context)
|
241
247
|
)
|
242
248
|
return res
|
243
249
|
except grpc.RpcError as e:
|
@@ -15,12 +15,13 @@
|
|
15
15
|
"""ClientAppIo API servicer."""
|
16
16
|
|
17
17
|
|
18
|
-
from logging import DEBUG
|
18
|
+
from logging import DEBUG, ERROR
|
19
19
|
from typing import cast
|
20
20
|
|
21
21
|
import grpc
|
22
22
|
|
23
23
|
from flwr.common import Context
|
24
|
+
from flwr.common.inflatable import UnexpectedObjectContentError
|
24
25
|
from flwr.common.logger import log
|
25
26
|
from flwr.common.serde import (
|
26
27
|
context_from_proto,
|
@@ -34,22 +35,34 @@ from flwr.common.typing import Fab, Run
|
|
34
35
|
|
35
36
|
# pylint: disable=E0611
|
36
37
|
from flwr.proto import clientappio_pb2_grpc
|
38
|
+
from flwr.proto.appio_pb2 import ( # pylint: disable=E0401
|
39
|
+
PullAppInputsRequest,
|
40
|
+
PullAppInputsResponse,
|
41
|
+
PullAppMessagesRequest,
|
42
|
+
PullAppMessagesResponse,
|
43
|
+
PushAppMessagesRequest,
|
44
|
+
PushAppMessagesResponse,
|
45
|
+
PushAppOutputsRequest,
|
46
|
+
PushAppOutputsResponse,
|
47
|
+
)
|
37
48
|
from flwr.proto.clientappio_pb2 import ( # pylint: disable=E0401
|
38
49
|
GetRunIdsWithPendingMessagesRequest,
|
39
50
|
GetRunIdsWithPendingMessagesResponse,
|
40
|
-
PullClientAppInputsRequest,
|
41
|
-
PullClientAppInputsResponse,
|
42
|
-
PullMessageRequest,
|
43
|
-
PullMessageResponse,
|
44
|
-
PushClientAppOutputsRequest,
|
45
|
-
PushClientAppOutputsResponse,
|
46
|
-
PushMessageRequest,
|
47
|
-
PushMessageResponse,
|
48
51
|
RequestTokenRequest,
|
49
52
|
RequestTokenResponse,
|
50
53
|
)
|
54
|
+
from flwr.proto.message_pb2 import (
|
55
|
+
ConfirmMessageReceivedRequest,
|
56
|
+
ConfirmMessageReceivedResponse,
|
57
|
+
PullObjectRequest,
|
58
|
+
PullObjectResponse,
|
59
|
+
PushObjectRequest,
|
60
|
+
PushObjectResponse,
|
61
|
+
)
|
62
|
+
|
63
|
+
# pylint: disable=E0601
|
51
64
|
from flwr.supercore.ffs import FfsFactory
|
52
|
-
from flwr.supercore.object_store import ObjectStoreFactory
|
65
|
+
from flwr.supercore.object_store import NoObjectInStoreError, ObjectStoreFactory
|
53
66
|
from flwr.supernode.nodestate import NodeStateFactory
|
54
67
|
|
55
68
|
|
@@ -105,8 +118,8 @@ class ClientAppIoServicer(clientappio_pb2_grpc.ClientAppIoServicer):
|
|
105
118
|
return RequestTokenResponse(token=token)
|
106
119
|
|
107
120
|
def PullClientAppInputs(
|
108
|
-
self, request:
|
109
|
-
) ->
|
121
|
+
self, request: PullAppInputsRequest, context: grpc.ServicerContext
|
122
|
+
) -> PullAppInputsResponse:
|
110
123
|
"""Pull Message, Context, and Run."""
|
111
124
|
log(DEBUG, "ClientAppIo.PullClientAppInputs")
|
112
125
|
|
@@ -128,15 +141,15 @@ class ClientAppIoServicer(clientappio_pb2_grpc.ClientAppIoServicer):
|
|
128
141
|
run = cast(Run, state.get_run(run_id))
|
129
142
|
fab = Fab(run.fab_hash, ffs.get(run.fab_hash)[0]) # type: ignore
|
130
143
|
|
131
|
-
return
|
144
|
+
return PullAppInputsResponse(
|
132
145
|
context=context_to_proto(context),
|
133
146
|
run=run_to_proto(run),
|
134
147
|
fab=fab_to_proto(fab),
|
135
148
|
)
|
136
149
|
|
137
150
|
def PushClientAppOutputs(
|
138
|
-
self, request:
|
139
|
-
) ->
|
151
|
+
self, request: PushAppOutputsRequest, context: grpc.ServicerContext
|
152
|
+
) -> PushAppOutputsResponse:
|
140
153
|
"""Push Message and Context."""
|
141
154
|
log(DEBUG, "ClientAppIo.PushClientAppOutputs")
|
142
155
|
|
@@ -159,11 +172,11 @@ class ClientAppIoServicer(clientappio_pb2_grpc.ClientAppIoServicer):
|
|
159
172
|
# A run associated with a token cannot be handled until its token is cleared
|
160
173
|
state.delete_token(run_id)
|
161
174
|
|
162
|
-
return
|
175
|
+
return PushAppOutputsResponse()
|
163
176
|
|
164
177
|
def PullMessage(
|
165
|
-
self, request:
|
166
|
-
) ->
|
178
|
+
self, request: PullAppMessagesRequest, context: grpc.ServicerContext
|
179
|
+
) -> PullAppMessagesResponse:
|
167
180
|
"""Pull one Message."""
|
168
181
|
# Initialize state and ffs connection
|
169
182
|
state = self.state_factory.state()
|
@@ -177,14 +190,14 @@ class ClientAppIoServicer(clientappio_pb2_grpc.ClientAppIoServicer):
|
|
177
190
|
)
|
178
191
|
raise RuntimeError("This line should never be reached.")
|
179
192
|
|
180
|
-
# Retrieve message
|
193
|
+
# Retrieve message for this run
|
181
194
|
message = state.get_messages(run_ids=[run_id], is_reply=False)[0]
|
182
195
|
|
183
|
-
return
|
196
|
+
return PullAppMessagesResponse(messages_list=[message_to_proto(message)])
|
184
197
|
|
185
198
|
def PushMessage(
|
186
|
-
self, request:
|
187
|
-
) ->
|
199
|
+
self, request: PushAppMessagesRequest, context: grpc.ServicerContext
|
200
|
+
) -> PushAppMessagesResponse:
|
188
201
|
"""Push one Message."""
|
189
202
|
# Initialize state connection
|
190
203
|
state = self.state_factory.state()
|
@@ -198,7 +211,63 @@ class ClientAppIoServicer(clientappio_pb2_grpc.ClientAppIoServicer):
|
|
198
211
|
)
|
199
212
|
raise RuntimeError("This line should never be reached.")
|
200
213
|
|
201
|
-
# Save the message
|
202
|
-
state.store_message(message_from_proto(request.
|
214
|
+
# Save the message to the state
|
215
|
+
state.store_message(message_from_proto(request.messages_list[0]))
|
216
|
+
|
217
|
+
return PushAppMessagesResponse()
|
218
|
+
|
219
|
+
def PushObject(
|
220
|
+
self, request: PushObjectRequest, context: grpc.ServicerContext
|
221
|
+
) -> PushObjectResponse:
|
222
|
+
"""Push an object to the ObjectStore."""
|
223
|
+
log(DEBUG, "ServerAppIoServicer.PushObject")
|
224
|
+
|
225
|
+
# Init state and store
|
226
|
+
store = self.objectstore_factory.store()
|
227
|
+
|
228
|
+
# Insert in store
|
229
|
+
stored = False
|
230
|
+
try:
|
231
|
+
store.put(request.object_id, request.object_content)
|
232
|
+
stored = True
|
233
|
+
except (NoObjectInStoreError, ValueError) as e:
|
234
|
+
log(ERROR, str(e))
|
235
|
+
except UnexpectedObjectContentError as e:
|
236
|
+
# Object content is not valid
|
237
|
+
context.abort(grpc.StatusCode.FAILED_PRECONDITION, str(e))
|
238
|
+
|
239
|
+
return PushObjectResponse(stored=stored)
|
240
|
+
|
241
|
+
def PullObject(
|
242
|
+
self, request: PullObjectRequest, context: grpc.ServicerContext
|
243
|
+
) -> PullObjectResponse:
|
244
|
+
"""Pull an object from the ObjectStore."""
|
245
|
+
log(DEBUG, "ServerAppIoServicer.PullObject")
|
246
|
+
|
247
|
+
# Init state and store
|
248
|
+
store = self.objectstore_factory.store()
|
249
|
+
|
250
|
+
# Fetch from store
|
251
|
+
content = store.get(request.object_id)
|
252
|
+
if content is not None:
|
253
|
+
object_available = content != b""
|
254
|
+
return PullObjectResponse(
|
255
|
+
object_found=True,
|
256
|
+
object_available=object_available,
|
257
|
+
object_content=content,
|
258
|
+
)
|
259
|
+
return PullObjectResponse(object_found=False, object_available=False)
|
260
|
+
|
261
|
+
def ConfirmMessageReceived(
|
262
|
+
self, request: ConfirmMessageReceivedRequest, context: grpc.ServicerContext
|
263
|
+
) -> ConfirmMessageReceivedResponse:
|
264
|
+
"""Confirm message received."""
|
265
|
+
log(DEBUG, "ServerAppIoServicer.ConfirmMessageReceived")
|
266
|
+
|
267
|
+
# Init state and store
|
268
|
+
store = self.objectstore_factory.store()
|
269
|
+
|
270
|
+
# Delete the message object
|
271
|
+
store.delete(request.message_object_id)
|
203
272
|
|
204
|
-
return
|
273
|
+
return ConfirmMessageReceivedResponse()
|
{flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: flwr-nightly
|
3
|
-
Version: 1.20.0.
|
3
|
+
Version: 1.20.0.dev20250717
|
4
4
|
Summary: Flower: A Friendly Federated AI Framework
|
5
5
|
License: Apache-2.0
|
6
6
|
Keywords: Artificial Intelligence,Federated AI,Federated Analytics,Federated Evaluation,Federated Learning,Flower,Machine Learning
|
{flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/RECORD
RENAMED
@@ -84,7 +84,7 @@ flwr/client/grpc_adapter_client/__init__.py,sha256=RQWP5mFPROLHKgombiRvPXVWSoVrQ
|
|
84
84
|
flwr/client/grpc_adapter_client/connection.py,sha256=aj5tTYyE8z2hQLXPPydsJiz8gBDIWLUhfWvqYkAL1L4,3966
|
85
85
|
flwr/client/grpc_rere_client/__init__.py,sha256=i7iS0Lt8B7q0E2L72e4F_YrKm6ClRKnd71PNA6PW2O0,752
|
86
86
|
flwr/client/grpc_rere_client/client_interceptor.py,sha256=zFaVHw6AxeNO-7eCKKb-RxrPa7zbM5Z-2-1Efc4adQY,2451
|
87
|
-
flwr/client/grpc_rere_client/connection.py,sha256=
|
87
|
+
flwr/client/grpc_rere_client/connection.py,sha256=jndP_Z8yNGHocJfucUspk2bcrjPeI3s-nOb1tEeDlT4,13732
|
88
88
|
flwr/client/grpc_rere_client/grpc_adapter.py,sha256=dLGB5GriszAmtgvuFGuz_F7rIwpzLfDxhJ7T3Un-Ce0,6694
|
89
89
|
flwr/client/message_handler/__init__.py,sha256=0lyljDVqre3WljiZbPcwCCf8GiIaSVI_yo_ylEyPwSE,719
|
90
90
|
flwr/client/message_handler/message_handler.py,sha256=X9SXX6et97Lw9_DGD93HKsEBGNjXClcFgc_5aLK0oiU,6541
|
@@ -98,7 +98,7 @@ flwr/client/mod/secure_aggregation/secaggplus_mod.py,sha256=aKqjZCrikF73y3E-7h40
|
|
98
98
|
flwr/client/mod/utils.py,sha256=FUgD2TfcWqSeF6jUKZ4i6Ke56U4Nrv85AeVb93s6R9g,1201
|
99
99
|
flwr/client/numpy_client.py,sha256=Qq6ghsIAop2slKqAfgiI5NiHJ4LIxGmrik3Ror4_XVc,9581
|
100
100
|
flwr/client/rest_client/__init__.py,sha256=MBiuK62hj439m9rtwSwI184Hth6Tt5GbmpNMyl3zkZY,735
|
101
|
-
flwr/client/rest_client/connection.py,sha256
|
101
|
+
flwr/client/rest_client/connection.py,sha256=zZ-HYLPCQxKtTo1Sc-n8jkl_GB4bpfViuif8h9HFSqI,16388
|
102
102
|
flwr/client/run_info_store.py,sha256=MaJ3UQ-07hWtK67wnWu0zR29jrk0fsfgJX506dvEOfE,4042
|
103
103
|
flwr/client/typing.py,sha256=Jw3rawDzI_-ZDcRmEQcs5gZModY7oeQlEeltYsdOhlU,1048
|
104
104
|
flwr/clientapp/__init__.py,sha256=zGW4z49Ojzoi1hDiRC7kyhLjijUilc6fqHhtM_ATRVA,719
|
@@ -123,8 +123,7 @@ flwr/common/exit_handlers.py,sha256=IaqJ60fXZuu7McaRYnoYKtlbH9t4Yl9goNExKqtmQbs,
|
|
123
123
|
flwr/common/grpc.py,sha256=y70hUFvXkIf3l03xOhlb7qhS6W1UJZRSZqCdB0ir0v8,10381
|
124
124
|
flwr/common/heartbeat.py,sha256=SyEpNDnmJ0lni0cWO67rcoJVKasCLmkNHm3dKLeNrLU,5749
|
125
125
|
flwr/common/inflatable.py,sha256=GDL9oBKs16_yyVdlH6kBf493O5xll_h9V7XB5Mpx1Hc,9524
|
126
|
-
flwr/common/
|
127
|
-
flwr/common/inflatable_rest_utils.py,sha256=KiZd06XRiXcl_WewOrag0JTvUQt5kZ74UIsQ3FCAXGc,3580
|
126
|
+
flwr/common/inflatable_protobuf_utils.py,sha256=lvKR5jD5P8AlpknD_1BlvUoTuT6Iyd8oodXfUQvjDRU,3746
|
128
127
|
flwr/common/inflatable_utils.py,sha256=yew5VU8po8yZsmoTVxg-tB5vrvnb2mvBAE55qjiOAq8,12840
|
129
128
|
flwr/common/logger.py,sha256=JbRf6E2vQxXzpDBq1T8IDUJo_usu3gjWEBPQ6uKcmdg,13049
|
130
129
|
flwr/common/message.py,sha256=xAL7iZN5-n-xPQpgoSFvxNrzs8fmiiPfoU0DjNQEhRw,19953
|
@@ -132,7 +131,7 @@ flwr/common/object_ref.py,sha256=p3SfTeqo3Aj16SkB-vsnNn01zswOPdGNBitcbRnqmUk,913
|
|
132
131
|
flwr/common/parameter.py,sha256=UVw6sOgehEFhFs4uUCMl2kfVq1PD6ncmWgPLMsZPKPE,2095
|
133
132
|
flwr/common/pyproject.py,sha256=2SU6yJW7059SbMXgzjOdK1GZRWO6AixDH7BmdxbMvHI,1386
|
134
133
|
flwr/common/record/__init__.py,sha256=cNGccdDoxttqgnUgyKRIqLWULjW-NaSmOufVxtXq-sw,1197
|
135
|
-
flwr/common/record/array.py,sha256=
|
134
|
+
flwr/common/record/array.py,sha256=50WACrlTRbGOnRpw5Qqt-5_u4TroVl-7jRHCx_CQ35o,14503
|
136
135
|
flwr/common/record/arraychunk.py,sha256=2ubMzsRNZFL4cc-wXNrJkcTSJUD3nL8CeX5PZpEhNSo,2019
|
137
136
|
flwr/common/record/arrayrecord.py,sha256=CpoqYXM6Iv4XEc9SryCMYmw-bIvP8ut6xWJzRwYJzdU,18008
|
138
137
|
flwr/common/record/configrecord.py,sha256=G7U0q39kB0Kyi0zMxFmPxcVemL9NgwVS1qjvI4BRQuU,9763
|
@@ -150,14 +149,14 @@ flwr/common/secure_aggregation/ndarrays_arithmetic.py,sha256=TrggOlizlny3V2KS7-3
|
|
150
149
|
flwr/common/secure_aggregation/quantization.py,sha256=ssFZpiRyj9ltIh0Ai3vGkDqWFO4SoqgoD1mDU9XqMEM,2400
|
151
150
|
flwr/common/secure_aggregation/secaggplus_constants.py,sha256=dGYhWOBMMDJcQH4_tQNC8-Efqm-ecEUNN9ANz59UnCk,2182
|
152
151
|
flwr/common/secure_aggregation/secaggplus_utils.py,sha256=E_xU-Zd45daO1em7M6C2wOjFXVtJf-6tl7fp-7xq1wo,3214
|
153
|
-
flwr/common/serde.py,sha256=
|
152
|
+
flwr/common/serde.py,sha256=dx66gumR1BpwK45qDwvDLd_05VoKfzkUzWZ7zuZi1-0,21960
|
154
153
|
flwr/common/serde_utils.py,sha256=krx2C_W31KpfmDqnDCtULoTkT8WKweWTJ7FHYWtF1r4,5815
|
155
154
|
flwr/common/telemetry.py,sha256=jF47v0SbnBd43XamHtl3wKxs3knFUY2p77cm_2lzZ8M,8762
|
156
155
|
flwr/common/typing.py,sha256=B8z50fv8K0H4F5m8XRPBoWy-qqbNMyQXBAaaSuzfbnY,6936
|
157
156
|
flwr/common/version.py,sha256=7GAGzPn73Mkh09qhrjbmjZQtcqVhBuzhFBaK4Mk4VRk,1325
|
158
157
|
flwr/compat/__init__.py,sha256=gbfDQKKKMZzi3GswyVRgyLdDlHiWj3wU6dg7y6m5O_s,752
|
159
158
|
flwr/compat/client/__init__.py,sha256=qpbo0lcxdNL4qy5KHqiGm8OLxSxkYgI_-dLh5rwhtcI,746
|
160
|
-
flwr/compat/client/app.py,sha256=
|
159
|
+
flwr/compat/client/app.py,sha256=EFJxHrnFC_MrTQM2BKIdVJzW8WMYxBBMUY-XhNwvwqM,27126
|
161
160
|
flwr/compat/client/grpc_client/__init__.py,sha256=MDOckOODn-FJnkkFEfb2JO-2G97wrBr_TTqht-LhOcY,735
|
162
161
|
flwr/compat/client/grpc_client/connection.py,sha256=xAyvcTVr7bkwUfR5P3D_LKlZYiyySpt5sEwORA1h8Gc,9189
|
163
162
|
flwr/compat/common/__init__.py,sha256=OMnKw4ad0qYMSIA9LZRa2gOkhSOXwAZCpAHnBQE_hFc,746
|
@@ -165,14 +164,14 @@ flwr/compat/server/__init__.py,sha256=TGVSoOTuf5T5JHUVrK5wuorQF7L6Wvdem8B4uufvMJ
|
|
165
164
|
flwr/compat/server/app.py,sha256=_lIe7Q4KUk-olq9PYBxIsO3UaOn6N92CWgWQ4hRcAZw,6490
|
166
165
|
flwr/compat/simulation/__init__.py,sha256=MApGa-tysDDw34iSdxZ7TWOKtGJM-z3i8fIRJa0qbZ8,750
|
167
166
|
flwr/proto/__init__.py,sha256=S3VbQzVwNC1P-3_9EdrXuwgptO-BVuuAe20Z_OUc1cQ,683
|
168
|
-
flwr/proto/appio_pb2.py,sha256=
|
169
|
-
flwr/proto/appio_pb2.pyi,sha256=
|
167
|
+
flwr/proto/appio_pb2.py,sha256=wCmsFJphNn5VHV2ew6-Wz58OclbsNfiwkwbssX8Ojf0,3853
|
168
|
+
flwr/proto/appio_pb2.pyi,sha256=_75EI4-BtZFW_tQcjLYhULmZPlFh1WJGVpL4vOROljU,7736
|
170
169
|
flwr/proto/appio_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
171
170
|
flwr/proto/appio_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
172
|
-
flwr/proto/clientappio_pb2.py,sha256=
|
173
|
-
flwr/proto/clientappio_pb2.pyi,sha256=
|
174
|
-
flwr/proto/clientappio_pb2_grpc.py,sha256=
|
175
|
-
flwr/proto/clientappio_pb2_grpc.pyi,sha256=
|
171
|
+
flwr/proto/clientappio_pb2.py,sha256=VHXByon0L0U0768mSbp5ek2iWC6uujowc4sw7IHZHg8,3256
|
172
|
+
flwr/proto/clientappio_pb2.pyi,sha256=gA-WU5lCYxhMciAUiCg__DrAzHPtytqRLyflpToWHqc,2033
|
173
|
+
flwr/proto/clientappio_pb2_grpc.py,sha256=4jYgxz3mNl20u3rJuGTe2TkeiLoVSwnRnXCGXhbCxgw,16263
|
174
|
+
flwr/proto/clientappio_pb2_grpc.pyi,sha256=oa6AwB04qozIdwRLg2K43Zmf9BY10wlcnoJwPAxGHpc,4536
|
176
175
|
flwr/proto/error_pb2.py,sha256=PQVWrfjVPo88ql_KgV9nCxyQNCcV9PVfmcw7sOzTMro,1084
|
177
176
|
flwr/proto/error_pb2.pyi,sha256=ZNH4HhJTU_KfMXlyCeg8FwU-fcUYxTqEmoJPtWtHikc,734
|
178
177
|
flwr/proto/error_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
@@ -240,10 +239,10 @@ flwr/server/compat/app_utils.py,sha256=Uz6m-NV90cQ6k-gW6wlWQuhoFoK78qlMr0CEmALKX
|
|
240
239
|
flwr/server/compat/grid_client_proxy.py,sha256=FxMgGtrzBoBAPby2ZjTWzpCJsCht8FwMm4PzqW80dmQ,4956
|
241
240
|
flwr/server/compat/legacy_context.py,sha256=94JsRQxyOdLI6lZZkFjS3-TMd0YJGAgSBBO0M_s_9ts,1804
|
242
241
|
flwr/server/criterion.py,sha256=G4e-6B48Pc7d5rmGVUpIzNKb6UF88O3VmTRuUltgjzM,1061
|
243
|
-
flwr/server/fleet_event_log_interceptor.py,sha256=
|
242
|
+
flwr/server/fleet_event_log_interceptor.py,sha256=gtVPr2yQp3U2GnabIdFnuok18VerEcidKj1lKmDYGoY,3950
|
244
243
|
flwr/server/grid/__init__.py,sha256=aWZHezoR2UGMJISB_gPMCm2N_2GSbm97A3lAp7ruhRQ,888
|
245
244
|
flwr/server/grid/grid.py,sha256=naGCYt5J6dnmUvrcGkdNyKPe3MBd-0awGm1ALmgahqY,6625
|
246
|
-
flwr/server/grid/grpc_grid.py,sha256
|
245
|
+
flwr/server/grid/grpc_grid.py,sha256=2AL1Niz77cOWGX0e7Y9eJFpOK962tDqyn8QQyjSN0qM,13735
|
247
246
|
flwr/server/grid/inmemory_grid.py,sha256=RjejYT-d-hHuTs1KSs_5wvOdAWKLus8w5_UAcnGt4iw,6168
|
248
247
|
flwr/server/history.py,sha256=cCkFhBN4GoHsYYNk5GG1Y089eKJh2DH_ZJbYPwLaGyk,5026
|
249
248
|
flwr/server/run_serverapp.py,sha256=v0p6jXj2dFxlRUdoEeF1mnaFd9XRQi6dZCflPY6d3qI,2063
|
@@ -288,7 +287,7 @@ flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py,sha256=iSf0mbBAlig7G6
|
|
288
287
|
flwr/server/superlink/fleet/grpc_bidi/grpc_server.py,sha256=OsS-6GgCIzMMZDVu5Y-OKjynHVUrpdc_5OrtuB-IbU0,5174
|
289
288
|
flwr/server/superlink/fleet/grpc_rere/__init__.py,sha256=ahDJJ1e-lDxBpeBMgPk7YZt2wB38_QltcpOC0gLbpFs,758
|
290
289
|
flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py,sha256=X7-z4oReIH5ghMfmMXML3SSpa2bhRsuIvt2OZs82BUk,8675
|
291
|
-
flwr/server/superlink/fleet/grpc_rere/server_interceptor.py,sha256=
|
290
|
+
flwr/server/superlink/fleet/grpc_rere/server_interceptor.py,sha256=9_RaYWMqFdpFi8QcE7Nv8-pRjWJ2dLHxezrwhd1tAYk,6845
|
292
291
|
flwr/server/superlink/fleet/message_handler/__init__.py,sha256=fHsRV0KvJ8HtgSA4_YBsEzuhJLjO8p6xx4aCY2oE1p4,731
|
293
292
|
flwr/server/superlink/fleet/message_handler/message_handler.py,sha256=k_okVvuvbQgnBAWtXpOf0UrXcMQmRZtKKTS-as1xjig,8667
|
294
293
|
flwr/server/superlink/fleet/rest_rere/__init__.py,sha256=Lzc93nA7tDqoy-zRUaPG316oqFiZX1HUCL5ELaXY_xw,735
|
@@ -306,7 +305,7 @@ flwr/server/superlink/linkstate/sqlite_linkstate.py,sha256=E699Ak0jMF3N7i1SIeFRu
|
|
306
305
|
flwr/server/superlink/linkstate/utils.py,sha256=IeLh7iGRCHU5MEWOl7iriaSE4L__8GWOa2OleXadK5M,15444
|
307
306
|
flwr/server/superlink/serverappio/__init__.py,sha256=Fy4zJuoccZe5mZSEIpOmQvU6YeXFBa1M4eZuXXmJcn8,717
|
308
307
|
flwr/server/superlink/serverappio/serverappio_grpc.py,sha256=zcvzDhCAnlFxAwCiJUHNm6IE7-rk5jeZqSmPgjEY3AU,2307
|
309
|
-
flwr/server/superlink/serverappio/serverappio_servicer.py,sha256=
|
308
|
+
flwr/server/superlink/serverappio/serverappio_servicer.py,sha256=7oOFTjS5uSvdH0LSw-mDYulDMSItEM_QmXFQv_6ZjOU,18228
|
310
309
|
flwr/server/superlink/simulation/__init__.py,sha256=Ry8DrNaZCMcQXvUc4FoCN2m3dvUQgWjasfp015o3Ec4,718
|
311
310
|
flwr/server/superlink/simulation/simulationio_grpc.py,sha256=VqWKxjpd4bCgPFKsgtIZPk9YcG0kc1EEmr5k20EKty4,2205
|
312
311
|
flwr/server/superlink/simulation/simulationio_servicer.py,sha256=m1T1zvEn81jlfx9hVTqmeWxAu6APCS2YW8l5O0OQvhU,7724
|
@@ -348,11 +347,11 @@ flwr/supercore/utils.py,sha256=ebuHMbeA8eXisX0oMPqBK3hk7uVnIE_yiqWVz8YbkpQ,1324
|
|
348
347
|
flwr/superexec/__init__.py,sha256=YFqER0IJc1XEWfsX6AxZ9LSRq0sawPYrNYki-brvTIc,715
|
349
348
|
flwr/superexec/app.py,sha256=U2jjOHb2LGWoU7vrl9_czTzre9O2mPxu3CPGUZ86sK4,1465
|
350
349
|
flwr/superexec/deployment.py,sha256=cFxhFom-0zv93HLNjNcUdBy3Sf6JwshRoXPQtcZunF0,6797
|
351
|
-
flwr/superexec/exec_event_log_interceptor.py,sha256=
|
350
|
+
flwr/superexec/exec_event_log_interceptor.py,sha256=bHBpjRDh-GgLxELNP9ofES7hCEAR_M78wuJZ06vXRLg,5942
|
352
351
|
flwr/superexec/exec_grpc.py,sha256=D7xPHEXjW4SXMb9_dWNZhbFFxUeKr8zE67LITZQbHU8,4148
|
353
|
-
flwr/superexec/exec_license_interceptor.py,sha256=
|
352
|
+
flwr/superexec/exec_license_interceptor.py,sha256=rpnQmHE9FR11EJ3Lwd4_ducvlSHj5hS_SHAMbbZwXlk,3328
|
354
353
|
flwr/superexec/exec_servicer.py,sha256=c0nwdFBiS6CbKrRA7ffOpsgASOLeaRV_ICwxDfxNGAg,12498
|
355
|
-
flwr/superexec/exec_user_auth_interceptor.py,sha256=
|
354
|
+
flwr/superexec/exec_user_auth_interceptor.py,sha256=InqJo9QQu2QQYYusxtmb3EtKdvJECQ1xtvwy5DVF-c0,6196
|
356
355
|
flwr/superexec/executor.py,sha256=LaErHRJvNggjWV6FI6eajgKfnwOvSv2UqzFH253yDro,3265
|
357
356
|
flwr/superexec/simulation.py,sha256=62rSLcS-1wnMsMsafSQuIDLs5ZS6Ail1spkZ-alNNTg,4156
|
358
357
|
flwr/superlink/__init__.py,sha256=GNSuJ4-N6Z8wun2iZNlXqENt5beUyzC0Gi_tN396bbM,707
|
@@ -365,12 +364,12 @@ flwr/supernode/nodestate/in_memory_nodestate.py,sha256=LF3AbaW0bcZHY5yKWwUJSU2RZ
|
|
365
364
|
flwr/supernode/nodestate/nodestate.py,sha256=kkGFxYnLIwT4-UmlPnf6HvAUpPey2urUNrweGybAIY4,6398
|
366
365
|
flwr/supernode/nodestate/nodestate_factory.py,sha256=UYTDCcwK_baHUmkzkJDxL0UEqvtTfOMlQRrROMCd0Xo,1430
|
367
366
|
flwr/supernode/runtime/__init__.py,sha256=JQdqd2EMTn-ORMeTvewYYh52ls0YKP68jrps1qioxu4,718
|
368
|
-
flwr/supernode/runtime/run_clientapp.py,sha256=
|
367
|
+
flwr/supernode/runtime/run_clientapp.py,sha256=VcgRgPhrefAFpcAMfwCFSVa3HJsrlca8PNmeJD0on-k,8668
|
369
368
|
flwr/supernode/servicer/__init__.py,sha256=lucTzre5WPK7G1YLCfaqg3rbFWdNSb7ZTt-ca8gxdEo,717
|
370
369
|
flwr/supernode/servicer/clientappio/__init__.py,sha256=7Oy62Y_oijqF7Dxi6tpcUQyOpLc_QpIRZ83NvwmB0Yg,813
|
371
|
-
flwr/supernode/servicer/clientappio/clientappio_servicer.py,sha256=
|
370
|
+
flwr/supernode/servicer/clientappio/clientappio_servicer.py,sha256=OclO38I6NhKwM2ZnHz9NjrxW4RA4_v8M4GkLzsReG2c,9477
|
372
371
|
flwr/supernode/start_client_internal.py,sha256=_ZqSfL_j4qn6Cg-P6sv3k_n1ZG62J_teokBxnWrXrPE,18772
|
373
|
-
flwr_nightly-1.20.0.
|
374
|
-
flwr_nightly-1.20.0.
|
375
|
-
flwr_nightly-1.20.0.
|
376
|
-
flwr_nightly-1.20.0.
|
372
|
+
flwr_nightly-1.20.0.dev20250717.dist-info/METADATA,sha256=VlPfht2YzCaqiIBeDUy6f8p4AHm88CNaVCeEh8tGhMA,15966
|
373
|
+
flwr_nightly-1.20.0.dev20250717.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
374
|
+
flwr_nightly-1.20.0.dev20250717.dist-info/entry_points.txt,sha256=jNpDXGBGgs21RqUxelF_jwGaxtqFwm-MQyfz-ZqSjrA,367
|
375
|
+
flwr_nightly-1.20.0.dev20250717.dist-info/RECORD,,
|
@@ -1,99 +0,0 @@
|
|
1
|
-
# Copyright 2025 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
|
-
"""InflatableObject REST utils."""
|
16
|
-
|
17
|
-
|
18
|
-
from typing import Callable
|
19
|
-
|
20
|
-
from flwr.proto.message_pb2 import ( # pylint: disable=E0611
|
21
|
-
PullObjectRequest,
|
22
|
-
PullObjectResponse,
|
23
|
-
PushObjectRequest,
|
24
|
-
PushObjectResponse,
|
25
|
-
)
|
26
|
-
from flwr.proto.node_pb2 import Node # pylint: disable=E0611
|
27
|
-
|
28
|
-
from .inflatable_utils import ObjectIdNotPreregisteredError, ObjectUnavailableError
|
29
|
-
|
30
|
-
|
31
|
-
def make_pull_object_fn_rest(
|
32
|
-
pull_object_rest: Callable[[PullObjectRequest], PullObjectResponse],
|
33
|
-
node: Node,
|
34
|
-
run_id: int,
|
35
|
-
) -> Callable[[str], bytes]:
|
36
|
-
"""Create a pull object function that uses REST to pull objects.
|
37
|
-
|
38
|
-
Parameters
|
39
|
-
----------
|
40
|
-
pull_object_rest : Callable[[PullObjectRequest], PullObjectResponse]
|
41
|
-
A function that makes a POST request against the `/push-object` REST endpoint
|
42
|
-
node : Node
|
43
|
-
The node making the request.
|
44
|
-
run_id : int
|
45
|
-
The run ID for the current operation.
|
46
|
-
|
47
|
-
Returns
|
48
|
-
-------
|
49
|
-
Callable[[str], bytes]
|
50
|
-
A function that takes an object ID and returns the object content as bytes.
|
51
|
-
The function raises `ObjectIdNotPreregisteredError` if the object ID is not
|
52
|
-
pre-registered, or `ObjectUnavailableError` if the object is not yet available.
|
53
|
-
"""
|
54
|
-
|
55
|
-
def pull_object_fn(object_id: str) -> bytes:
|
56
|
-
request = PullObjectRequest(node=node, run_id=run_id, object_id=object_id)
|
57
|
-
response: PullObjectResponse = pull_object_rest(request)
|
58
|
-
if not response.object_found:
|
59
|
-
raise ObjectIdNotPreregisteredError(object_id)
|
60
|
-
if not response.object_available:
|
61
|
-
raise ObjectUnavailableError(object_id)
|
62
|
-
return response.object_content
|
63
|
-
|
64
|
-
return pull_object_fn
|
65
|
-
|
66
|
-
|
67
|
-
def make_push_object_fn_rest(
|
68
|
-
push_object_rest: Callable[[PushObjectRequest], PushObjectResponse],
|
69
|
-
node: Node,
|
70
|
-
run_id: int,
|
71
|
-
) -> Callable[[str, bytes], None]:
|
72
|
-
"""Create a push object function that uses REST to push objects.
|
73
|
-
|
74
|
-
Parameters
|
75
|
-
----------
|
76
|
-
push_object_rest : Callable[[PushObjectRequest], PushObjectResponse]
|
77
|
-
A function that makes a POST request against the `/pull-object` REST endpoint
|
78
|
-
node : Node
|
79
|
-
The node making the request.
|
80
|
-
run_id : int
|
81
|
-
The run ID for the current operation.
|
82
|
-
|
83
|
-
Returns
|
84
|
-
-------
|
85
|
-
Callable[[str, bytes], None]
|
86
|
-
A function that takes an object ID and its content as bytes, and pushes it
|
87
|
-
to the servicer. The function raises `ObjectIdNotPreregisteredError` if
|
88
|
-
the object ID is not pre-registered.
|
89
|
-
"""
|
90
|
-
|
91
|
-
def push_object_fn(object_id: str, object_content: bytes) -> None:
|
92
|
-
request = PushObjectRequest(
|
93
|
-
node=node, run_id=run_id, object_id=object_id, object_content=object_content
|
94
|
-
)
|
95
|
-
response: PushObjectResponse = push_object_rest(request)
|
96
|
-
if not response.stored:
|
97
|
-
raise ObjectIdNotPreregisteredError(object_id)
|
98
|
-
|
99
|
-
return push_object_fn
|
{flwr_nightly-1.20.0.dev20250715.dist-info → flwr_nightly-1.20.0.dev20250717.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|