flwr 1.25.0__py3-none-any.whl → 1.26.0__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/__init__.py +1 -1
- flwr/app/__init__.py +4 -1
- flwr/app/message_type.py +29 -0
- flwr/app/metadata.py +5 -2
- flwr/app/user_config.py +19 -0
- flwr/cli/app.py +37 -19
- flwr/cli/app_cmd/publish.py +25 -75
- flwr/cli/app_cmd/review.py +18 -69
- flwr/cli/auth_plugin/auth_plugin.py +5 -10
- flwr/cli/auth_plugin/noop_auth_plugin.py +1 -2
- flwr/cli/auth_plugin/oidc_cli_plugin.py +38 -38
- flwr/cli/build.py +15 -28
- flwr/cli/config/__init__.py +21 -0
- flwr/cli/config/ls.py +71 -0
- flwr/cli/config_migration.py +297 -0
- flwr/cli/config_utils.py +63 -156
- flwr/cli/constant.py +71 -0
- flwr/cli/federation/__init__.py +0 -2
- flwr/cli/federation/ls.py +256 -64
- flwr/cli/flower_config.py +429 -0
- flwr/cli/install.py +23 -62
- flwr/cli/log.py +23 -37
- flwr/cli/login/login.py +29 -63
- flwr/cli/ls.py +28 -58
- flwr/cli/new/new.py +9 -29
- flwr/cli/pull.py +19 -37
- flwr/cli/run/run.py +85 -93
- flwr/cli/run_utils.py +1 -1
- flwr/cli/stop.py +32 -73
- flwr/cli/supernode/ls.py +25 -57
- flwr/cli/supernode/register.py +31 -80
- flwr/cli/supernode/unregister.py +24 -70
- flwr/cli/typing.py +200 -0
- flwr/cli/utils.py +160 -275
- flwr/client/grpc_rere_client/connection.py +3 -3
- flwr/client/grpc_rere_client/grpc_adapter.py +1 -1
- flwr/client/message_handler/message_handler.py +2 -1
- flwr/client/mod/centraldp_mods.py +1 -1
- flwr/client/mod/localdp_mod.py +1 -1
- flwr/client/mod/secure_aggregation/secaggplus_mod.py +1 -1
- flwr/client/run_info_store.py +2 -1
- flwr/clientapp/client_app.py +2 -1
- flwr/common/__init__.py +3 -2
- flwr/common/args.py +5 -5
- flwr/common/config.py +12 -17
- flwr/common/constant.py +3 -16
- flwr/common/context.py +2 -1
- flwr/common/exit/exit.py +4 -4
- flwr/common/exit/exit_code.py +6 -0
- flwr/common/grpc.py +2 -1
- flwr/common/logger.py +1 -1
- flwr/common/message.py +1 -1
- flwr/common/retry_invoker.py +13 -5
- flwr/common/secure_aggregation/ndarrays_arithmetic.py +5 -2
- flwr/common/serde.py +7 -5
- flwr/common/telemetry.py +1 -1
- flwr/common/typing.py +4 -3
- flwr/compat/client/app.py +6 -9
- flwr/compat/client/grpc_client/connection.py +2 -1
- flwr/compat/common/constant.py +29 -0
- flwr/compat/server/app.py +1 -1
- flwr/proto/clientappio_pb2.py +2 -2
- flwr/proto/clientappio_pb2_grpc.py +104 -88
- flwr/proto/clientappio_pb2_grpc.pyi +140 -80
- flwr/proto/federation_pb2.py +5 -3
- flwr/proto/federation_pb2.pyi +32 -2
- flwr/proto/run_pb2.py +5 -13
- flwr/proto/run_pb2.pyi +0 -57
- flwr/proto/serverappio_pb2.py +2 -2
- flwr/proto/serverappio_pb2_grpc.py +138 -207
- flwr/proto/serverappio_pb2_grpc.pyi +189 -155
- flwr/proto/simulationio_pb2.py +2 -2
- flwr/proto/simulationio_pb2_grpc.py +62 -90
- flwr/proto/simulationio_pb2_grpc.pyi +95 -55
- flwr/server/app.py +6 -13
- flwr/server/compat/grid_client_proxy.py +2 -1
- flwr/server/grid/grpc_grid.py +5 -5
- flwr/server/serverapp/app.py +11 -4
- flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +1 -1
- flwr/server/superlink/fleet/grpc_rere/node_auth_server_interceptor.py +13 -12
- flwr/server/superlink/fleet/message_handler/message_handler.py +6 -5
- flwr/server/superlink/linkstate/__init__.py +2 -2
- flwr/server/superlink/linkstate/in_memory_linkstate.py +2 -10
- flwr/server/superlink/linkstate/linkstate.py +2 -21
- flwr/server/superlink/linkstate/linkstate_factory.py +16 -8
- flwr/server/superlink/linkstate/{sqlite_linkstate.py → sql_linkstate.py} +432 -534
- flwr/server/superlink/linkstate/utils.py +49 -2
- flwr/server/superlink/serverappio/serverappio_servicer.py +1 -33
- flwr/server/superlink/simulation/simulationio_servicer.py +0 -19
- flwr/server/utils/validator.py +1 -1
- flwr/server/workflow/default_workflows.py +2 -1
- flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +1 -1
- flwr/serverapp/strategy/bulyan.py +7 -1
- flwr/serverapp/strategy/dp_fixed_clipping.py +9 -1
- flwr/serverapp/strategy/fedavg.py +1 -1
- flwr/serverapp/strategy/fedxgb_cyclic.py +1 -1
- flwr/simulation/ray_transport/ray_client_proxy.py +2 -6
- flwr/simulation/run_simulation.py +3 -12
- flwr/simulation/simulationio_connection.py +3 -3
- flwr/{common → supercore}/address.py +7 -33
- flwr/supercore/app_utils.py +2 -1
- flwr/supercore/constant.py +24 -2
- flwr/supercore/corestate/{sqlite_corestate.py → sql_corestate.py} +19 -23
- flwr/supercore/credential_store/__init__.py +33 -0
- flwr/supercore/credential_store/credential_store.py +34 -0
- flwr/supercore/credential_store/file_credential_store.py +76 -0
- flwr/{common → supercore}/date.py +0 -11
- flwr/supercore/ffs/disk_ffs.py +1 -1
- flwr/supercore/object_store/object_store_factory.py +14 -6
- flwr/supercore/object_store/{sqlite_object_store.py → sql_object_store.py} +115 -117
- flwr/supercore/sql_mixin.py +315 -0
- flwr/supercore/state/__init__.py +15 -0
- flwr/supercore/state/alembic/__init__.py +15 -0
- flwr/supercore/state/alembic/env.py +103 -0
- flwr/supercore/state/alembic/script.py.mako +43 -0
- flwr/supercore/state/alembic/utils.py +239 -0
- flwr/supercore/state/alembic/versions/__init__.py +15 -0
- flwr/supercore/state/alembic/versions/rev_2026_01_28_initialize_migration_of_state_tables.py +200 -0
- flwr/supercore/state/schema/README.md +121 -0
- flwr/supercore/state/schema/__init__.py +15 -0
- flwr/supercore/state/schema/corestate_tables.py +36 -0
- flwr/supercore/state/schema/linkstate_tables.py +152 -0
- flwr/supercore/state/schema/objectstore_tables.py +90 -0
- flwr/supercore/superexec/run_superexec.py +2 -2
- flwr/supercore/utils.py +36 -1
- flwr/superlink/federation/federation_manager.py +2 -2
- flwr/superlink/federation/noop_federation_manager.py +8 -6
- flwr/superlink/servicer/control/control_servicer.py +19 -17
- flwr/supernode/cli/flower_supernode.py +2 -1
- flwr/supernode/runtime/run_clientapp.py +14 -14
- flwr/supernode/servicer/clientappio/clientappio_servicer.py +10 -8
- flwr/supernode/start_client_internal.py +10 -6
- {flwr-1.25.0.dist-info → flwr-1.26.0.dist-info}/METADATA +7 -5
- {flwr-1.25.0.dist-info → flwr-1.26.0.dist-info}/RECORD +137 -116
- flwr/cli/federation/show.py +0 -318
- flwr/common/pyproject.py +0 -42
- flwr/supercore/sqlite_mixin.py +0 -159
- /flwr/{common → supercore}/version.py +0 -0
- {flwr-1.25.0.dist-info → flwr-1.26.0.dist-info}/WHEEL +0 -0
- {flwr-1.25.0.dist-info → flwr-1.26.0.dist-info}/entry_points.txt +0 -0
|
@@ -52,6 +52,11 @@ class SimulationIoStub(object):
|
|
|
52
52
|
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
53
53
|
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
54
54
|
_registered_method=True)
|
|
55
|
+
self.SendAppHeartbeat = channel.unary_unary(
|
|
56
|
+
'/flwr.proto.SimulationIo/SendAppHeartbeat',
|
|
57
|
+
request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
58
|
+
response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
59
|
+
_registered_method=True)
|
|
55
60
|
self.PullAppInputs = channel.unary_unary(
|
|
56
61
|
'/flwr.proto.SimulationIo/PullAppInputs',
|
|
57
62
|
request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
|
|
@@ -77,23 +82,17 @@ class SimulationIoStub(object):
|
|
|
77
82
|
request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
|
|
78
83
|
response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
|
|
79
84
|
_registered_method=True)
|
|
80
|
-
self.GetRunStatus = channel.unary_unary(
|
|
81
|
-
'/flwr.proto.SimulationIo/GetRunStatus',
|
|
82
|
-
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
|
|
83
|
-
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
84
|
-
_registered_method=True)
|
|
85
|
-
self.SendAppHeartbeat = channel.unary_unary(
|
|
86
|
-
'/flwr.proto.SimulationIo/SendAppHeartbeat',
|
|
87
|
-
request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
88
|
-
response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
89
|
-
_registered_method=True)
|
|
90
85
|
|
|
91
86
|
|
|
92
87
|
class SimulationIoServicer(object):
|
|
93
88
|
"""Missing associated documentation comment in .proto file."""
|
|
94
89
|
|
|
95
90
|
def ListAppsToLaunch(self, request, context):
|
|
96
|
-
"""
|
|
91
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
92
|
+
General *AppIo endpoints for SuperExec processes
|
|
93
|
+
///////////////////////////////////////////////////////////////////////////
|
|
94
|
+
|
|
95
|
+
List runs to launch
|
|
97
96
|
"""
|
|
98
97
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
99
98
|
context.set_details('Method not implemented!')
|
|
@@ -107,28 +106,43 @@ class SimulationIoServicer(object):
|
|
|
107
106
|
raise NotImplementedError('Method not implemented!')
|
|
108
107
|
|
|
109
108
|
def GetRun(self, request, context):
|
|
110
|
-
"""
|
|
109
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
110
|
+
General *AppIo endpoints for App Executor processes
|
|
111
|
+
///////////////////////////////////////////////////////////////////////////
|
|
112
|
+
|
|
113
|
+
Get run details
|
|
114
|
+
"""
|
|
115
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
116
|
+
context.set_details('Method not implemented!')
|
|
117
|
+
raise NotImplementedError('Method not implemented!')
|
|
118
|
+
|
|
119
|
+
def SendAppHeartbeat(self, request, context):
|
|
120
|
+
"""App heartbeat
|
|
111
121
|
"""
|
|
112
122
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
113
123
|
context.set_details('Method not implemented!')
|
|
114
124
|
raise NotImplementedError('Method not implemented!')
|
|
115
125
|
|
|
116
126
|
def PullAppInputs(self, request, context):
|
|
117
|
-
"""Pull
|
|
127
|
+
"""Pull app inputs
|
|
118
128
|
"""
|
|
119
129
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
120
130
|
context.set_details('Method not implemented!')
|
|
121
131
|
raise NotImplementedError('Method not implemented!')
|
|
122
132
|
|
|
123
133
|
def PushAppOutputs(self, request, context):
|
|
124
|
-
"""Push
|
|
134
|
+
"""Push app outputs
|
|
125
135
|
"""
|
|
126
136
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
127
137
|
context.set_details('Method not implemented!')
|
|
128
138
|
raise NotImplementedError('Method not implemented!')
|
|
129
139
|
|
|
130
140
|
def UpdateRunStatus(self, request, context):
|
|
131
|
-
"""
|
|
141
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
142
|
+
Specific endpoints shared by ServerAppIo and SimulationIo
|
|
143
|
+
///////////////////////////////////////////////////////////////////////////
|
|
144
|
+
|
|
145
|
+
Update the status of a given run
|
|
132
146
|
"""
|
|
133
147
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
134
148
|
context.set_details('Method not implemented!')
|
|
@@ -142,21 +156,11 @@ class SimulationIoServicer(object):
|
|
|
142
156
|
raise NotImplementedError('Method not implemented!')
|
|
143
157
|
|
|
144
158
|
def GetFederationOptions(self, request, context):
|
|
145
|
-
"""
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
context.set_details('Method not implemented!')
|
|
149
|
-
raise NotImplementedError('Method not implemented!')
|
|
159
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
160
|
+
Specific endpoints for SimulationIo
|
|
161
|
+
///////////////////////////////////////////////////////////////////////////
|
|
150
162
|
|
|
151
|
-
|
|
152
|
-
"""Get Run Status
|
|
153
|
-
"""
|
|
154
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
155
|
-
context.set_details('Method not implemented!')
|
|
156
|
-
raise NotImplementedError('Method not implemented!')
|
|
157
|
-
|
|
158
|
-
def SendAppHeartbeat(self, request, context):
|
|
159
|
-
"""App heartbeat
|
|
163
|
+
Get Federation Options
|
|
160
164
|
"""
|
|
161
165
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
162
166
|
context.set_details('Method not implemented!')
|
|
@@ -180,6 +184,11 @@ def add_SimulationIoServicer_to_server(servicer, server):
|
|
|
180
184
|
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.FromString,
|
|
181
185
|
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.SerializeToString,
|
|
182
186
|
),
|
|
187
|
+
'SendAppHeartbeat': grpc.unary_unary_rpc_method_handler(
|
|
188
|
+
servicer.SendAppHeartbeat,
|
|
189
|
+
request_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.FromString,
|
|
190
|
+
response_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.SerializeToString,
|
|
191
|
+
),
|
|
183
192
|
'PullAppInputs': grpc.unary_unary_rpc_method_handler(
|
|
184
193
|
servicer.PullAppInputs,
|
|
185
194
|
request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.FromString,
|
|
@@ -205,16 +214,6 @@ def add_SimulationIoServicer_to_server(servicer, server):
|
|
|
205
214
|
request_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.FromString,
|
|
206
215
|
response_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.SerializeToString,
|
|
207
216
|
),
|
|
208
|
-
'GetRunStatus': grpc.unary_unary_rpc_method_handler(
|
|
209
|
-
servicer.GetRunStatus,
|
|
210
|
-
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
|
|
211
|
-
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
|
|
212
|
-
),
|
|
213
|
-
'SendAppHeartbeat': grpc.unary_unary_rpc_method_handler(
|
|
214
|
-
servicer.SendAppHeartbeat,
|
|
215
|
-
request_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.FromString,
|
|
216
|
-
response_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.SerializeToString,
|
|
217
|
-
),
|
|
218
217
|
}
|
|
219
218
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
220
219
|
'flwr.proto.SimulationIo', rpc_method_handlers)
|
|
@@ -308,34 +307,7 @@ class SimulationIo(object):
|
|
|
308
307
|
_registered_method=True)
|
|
309
308
|
|
|
310
309
|
@staticmethod
|
|
311
|
-
def
|
|
312
|
-
target,
|
|
313
|
-
options=(),
|
|
314
|
-
channel_credentials=None,
|
|
315
|
-
call_credentials=None,
|
|
316
|
-
insecure=False,
|
|
317
|
-
compression=None,
|
|
318
|
-
wait_for_ready=None,
|
|
319
|
-
timeout=None,
|
|
320
|
-
metadata=None):
|
|
321
|
-
return grpc.experimental.unary_unary(
|
|
322
|
-
request,
|
|
323
|
-
target,
|
|
324
|
-
'/flwr.proto.SimulationIo/PullAppInputs',
|
|
325
|
-
flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
|
|
326
|
-
flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
|
|
327
|
-
options,
|
|
328
|
-
channel_credentials,
|
|
329
|
-
insecure,
|
|
330
|
-
call_credentials,
|
|
331
|
-
compression,
|
|
332
|
-
wait_for_ready,
|
|
333
|
-
timeout,
|
|
334
|
-
metadata,
|
|
335
|
-
_registered_method=True)
|
|
336
|
-
|
|
337
|
-
@staticmethod
|
|
338
|
-
def PushAppOutputs(request,
|
|
310
|
+
def SendAppHeartbeat(request,
|
|
339
311
|
target,
|
|
340
312
|
options=(),
|
|
341
313
|
channel_credentials=None,
|
|
@@ -348,9 +320,9 @@ class SimulationIo(object):
|
|
|
348
320
|
return grpc.experimental.unary_unary(
|
|
349
321
|
request,
|
|
350
322
|
target,
|
|
351
|
-
'/flwr.proto.SimulationIo/
|
|
352
|
-
|
|
353
|
-
|
|
323
|
+
'/flwr.proto.SimulationIo/SendAppHeartbeat',
|
|
324
|
+
flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
|
|
325
|
+
flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
|
|
354
326
|
options,
|
|
355
327
|
channel_credentials,
|
|
356
328
|
insecure,
|
|
@@ -362,7 +334,7 @@ class SimulationIo(object):
|
|
|
362
334
|
_registered_method=True)
|
|
363
335
|
|
|
364
336
|
@staticmethod
|
|
365
|
-
def
|
|
337
|
+
def PullAppInputs(request,
|
|
366
338
|
target,
|
|
367
339
|
options=(),
|
|
368
340
|
channel_credentials=None,
|
|
@@ -375,9 +347,9 @@ class SimulationIo(object):
|
|
|
375
347
|
return grpc.experimental.unary_unary(
|
|
376
348
|
request,
|
|
377
349
|
target,
|
|
378
|
-
'/flwr.proto.SimulationIo/
|
|
379
|
-
|
|
380
|
-
|
|
350
|
+
'/flwr.proto.SimulationIo/PullAppInputs',
|
|
351
|
+
flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
|
|
352
|
+
flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
|
|
381
353
|
options,
|
|
382
354
|
channel_credentials,
|
|
383
355
|
insecure,
|
|
@@ -389,7 +361,7 @@ class SimulationIo(object):
|
|
|
389
361
|
_registered_method=True)
|
|
390
362
|
|
|
391
363
|
@staticmethod
|
|
392
|
-
def
|
|
364
|
+
def PushAppOutputs(request,
|
|
393
365
|
target,
|
|
394
366
|
options=(),
|
|
395
367
|
channel_credentials=None,
|
|
@@ -402,9 +374,9 @@ class SimulationIo(object):
|
|
|
402
374
|
return grpc.experimental.unary_unary(
|
|
403
375
|
request,
|
|
404
376
|
target,
|
|
405
|
-
'/flwr.proto.SimulationIo/
|
|
406
|
-
|
|
407
|
-
|
|
377
|
+
'/flwr.proto.SimulationIo/PushAppOutputs',
|
|
378
|
+
flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
|
|
379
|
+
flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
|
|
408
380
|
options,
|
|
409
381
|
channel_credentials,
|
|
410
382
|
insecure,
|
|
@@ -416,7 +388,7 @@ class SimulationIo(object):
|
|
|
416
388
|
_registered_method=True)
|
|
417
389
|
|
|
418
390
|
@staticmethod
|
|
419
|
-
def
|
|
391
|
+
def UpdateRunStatus(request,
|
|
420
392
|
target,
|
|
421
393
|
options=(),
|
|
422
394
|
channel_credentials=None,
|
|
@@ -429,9 +401,9 @@ class SimulationIo(object):
|
|
|
429
401
|
return grpc.experimental.unary_unary(
|
|
430
402
|
request,
|
|
431
403
|
target,
|
|
432
|
-
'/flwr.proto.SimulationIo/
|
|
433
|
-
flwr_dot_proto_dot_run__pb2.
|
|
434
|
-
flwr_dot_proto_dot_run__pb2.
|
|
404
|
+
'/flwr.proto.SimulationIo/UpdateRunStatus',
|
|
405
|
+
flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
|
|
406
|
+
flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
|
|
435
407
|
options,
|
|
436
408
|
channel_credentials,
|
|
437
409
|
insecure,
|
|
@@ -443,7 +415,7 @@ class SimulationIo(object):
|
|
|
443
415
|
_registered_method=True)
|
|
444
416
|
|
|
445
417
|
@staticmethod
|
|
446
|
-
def
|
|
418
|
+
def PushLogs(request,
|
|
447
419
|
target,
|
|
448
420
|
options=(),
|
|
449
421
|
channel_credentials=None,
|
|
@@ -456,9 +428,9 @@ class SimulationIo(object):
|
|
|
456
428
|
return grpc.experimental.unary_unary(
|
|
457
429
|
request,
|
|
458
430
|
target,
|
|
459
|
-
'/flwr.proto.SimulationIo/
|
|
460
|
-
|
|
461
|
-
|
|
431
|
+
'/flwr.proto.SimulationIo/PushLogs',
|
|
432
|
+
flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
|
|
433
|
+
flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
|
|
462
434
|
options,
|
|
463
435
|
channel_credentials,
|
|
464
436
|
insecure,
|
|
@@ -470,7 +442,7 @@ class SimulationIo(object):
|
|
|
470
442
|
_registered_method=True)
|
|
471
443
|
|
|
472
444
|
@staticmethod
|
|
473
|
-
def
|
|
445
|
+
def GetFederationOptions(request,
|
|
474
446
|
target,
|
|
475
447
|
options=(),
|
|
476
448
|
channel_credentials=None,
|
|
@@ -483,9 +455,9 @@ class SimulationIo(object):
|
|
|
483
455
|
return grpc.experimental.unary_unary(
|
|
484
456
|
request,
|
|
485
457
|
target,
|
|
486
|
-
'/flwr.proto.SimulationIo/
|
|
487
|
-
|
|
488
|
-
|
|
458
|
+
'/flwr.proto.SimulationIo/GetFederationOptions',
|
|
459
|
+
flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
|
|
460
|
+
flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
|
|
489
461
|
options,
|
|
490
462
|
channel_credentials,
|
|
491
463
|
insecure,
|
|
@@ -40,7 +40,12 @@ class SimulationIoStub:
|
|
|
40
40
|
flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
41
41
|
flwr.proto.appio_pb2.ListAppsToLaunchResponse,
|
|
42
42
|
]
|
|
43
|
-
"""
|
|
43
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
44
|
+
General *AppIo endpoints for SuperExec processes
|
|
45
|
+
///////////////////////////////////////////////////////////////////////////
|
|
46
|
+
|
|
47
|
+
List runs to launch
|
|
48
|
+
"""
|
|
44
49
|
|
|
45
50
|
RequestToken: grpc.UnaryUnaryMultiCallable[
|
|
46
51
|
flwr.proto.appio_pb2.RequestTokenRequest,
|
|
@@ -52,25 +57,41 @@ class SimulationIoStub:
|
|
|
52
57
|
flwr.proto.run_pb2.GetRunRequest,
|
|
53
58
|
flwr.proto.run_pb2.GetRunResponse,
|
|
54
59
|
]
|
|
55
|
-
"""
|
|
60
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
61
|
+
General *AppIo endpoints for App Executor processes
|
|
62
|
+
///////////////////////////////////////////////////////////////////////////
|
|
63
|
+
|
|
64
|
+
Get run details
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
SendAppHeartbeat: grpc.UnaryUnaryMultiCallable[
|
|
68
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
69
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
|
|
70
|
+
]
|
|
71
|
+
"""App heartbeat"""
|
|
56
72
|
|
|
57
73
|
PullAppInputs: grpc.UnaryUnaryMultiCallable[
|
|
58
74
|
flwr.proto.appio_pb2.PullAppInputsRequest,
|
|
59
75
|
flwr.proto.appio_pb2.PullAppInputsResponse,
|
|
60
76
|
]
|
|
61
|
-
"""Pull
|
|
77
|
+
"""Pull app inputs"""
|
|
62
78
|
|
|
63
79
|
PushAppOutputs: grpc.UnaryUnaryMultiCallable[
|
|
64
80
|
flwr.proto.appio_pb2.PushAppOutputsRequest,
|
|
65
81
|
flwr.proto.appio_pb2.PushAppOutputsResponse,
|
|
66
82
|
]
|
|
67
|
-
"""Push
|
|
83
|
+
"""Push app outputs"""
|
|
68
84
|
|
|
69
85
|
UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
|
|
70
86
|
flwr.proto.run_pb2.UpdateRunStatusRequest,
|
|
71
87
|
flwr.proto.run_pb2.UpdateRunStatusResponse,
|
|
72
88
|
]
|
|
73
|
-
"""
|
|
89
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
90
|
+
Specific endpoints shared by ServerAppIo and SimulationIo
|
|
91
|
+
///////////////////////////////////////////////////////////////////////////
|
|
92
|
+
|
|
93
|
+
Update the status of a given run
|
|
94
|
+
"""
|
|
74
95
|
|
|
75
96
|
PushLogs: grpc.UnaryUnaryMultiCallable[
|
|
76
97
|
flwr.proto.log_pb2.PushLogsRequest,
|
|
@@ -82,26 +103,24 @@ class SimulationIoStub:
|
|
|
82
103
|
flwr.proto.run_pb2.GetFederationOptionsRequest,
|
|
83
104
|
flwr.proto.run_pb2.GetFederationOptionsResponse,
|
|
84
105
|
]
|
|
85
|
-
"""
|
|
106
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
107
|
+
Specific endpoints for SimulationIo
|
|
108
|
+
///////////////////////////////////////////////////////////////////////////
|
|
86
109
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
flwr.proto.run_pb2.GetRunStatusResponse,
|
|
90
|
-
]
|
|
91
|
-
"""Get Run Status"""
|
|
92
|
-
|
|
93
|
-
SendAppHeartbeat: grpc.UnaryUnaryMultiCallable[
|
|
94
|
-
flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
95
|
-
flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
|
|
96
|
-
]
|
|
97
|
-
"""App heartbeat"""
|
|
110
|
+
Get Federation Options
|
|
111
|
+
"""
|
|
98
112
|
|
|
99
113
|
class SimulationIoAsyncStub:
|
|
100
114
|
ListAppsToLaunch: grpc.aio.UnaryUnaryMultiCallable[
|
|
101
115
|
flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
102
116
|
flwr.proto.appio_pb2.ListAppsToLaunchResponse,
|
|
103
117
|
]
|
|
104
|
-
"""
|
|
118
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
119
|
+
General *AppIo endpoints for SuperExec processes
|
|
120
|
+
///////////////////////////////////////////////////////////////////////////
|
|
121
|
+
|
|
122
|
+
List runs to launch
|
|
123
|
+
"""
|
|
105
124
|
|
|
106
125
|
RequestToken: grpc.aio.UnaryUnaryMultiCallable[
|
|
107
126
|
flwr.proto.appio_pb2.RequestTokenRequest,
|
|
@@ -113,25 +132,41 @@ class SimulationIoAsyncStub:
|
|
|
113
132
|
flwr.proto.run_pb2.GetRunRequest,
|
|
114
133
|
flwr.proto.run_pb2.GetRunResponse,
|
|
115
134
|
]
|
|
116
|
-
"""
|
|
135
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
136
|
+
General *AppIo endpoints for App Executor processes
|
|
137
|
+
///////////////////////////////////////////////////////////////////////////
|
|
138
|
+
|
|
139
|
+
Get run details
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
SendAppHeartbeat: grpc.aio.UnaryUnaryMultiCallable[
|
|
143
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
144
|
+
flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
|
|
145
|
+
]
|
|
146
|
+
"""App heartbeat"""
|
|
117
147
|
|
|
118
148
|
PullAppInputs: grpc.aio.UnaryUnaryMultiCallable[
|
|
119
149
|
flwr.proto.appio_pb2.PullAppInputsRequest,
|
|
120
150
|
flwr.proto.appio_pb2.PullAppInputsResponse,
|
|
121
151
|
]
|
|
122
|
-
"""Pull
|
|
152
|
+
"""Pull app inputs"""
|
|
123
153
|
|
|
124
154
|
PushAppOutputs: grpc.aio.UnaryUnaryMultiCallable[
|
|
125
155
|
flwr.proto.appio_pb2.PushAppOutputsRequest,
|
|
126
156
|
flwr.proto.appio_pb2.PushAppOutputsResponse,
|
|
127
157
|
]
|
|
128
|
-
"""Push
|
|
158
|
+
"""Push app outputs"""
|
|
129
159
|
|
|
130
160
|
UpdateRunStatus: grpc.aio.UnaryUnaryMultiCallable[
|
|
131
161
|
flwr.proto.run_pb2.UpdateRunStatusRequest,
|
|
132
162
|
flwr.proto.run_pb2.UpdateRunStatusResponse,
|
|
133
163
|
]
|
|
134
|
-
"""
|
|
164
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
165
|
+
Specific endpoints shared by ServerAppIo and SimulationIo
|
|
166
|
+
///////////////////////////////////////////////////////////////////////////
|
|
167
|
+
|
|
168
|
+
Update the status of a given run
|
|
169
|
+
"""
|
|
135
170
|
|
|
136
171
|
PushLogs: grpc.aio.UnaryUnaryMultiCallable[
|
|
137
172
|
flwr.proto.log_pb2.PushLogsRequest,
|
|
@@ -143,19 +178,12 @@ class SimulationIoAsyncStub:
|
|
|
143
178
|
flwr.proto.run_pb2.GetFederationOptionsRequest,
|
|
144
179
|
flwr.proto.run_pb2.GetFederationOptionsResponse,
|
|
145
180
|
]
|
|
146
|
-
"""
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
flwr.proto.run_pb2.GetRunStatusRequest,
|
|
150
|
-
flwr.proto.run_pb2.GetRunStatusResponse,
|
|
151
|
-
]
|
|
152
|
-
"""Get Run Status"""
|
|
181
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
182
|
+
Specific endpoints for SimulationIo
|
|
183
|
+
///////////////////////////////////////////////////////////////////////////
|
|
153
184
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
|
|
157
|
-
]
|
|
158
|
-
"""App heartbeat"""
|
|
185
|
+
Get Federation Options
|
|
186
|
+
"""
|
|
159
187
|
|
|
160
188
|
class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
161
189
|
@abc.abstractmethod
|
|
@@ -164,7 +192,12 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
164
192
|
request: flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
165
193
|
context: _ServicerContext,
|
|
166
194
|
) -> typing.Union[flwr.proto.appio_pb2.ListAppsToLaunchResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.ListAppsToLaunchResponse]]:
|
|
167
|
-
"""
|
|
195
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
196
|
+
General *AppIo endpoints for SuperExec processes
|
|
197
|
+
///////////////////////////////////////////////////////////////////////////
|
|
198
|
+
|
|
199
|
+
List runs to launch
|
|
200
|
+
"""
|
|
168
201
|
|
|
169
202
|
@abc.abstractmethod
|
|
170
203
|
def RequestToken(
|
|
@@ -180,7 +213,20 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
180
213
|
request: flwr.proto.run_pb2.GetRunRequest,
|
|
181
214
|
context: _ServicerContext,
|
|
182
215
|
) -> typing.Union[flwr.proto.run_pb2.GetRunResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetRunResponse]]:
|
|
183
|
-
"""
|
|
216
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
217
|
+
General *AppIo endpoints for App Executor processes
|
|
218
|
+
///////////////////////////////////////////////////////////////////////////
|
|
219
|
+
|
|
220
|
+
Get run details
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
@abc.abstractmethod
|
|
224
|
+
def SendAppHeartbeat(
|
|
225
|
+
self,
|
|
226
|
+
request: flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
227
|
+
context: _ServicerContext,
|
|
228
|
+
) -> typing.Union[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse, collections.abc.Awaitable[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]]:
|
|
229
|
+
"""App heartbeat"""
|
|
184
230
|
|
|
185
231
|
@abc.abstractmethod
|
|
186
232
|
def PullAppInputs(
|
|
@@ -188,7 +234,7 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
188
234
|
request: flwr.proto.appio_pb2.PullAppInputsRequest,
|
|
189
235
|
context: _ServicerContext,
|
|
190
236
|
) -> typing.Union[flwr.proto.appio_pb2.PullAppInputsResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PullAppInputsResponse]]:
|
|
191
|
-
"""Pull
|
|
237
|
+
"""Pull app inputs"""
|
|
192
238
|
|
|
193
239
|
@abc.abstractmethod
|
|
194
240
|
def PushAppOutputs(
|
|
@@ -196,7 +242,7 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
196
242
|
request: flwr.proto.appio_pb2.PushAppOutputsRequest,
|
|
197
243
|
context: _ServicerContext,
|
|
198
244
|
) -> typing.Union[flwr.proto.appio_pb2.PushAppOutputsResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PushAppOutputsResponse]]:
|
|
199
|
-
"""Push
|
|
245
|
+
"""Push app outputs"""
|
|
200
246
|
|
|
201
247
|
@abc.abstractmethod
|
|
202
248
|
def UpdateRunStatus(
|
|
@@ -204,7 +250,12 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
204
250
|
request: flwr.proto.run_pb2.UpdateRunStatusRequest,
|
|
205
251
|
context: _ServicerContext,
|
|
206
252
|
) -> typing.Union[flwr.proto.run_pb2.UpdateRunStatusResponse, collections.abc.Awaitable[flwr.proto.run_pb2.UpdateRunStatusResponse]]:
|
|
207
|
-
"""
|
|
253
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
254
|
+
Specific endpoints shared by ServerAppIo and SimulationIo
|
|
255
|
+
///////////////////////////////////////////////////////////////////////////
|
|
256
|
+
|
|
257
|
+
Update the status of a given run
|
|
258
|
+
"""
|
|
208
259
|
|
|
209
260
|
@abc.abstractmethod
|
|
210
261
|
def PushLogs(
|
|
@@ -220,22 +271,11 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
220
271
|
request: flwr.proto.run_pb2.GetFederationOptionsRequest,
|
|
221
272
|
context: _ServicerContext,
|
|
222
273
|
) -> typing.Union[flwr.proto.run_pb2.GetFederationOptionsResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetFederationOptionsResponse]]:
|
|
223
|
-
"""
|
|
274
|
+
"""///////////////////////////////////////////////////////////////////////////
|
|
275
|
+
Specific endpoints for SimulationIo
|
|
276
|
+
///////////////////////////////////////////////////////////////////////////
|
|
224
277
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
self,
|
|
228
|
-
request: flwr.proto.run_pb2.GetRunStatusRequest,
|
|
229
|
-
context: _ServicerContext,
|
|
230
|
-
) -> typing.Union[flwr.proto.run_pb2.GetRunStatusResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetRunStatusResponse]]:
|
|
231
|
-
"""Get Run Status"""
|
|
232
|
-
|
|
233
|
-
@abc.abstractmethod
|
|
234
|
-
def SendAppHeartbeat(
|
|
235
|
-
self,
|
|
236
|
-
request: flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
|
|
237
|
-
context: _ServicerContext,
|
|
238
|
-
) -> typing.Union[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse, collections.abc.Awaitable[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]]:
|
|
239
|
-
"""App heartbeat"""
|
|
278
|
+
Get Federation Options
|
|
279
|
+
"""
|
|
240
280
|
|
|
241
281
|
def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
|
flwr/server/app.py
CHANGED
|
@@ -31,19 +31,16 @@ import grpc
|
|
|
31
31
|
import yaml
|
|
32
32
|
|
|
33
33
|
from flwr.common import GRPC_MAX_MESSAGE_LENGTH, EventType, event
|
|
34
|
-
from flwr.common.address import parse_address
|
|
35
34
|
from flwr.common.args import try_obtain_server_certificates
|
|
36
35
|
from flwr.common.config import get_flwr_dir
|
|
37
36
|
from flwr.common.constant import (
|
|
38
37
|
AUTHN_TYPE_YAML_KEY,
|
|
39
38
|
AUTHZ_TYPE_YAML_KEY,
|
|
40
|
-
CLIENT_OCTET,
|
|
41
39
|
CONTROL_API_DEFAULT_SERVER_ADDRESS,
|
|
42
40
|
FLEET_API_GRPC_RERE_DEFAULT_ADDRESS,
|
|
43
41
|
FLEET_API_REST_DEFAULT_ADDRESS,
|
|
44
42
|
ISOLATION_MODE_PROCESS,
|
|
45
43
|
ISOLATION_MODE_SUBPROCESS,
|
|
46
|
-
SERVER_OCTET,
|
|
47
44
|
SERVERAPPIO_API_DEFAULT_SERVER_ADDRESS,
|
|
48
45
|
SIMULATIONIO_API_DEFAULT_SERVER_ADDRESS,
|
|
49
46
|
TRANSPORT_TYPE_GRPC_ADAPTER,
|
|
@@ -58,16 +55,17 @@ from flwr.common.event_log_plugin import EventLogWriterPlugin
|
|
|
58
55
|
from flwr.common.exit import ExitCode, flwr_exit, register_signal_handlers
|
|
59
56
|
from flwr.common.grpc import generic_create_grpc_server
|
|
60
57
|
from flwr.common.logger import log
|
|
61
|
-
from flwr.common.version import package_version
|
|
62
58
|
from flwr.proto.fleet_pb2_grpc import ( # pylint: disable=E0611
|
|
63
59
|
add_FleetServicer_to_server,
|
|
64
60
|
)
|
|
65
61
|
from flwr.proto.grpcadapter_pb2_grpc import add_GrpcAdapterServicer_to_server
|
|
66
62
|
from flwr.server.fleet_event_log_interceptor import FleetEventLogInterceptor
|
|
63
|
+
from flwr.supercore.address import parse_address, resolve_bind_address
|
|
67
64
|
from flwr.supercore.constant import FLWR_IN_MEMORY_DB_NAME
|
|
68
65
|
from flwr.supercore.ffs import FfsFactory
|
|
69
66
|
from flwr.supercore.grpc_health import add_args_health, run_health_server_grpc_no_tls
|
|
70
67
|
from flwr.supercore.object_store import ObjectStoreFactory
|
|
68
|
+
from flwr.supercore.version import package_version
|
|
71
69
|
from flwr.superlink.artifact_provider import ArtifactProvider
|
|
72
70
|
from flwr.superlink.auth_plugin import (
|
|
73
71
|
ControlAuthnPlugin,
|
|
@@ -429,16 +427,11 @@ def run_superlink() -> None:
|
|
|
429
427
|
raise ValueError(f"Unknown fleet_api_type: {args.fleet_api_type}")
|
|
430
428
|
|
|
431
429
|
if args.isolation == ISOLATION_MODE_SUBPROCESS:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
io_address = (
|
|
435
|
-
f"{CLIENT_OCTET}:{_port}" if _octet == SERVER_OCTET else serverappio_address
|
|
430
|
+
appio_address = resolve_bind_address(
|
|
431
|
+
simulationio_address if is_simulation else serverappio_address
|
|
436
432
|
)
|
|
437
433
|
command = ["flower-superexec", "--insecure"]
|
|
438
|
-
command += [
|
|
439
|
-
"--appio-api-address",
|
|
440
|
-
simulationio_address if is_simulation else io_address,
|
|
441
|
-
]
|
|
434
|
+
command += ["--appio-api-address", appio_address]
|
|
442
435
|
command += [
|
|
443
436
|
"--plugin-type",
|
|
444
437
|
ExecPluginType.SIMULATION if is_simulation else ExecPluginType.SERVER_APP,
|
|
@@ -492,7 +485,7 @@ def _load_control_auth_plugins(
|
|
|
492
485
|
}
|
|
493
486
|
# Load YAML file
|
|
494
487
|
else:
|
|
495
|
-
with Path(config_path).open("r", encoding="utf-8") as file:
|
|
488
|
+
with Path(config_path).expanduser().open("r", encoding="utf-8") as file:
|
|
496
489
|
config = yaml.safe_load(file)
|
|
497
490
|
|
|
498
491
|
def _load_plugin(
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
from flwr import common
|
|
19
|
-
from flwr.
|
|
19
|
+
from flwr.app.message_type import MessageType
|
|
20
|
+
from flwr.common import Message, MessageTypeLegacy, RecordDict
|
|
20
21
|
from flwr.common import recorddict_compat as compat
|
|
21
22
|
from flwr.server.client_proxy import ClientProxy
|
|
22
23
|
|