flwr 1.19.0__py3-none-any.whl → 1.21.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 +4 -1
- flwr/app/__init__.py +28 -0
- flwr/app/exception.py +31 -0
- flwr/cli/auth_plugin/oidc_cli_plugin.py +4 -4
- flwr/cli/build.py +15 -5
- flwr/cli/cli_user_auth_interceptor.py +1 -1
- flwr/cli/config_utils.py +3 -3
- flwr/cli/constant.py +25 -8
- flwr/cli/log.py +9 -9
- flwr/cli/login/login.py +3 -3
- flwr/cli/ls.py +5 -5
- flwr/cli/new/new.py +23 -4
- flwr/cli/new/templates/app/README.flowertune.md.tpl +2 -0
- flwr/cli/new/templates/app/README.md.tpl +5 -0
- flwr/cli/new/templates/app/code/__init__.pytorch_msg_api.py.tpl +1 -0
- flwr/cli/new/templates/app/code/client.pytorch_msg_api.py.tpl +80 -0
- flwr/cli/new/templates/app/code/server.pytorch_msg_api.py.tpl +41 -0
- flwr/cli/new/templates/app/code/task.pytorch_msg_api.py.tpl +98 -0
- flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +14 -3
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +13 -1
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +21 -2
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +18 -1
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +19 -2
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +18 -1
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +20 -3
- flwr/cli/new/templates/app/pyproject.pytorch_msg_api.toml.tpl +53 -0
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +18 -1
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +18 -1
- flwr/cli/run/run.py +53 -50
- flwr/cli/stop.py +7 -4
- flwr/cli/utils.py +29 -11
- flwr/client/grpc_adapter_client/connection.py +11 -4
- flwr/client/grpc_rere_client/connection.py +93 -129
- flwr/client/rest_client/connection.py +134 -164
- flwr/clientapp/__init__.py +10 -0
- flwr/clientapp/mod/__init__.py +26 -0
- flwr/clientapp/mod/centraldp_mods.py +132 -0
- flwr/common/args.py +20 -6
- flwr/common/auth_plugin/__init__.py +4 -4
- flwr/common/auth_plugin/auth_plugin.py +7 -7
- flwr/common/constant.py +26 -5
- flwr/common/event_log_plugin/event_log_plugin.py +1 -1
- flwr/common/exit/__init__.py +4 -0
- flwr/common/exit/exit.py +8 -1
- flwr/common/exit/exit_code.py +42 -8
- flwr/common/exit/exit_handler.py +62 -0
- flwr/common/{exit_handlers.py → exit/signal_handler.py} +20 -37
- flwr/common/grpc.py +1 -1
- flwr/common/{inflatable_grpc_utils.py → inflatable_protobuf_utils.py} +52 -10
- flwr/common/inflatable_utils.py +191 -24
- flwr/common/logger.py +1 -1
- flwr/common/record/array.py +101 -22
- flwr/common/record/arraychunk.py +59 -0
- flwr/common/retry_invoker.py +30 -11
- flwr/common/serde.py +0 -28
- flwr/common/telemetry.py +4 -0
- flwr/compat/client/app.py +14 -31
- flwr/compat/server/app.py +2 -2
- flwr/proto/appio_pb2.py +51 -0
- flwr/proto/appio_pb2.pyi +195 -0
- flwr/proto/appio_pb2_grpc.py +4 -0
- flwr/proto/appio_pb2_grpc.pyi +4 -0
- flwr/proto/clientappio_pb2.py +4 -19
- flwr/proto/clientappio_pb2.pyi +0 -125
- flwr/proto/clientappio_pb2_grpc.py +269 -29
- flwr/proto/clientappio_pb2_grpc.pyi +114 -21
- flwr/proto/control_pb2.py +62 -0
- flwr/proto/{exec_pb2_grpc.py → control_pb2_grpc.py} +54 -54
- flwr/proto/{exec_pb2_grpc.pyi → control_pb2_grpc.pyi} +28 -28
- flwr/proto/fleet_pb2.py +12 -20
- flwr/proto/fleet_pb2.pyi +6 -36
- flwr/proto/serverappio_pb2.py +8 -31
- flwr/proto/serverappio_pb2.pyi +0 -152
- flwr/proto/serverappio_pb2_grpc.py +107 -38
- flwr/proto/serverappio_pb2_grpc.pyi +47 -20
- flwr/proto/simulationio_pb2.py +4 -11
- flwr/proto/simulationio_pb2.pyi +0 -58
- flwr/proto/simulationio_pb2_grpc.py +129 -27
- flwr/proto/simulationio_pb2_grpc.pyi +52 -13
- flwr/server/app.py +130 -153
- flwr/server/fleet_event_log_interceptor.py +4 -0
- flwr/server/grid/grpc_grid.py +94 -54
- flwr/server/grid/inmemory_grid.py +1 -0
- flwr/server/serverapp/app.py +165 -144
- flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +8 -0
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +1 -1
- flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +2 -5
- flwr/server/superlink/fleet/message_handler/message_handler.py +10 -16
- flwr/server/superlink/fleet/rest_rere/rest_api.py +1 -2
- flwr/server/superlink/fleet/vce/backend/raybackend.py +3 -1
- flwr/server/superlink/fleet/vce/vce_api.py +6 -6
- flwr/server/superlink/linkstate/in_memory_linkstate.py +34 -0
- flwr/server/superlink/linkstate/linkstate.py +2 -1
- flwr/server/superlink/linkstate/sqlite_linkstate.py +45 -0
- flwr/server/superlink/serverappio/serverappio_grpc.py +2 -2
- flwr/server/superlink/serverappio/serverappio_servicer.py +95 -48
- flwr/server/superlink/simulation/simulationio_grpc.py +1 -1
- flwr/server/superlink/simulation/simulationio_servicer.py +98 -22
- flwr/server/superlink/utils.py +0 -35
- flwr/serverapp/__init__.py +12 -0
- flwr/serverapp/dp_fixed_clipping.py +352 -0
- flwr/serverapp/exception.py +38 -0
- flwr/serverapp/strategy/__init__.py +38 -0
- flwr/serverapp/strategy/dp_fixed_clipping.py +352 -0
- flwr/serverapp/strategy/fedadagrad.py +162 -0
- flwr/serverapp/strategy/fedadam.py +181 -0
- flwr/serverapp/strategy/fedavg.py +295 -0
- flwr/serverapp/strategy/fedopt.py +218 -0
- flwr/serverapp/strategy/fedyogi.py +173 -0
- flwr/serverapp/strategy/result.py +105 -0
- flwr/serverapp/strategy/strategy.py +285 -0
- flwr/serverapp/strategy/strategy_utils.py +251 -0
- flwr/serverapp/strategy/strategy_utils_tests.py +304 -0
- flwr/simulation/app.py +159 -154
- flwr/simulation/run_simulation.py +17 -0
- flwr/supercore/app_utils.py +58 -0
- flwr/supercore/cli/__init__.py +22 -0
- flwr/supercore/cli/flower_superexec.py +141 -0
- flwr/supercore/corestate/__init__.py +22 -0
- flwr/supercore/corestate/corestate.py +81 -0
- flwr/{server/superlink → supercore}/ffs/disk_ffs.py +1 -1
- flwr/supercore/grpc_health/__init__.py +25 -0
- flwr/supercore/grpc_health/health_server.py +53 -0
- flwr/supercore/grpc_health/simple_health_servicer.py +38 -0
- flwr/supercore/license_plugin/__init__.py +22 -0
- flwr/supercore/license_plugin/license_plugin.py +26 -0
- flwr/supercore/object_store/in_memory_object_store.py +31 -31
- flwr/supercore/object_store/object_store.py +20 -42
- flwr/supercore/object_store/utils.py +43 -0
- flwr/{superexec → supercore/superexec}/__init__.py +1 -1
- flwr/supercore/superexec/plugin/__init__.py +28 -0
- flwr/supercore/superexec/plugin/base_exec_plugin.py +53 -0
- flwr/supercore/superexec/plugin/clientapp_exec_plugin.py +28 -0
- flwr/supercore/superexec/plugin/exec_plugin.py +71 -0
- flwr/supercore/superexec/plugin/serverapp_exec_plugin.py +28 -0
- flwr/supercore/superexec/plugin/simulation_exec_plugin.py +28 -0
- flwr/supercore/superexec/run_superexec.py +185 -0
- flwr/supercore/utils.py +32 -0
- flwr/superlink/servicer/__init__.py +15 -0
- flwr/superlink/servicer/control/__init__.py +22 -0
- flwr/{superexec/exec_event_log_interceptor.py → superlink/servicer/control/control_event_log_interceptor.py} +9 -5
- flwr/{superexec/exec_grpc.py → superlink/servicer/control/control_grpc.py} +39 -28
- flwr/superlink/servicer/control/control_license_interceptor.py +82 -0
- flwr/{superexec/exec_servicer.py → superlink/servicer/control/control_servicer.py} +79 -31
- flwr/{superexec/exec_user_auth_interceptor.py → superlink/servicer/control/control_user_auth_interceptor.py} +18 -10
- flwr/supernode/cli/flower_supernode.py +3 -7
- flwr/supernode/cli/flwr_clientapp.py +20 -16
- flwr/supernode/nodestate/in_memory_nodestate.py +13 -4
- flwr/supernode/nodestate/nodestate.py +3 -44
- flwr/supernode/runtime/run_clientapp.py +129 -115
- flwr/supernode/servicer/clientappio/__init__.py +1 -3
- flwr/supernode/servicer/clientappio/clientappio_servicer.py +217 -165
- flwr/supernode/start_client_internal.py +205 -148
- {flwr-1.19.0.dist-info → flwr-1.21.0.dist-info}/METADATA +5 -3
- {flwr-1.19.0.dist-info → flwr-1.21.0.dist-info}/RECORD +161 -117
- {flwr-1.19.0.dist-info → flwr-1.21.0.dist-info}/entry_points.txt +1 -0
- flwr/common/inflatable_rest_utils.py +0 -99
- flwr/proto/exec_pb2.py +0 -62
- flwr/superexec/app.py +0 -45
- flwr/superexec/deployment.py +0 -192
- flwr/superexec/executor.py +0 -100
- flwr/superexec/simulation.py +0 -130
- /flwr/proto/{exec_pb2.pyi → control_pb2.pyi} +0 -0
- /flwr/{server/superlink → supercore}/ffs/__init__.py +0 -0
- /flwr/{server/superlink → supercore}/ffs/ffs.py +0 -0
- /flwr/{server/superlink → supercore}/ffs/ffs_factory.py +0 -0
- {flwr-1.19.0.dist-info → flwr-1.21.0.dist-info}/WHEEL +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
3
|
import grpc
|
|
4
4
|
|
|
5
|
+
from flwr.proto import appio_pb2 as flwr_dot_proto_dot_appio__pb2
|
|
5
6
|
from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
|
|
6
7
|
from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
|
|
7
8
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
8
|
-
from flwr.proto import simulationio_pb2 as flwr_dot_proto_dot_simulationio__pb2
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class SimulationIoStub(object):
|
|
@@ -17,15 +17,30 @@ class SimulationIoStub(object):
|
|
|
17
17
|
Args:
|
|
18
18
|
channel: A grpc.Channel.
|
|
19
19
|
"""
|
|
20
|
-
self.
|
|
21
|
-
'/flwr.proto.SimulationIo/
|
|
22
|
-
request_serializer=
|
|
23
|
-
response_deserializer=
|
|
20
|
+
self.ListAppsToLaunch = channel.unary_unary(
|
|
21
|
+
'/flwr.proto.SimulationIo/ListAppsToLaunch',
|
|
22
|
+
request_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
|
|
23
|
+
response_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
|
|
24
24
|
)
|
|
25
|
-
self.
|
|
26
|
-
'/flwr.proto.SimulationIo/
|
|
27
|
-
request_serializer=
|
|
28
|
-
response_deserializer=
|
|
25
|
+
self.RequestToken = channel.unary_unary(
|
|
26
|
+
'/flwr.proto.SimulationIo/RequestToken',
|
|
27
|
+
request_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
|
|
28
|
+
response_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
|
|
29
|
+
)
|
|
30
|
+
self.GetRun = channel.unary_unary(
|
|
31
|
+
'/flwr.proto.SimulationIo/GetRun',
|
|
32
|
+
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
33
|
+
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
34
|
+
)
|
|
35
|
+
self.PullAppInputs = channel.unary_unary(
|
|
36
|
+
'/flwr.proto.SimulationIo/PullAppInputs',
|
|
37
|
+
request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
|
|
38
|
+
response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
|
|
39
|
+
)
|
|
40
|
+
self.PushAppOutputs = channel.unary_unary(
|
|
41
|
+
'/flwr.proto.SimulationIo/PushAppOutputs',
|
|
42
|
+
request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
|
|
43
|
+
response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
|
|
29
44
|
)
|
|
30
45
|
self.UpdateRunStatus = channel.unary_unary(
|
|
31
46
|
'/flwr.proto.SimulationIo/UpdateRunStatus',
|
|
@@ -57,14 +72,35 @@ class SimulationIoStub(object):
|
|
|
57
72
|
class SimulationIoServicer(object):
|
|
58
73
|
"""Missing associated documentation comment in .proto file."""
|
|
59
74
|
|
|
60
|
-
def
|
|
75
|
+
def ListAppsToLaunch(self, request, context):
|
|
76
|
+
"""List runs to launch
|
|
77
|
+
"""
|
|
78
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
79
|
+
context.set_details('Method not implemented!')
|
|
80
|
+
raise NotImplementedError('Method not implemented!')
|
|
81
|
+
|
|
82
|
+
def RequestToken(self, request, context):
|
|
83
|
+
"""Request token for a run
|
|
84
|
+
"""
|
|
85
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
86
|
+
context.set_details('Method not implemented!')
|
|
87
|
+
raise NotImplementedError('Method not implemented!')
|
|
88
|
+
|
|
89
|
+
def GetRun(self, request, context):
|
|
90
|
+
"""Get run details
|
|
91
|
+
"""
|
|
92
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
93
|
+
context.set_details('Method not implemented!')
|
|
94
|
+
raise NotImplementedError('Method not implemented!')
|
|
95
|
+
|
|
96
|
+
def PullAppInputs(self, request, context):
|
|
61
97
|
"""Pull Simulation inputs
|
|
62
98
|
"""
|
|
63
99
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
64
100
|
context.set_details('Method not implemented!')
|
|
65
101
|
raise NotImplementedError('Method not implemented!')
|
|
66
102
|
|
|
67
|
-
def
|
|
103
|
+
def PushAppOutputs(self, request, context):
|
|
68
104
|
"""Push Simulation outputs
|
|
69
105
|
"""
|
|
70
106
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
@@ -109,15 +145,30 @@ class SimulationIoServicer(object):
|
|
|
109
145
|
|
|
110
146
|
def add_SimulationIoServicer_to_server(servicer, server):
|
|
111
147
|
rpc_method_handlers = {
|
|
112
|
-
'
|
|
113
|
-
servicer.
|
|
114
|
-
request_deserializer=
|
|
115
|
-
response_serializer=
|
|
148
|
+
'ListAppsToLaunch': grpc.unary_unary_rpc_method_handler(
|
|
149
|
+
servicer.ListAppsToLaunch,
|
|
150
|
+
request_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.FromString,
|
|
151
|
+
response_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.SerializeToString,
|
|
152
|
+
),
|
|
153
|
+
'RequestToken': grpc.unary_unary_rpc_method_handler(
|
|
154
|
+
servicer.RequestToken,
|
|
155
|
+
request_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.FromString,
|
|
156
|
+
response_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.SerializeToString,
|
|
116
157
|
),
|
|
117
|
-
'
|
|
118
|
-
servicer.
|
|
119
|
-
request_deserializer=
|
|
120
|
-
response_serializer=
|
|
158
|
+
'GetRun': grpc.unary_unary_rpc_method_handler(
|
|
159
|
+
servicer.GetRun,
|
|
160
|
+
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.FromString,
|
|
161
|
+
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.SerializeToString,
|
|
162
|
+
),
|
|
163
|
+
'PullAppInputs': grpc.unary_unary_rpc_method_handler(
|
|
164
|
+
servicer.PullAppInputs,
|
|
165
|
+
request_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.FromString,
|
|
166
|
+
response_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.SerializeToString,
|
|
167
|
+
),
|
|
168
|
+
'PushAppOutputs': grpc.unary_unary_rpc_method_handler(
|
|
169
|
+
servicer.PushAppOutputs,
|
|
170
|
+
request_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.FromString,
|
|
171
|
+
response_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.SerializeToString,
|
|
121
172
|
),
|
|
122
173
|
'UpdateRunStatus': grpc.unary_unary_rpc_method_handler(
|
|
123
174
|
servicer.UpdateRunStatus,
|
|
@@ -155,7 +206,58 @@ class SimulationIo(object):
|
|
|
155
206
|
"""Missing associated documentation comment in .proto file."""
|
|
156
207
|
|
|
157
208
|
@staticmethod
|
|
158
|
-
def
|
|
209
|
+
def ListAppsToLaunch(request,
|
|
210
|
+
target,
|
|
211
|
+
options=(),
|
|
212
|
+
channel_credentials=None,
|
|
213
|
+
call_credentials=None,
|
|
214
|
+
insecure=False,
|
|
215
|
+
compression=None,
|
|
216
|
+
wait_for_ready=None,
|
|
217
|
+
timeout=None,
|
|
218
|
+
metadata=None):
|
|
219
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/ListAppsToLaunch',
|
|
220
|
+
flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
|
|
221
|
+
flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
|
|
222
|
+
options, channel_credentials,
|
|
223
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
224
|
+
|
|
225
|
+
@staticmethod
|
|
226
|
+
def RequestToken(request,
|
|
227
|
+
target,
|
|
228
|
+
options=(),
|
|
229
|
+
channel_credentials=None,
|
|
230
|
+
call_credentials=None,
|
|
231
|
+
insecure=False,
|
|
232
|
+
compression=None,
|
|
233
|
+
wait_for_ready=None,
|
|
234
|
+
timeout=None,
|
|
235
|
+
metadata=None):
|
|
236
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/RequestToken',
|
|
237
|
+
flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
|
|
238
|
+
flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
|
|
239
|
+
options, channel_credentials,
|
|
240
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
241
|
+
|
|
242
|
+
@staticmethod
|
|
243
|
+
def GetRun(request,
|
|
244
|
+
target,
|
|
245
|
+
options=(),
|
|
246
|
+
channel_credentials=None,
|
|
247
|
+
call_credentials=None,
|
|
248
|
+
insecure=False,
|
|
249
|
+
compression=None,
|
|
250
|
+
wait_for_ready=None,
|
|
251
|
+
timeout=None,
|
|
252
|
+
metadata=None):
|
|
253
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetRun',
|
|
254
|
+
flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
255
|
+
flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
256
|
+
options, channel_credentials,
|
|
257
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
258
|
+
|
|
259
|
+
@staticmethod
|
|
260
|
+
def PullAppInputs(request,
|
|
159
261
|
target,
|
|
160
262
|
options=(),
|
|
161
263
|
channel_credentials=None,
|
|
@@ -165,14 +267,14 @@ class SimulationIo(object):
|
|
|
165
267
|
wait_for_ready=None,
|
|
166
268
|
timeout=None,
|
|
167
269
|
metadata=None):
|
|
168
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/
|
|
169
|
-
|
|
170
|
-
|
|
270
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PullAppInputs',
|
|
271
|
+
flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
|
|
272
|
+
flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
|
|
171
273
|
options, channel_credentials,
|
|
172
274
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
173
275
|
|
|
174
276
|
@staticmethod
|
|
175
|
-
def
|
|
277
|
+
def PushAppOutputs(request,
|
|
176
278
|
target,
|
|
177
279
|
options=(),
|
|
178
280
|
channel_credentials=None,
|
|
@@ -182,9 +284,9 @@ class SimulationIo(object):
|
|
|
182
284
|
wait_for_ready=None,
|
|
183
285
|
timeout=None,
|
|
184
286
|
metadata=None):
|
|
185
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/
|
|
186
|
-
|
|
187
|
-
|
|
287
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushAppOutputs',
|
|
288
|
+
flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
|
|
289
|
+
flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
|
|
188
290
|
options, channel_credentials,
|
|
189
291
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
190
292
|
|
|
@@ -3,22 +3,37 @@
|
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
5
|
import abc
|
|
6
|
+
import flwr.proto.appio_pb2
|
|
6
7
|
import flwr.proto.heartbeat_pb2
|
|
7
8
|
import flwr.proto.log_pb2
|
|
8
9
|
import flwr.proto.run_pb2
|
|
9
|
-
import flwr.proto.simulationio_pb2
|
|
10
10
|
import grpc
|
|
11
11
|
|
|
12
12
|
class SimulationIoStub:
|
|
13
13
|
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
14
|
-
|
|
15
|
-
flwr.proto.
|
|
16
|
-
flwr.proto.
|
|
14
|
+
ListAppsToLaunch: grpc.UnaryUnaryMultiCallable[
|
|
15
|
+
flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
16
|
+
flwr.proto.appio_pb2.ListAppsToLaunchResponse]
|
|
17
|
+
"""List runs to launch"""
|
|
18
|
+
|
|
19
|
+
RequestToken: grpc.UnaryUnaryMultiCallable[
|
|
20
|
+
flwr.proto.appio_pb2.RequestTokenRequest,
|
|
21
|
+
flwr.proto.appio_pb2.RequestTokenResponse]
|
|
22
|
+
"""Request token for a run"""
|
|
23
|
+
|
|
24
|
+
GetRun: grpc.UnaryUnaryMultiCallable[
|
|
25
|
+
flwr.proto.run_pb2.GetRunRequest,
|
|
26
|
+
flwr.proto.run_pb2.GetRunResponse]
|
|
27
|
+
"""Get run details"""
|
|
28
|
+
|
|
29
|
+
PullAppInputs: grpc.UnaryUnaryMultiCallable[
|
|
30
|
+
flwr.proto.appio_pb2.PullAppInputsRequest,
|
|
31
|
+
flwr.proto.appio_pb2.PullAppInputsResponse]
|
|
17
32
|
"""Pull Simulation inputs"""
|
|
18
33
|
|
|
19
|
-
|
|
20
|
-
flwr.proto.
|
|
21
|
-
flwr.proto.
|
|
34
|
+
PushAppOutputs: grpc.UnaryUnaryMultiCallable[
|
|
35
|
+
flwr.proto.appio_pb2.PushAppOutputsRequest,
|
|
36
|
+
flwr.proto.appio_pb2.PushAppOutputsResponse]
|
|
22
37
|
"""Push Simulation outputs"""
|
|
23
38
|
|
|
24
39
|
UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
|
|
@@ -49,18 +64,42 @@ class SimulationIoStub:
|
|
|
49
64
|
|
|
50
65
|
class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
51
66
|
@abc.abstractmethod
|
|
52
|
-
def
|
|
53
|
-
request: flwr.proto.
|
|
67
|
+
def ListAppsToLaunch(self,
|
|
68
|
+
request: flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
54
69
|
context: grpc.ServicerContext,
|
|
55
|
-
) -> flwr.proto.
|
|
70
|
+
) -> flwr.proto.appio_pb2.ListAppsToLaunchResponse:
|
|
71
|
+
"""List runs to launch"""
|
|
72
|
+
pass
|
|
73
|
+
|
|
74
|
+
@abc.abstractmethod
|
|
75
|
+
def RequestToken(self,
|
|
76
|
+
request: flwr.proto.appio_pb2.RequestTokenRequest,
|
|
77
|
+
context: grpc.ServicerContext,
|
|
78
|
+
) -> flwr.proto.appio_pb2.RequestTokenResponse:
|
|
79
|
+
"""Request token for a run"""
|
|
80
|
+
pass
|
|
81
|
+
|
|
82
|
+
@abc.abstractmethod
|
|
83
|
+
def GetRun(self,
|
|
84
|
+
request: flwr.proto.run_pb2.GetRunRequest,
|
|
85
|
+
context: grpc.ServicerContext,
|
|
86
|
+
) -> flwr.proto.run_pb2.GetRunResponse:
|
|
87
|
+
"""Get run details"""
|
|
88
|
+
pass
|
|
89
|
+
|
|
90
|
+
@abc.abstractmethod
|
|
91
|
+
def PullAppInputs(self,
|
|
92
|
+
request: flwr.proto.appio_pb2.PullAppInputsRequest,
|
|
93
|
+
context: grpc.ServicerContext,
|
|
94
|
+
) -> flwr.proto.appio_pb2.PullAppInputsResponse:
|
|
56
95
|
"""Pull Simulation inputs"""
|
|
57
96
|
pass
|
|
58
97
|
|
|
59
98
|
@abc.abstractmethod
|
|
60
|
-
def
|
|
61
|
-
request: flwr.proto.
|
|
99
|
+
def PushAppOutputs(self,
|
|
100
|
+
request: flwr.proto.appio_pb2.PushAppOutputsRequest,
|
|
62
101
|
context: grpc.ServicerContext,
|
|
63
|
-
) -> flwr.proto.
|
|
102
|
+
) -> flwr.proto.appio_pb2.PushAppOutputsResponse:
|
|
64
103
|
"""Push Simulation outputs"""
|
|
65
104
|
pass
|
|
66
105
|
|