flwr 1.20.0__py3-none-any.whl → 1.22.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.
Files changed (182) hide show
  1. flwr/__init__.py +4 -1
  2. flwr/app/__init__.py +28 -0
  3. flwr/app/exception.py +31 -0
  4. flwr/cli/app.py +2 -0
  5. flwr/cli/auth_plugin/oidc_cli_plugin.py +4 -4
  6. flwr/cli/cli_user_auth_interceptor.py +1 -1
  7. flwr/cli/config_utils.py +3 -3
  8. flwr/cli/constant.py +25 -8
  9. flwr/cli/log.py +9 -9
  10. flwr/cli/login/login.py +3 -3
  11. flwr/cli/ls.py +5 -5
  12. flwr/cli/new/new.py +15 -2
  13. flwr/cli/new/templates/app/README.flowertune.md.tpl +1 -1
  14. flwr/cli/new/templates/app/code/__init__.pytorch_legacy_api.py.tpl +1 -0
  15. flwr/cli/new/templates/app/code/client.baseline.py.tpl +64 -47
  16. flwr/cli/new/templates/app/code/client.huggingface.py.tpl +68 -30
  17. flwr/cli/new/templates/app/code/client.jax.py.tpl +63 -42
  18. flwr/cli/new/templates/app/code/client.mlx.py.tpl +80 -51
  19. flwr/cli/new/templates/app/code/client.numpy.py.tpl +36 -13
  20. flwr/cli/new/templates/app/code/client.pytorch.py.tpl +71 -46
  21. flwr/cli/new/templates/app/code/client.pytorch_legacy_api.py.tpl +55 -0
  22. flwr/cli/new/templates/app/code/client.sklearn.py.tpl +75 -30
  23. flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +69 -44
  24. flwr/cli/new/templates/app/code/client.xgboost.py.tpl +110 -0
  25. flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +56 -90
  26. flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +1 -23
  27. flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +37 -58
  28. flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +39 -44
  29. flwr/cli/new/templates/app/code/model.baseline.py.tpl +0 -14
  30. flwr/cli/new/templates/app/code/server.baseline.py.tpl +27 -29
  31. flwr/cli/new/templates/app/code/server.huggingface.py.tpl +23 -19
  32. flwr/cli/new/templates/app/code/server.jax.py.tpl +27 -14
  33. flwr/cli/new/templates/app/code/server.mlx.py.tpl +29 -19
  34. flwr/cli/new/templates/app/code/server.numpy.py.tpl +30 -17
  35. flwr/cli/new/templates/app/code/server.pytorch.py.tpl +36 -26
  36. flwr/cli/new/templates/app/code/server.pytorch_legacy_api.py.tpl +31 -0
  37. flwr/cli/new/templates/app/code/server.sklearn.py.tpl +29 -21
  38. flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +28 -19
  39. flwr/cli/new/templates/app/code/server.xgboost.py.tpl +56 -0
  40. flwr/cli/new/templates/app/code/task.huggingface.py.tpl +16 -20
  41. flwr/cli/new/templates/app/code/task.jax.py.tpl +1 -1
  42. flwr/cli/new/templates/app/code/task.numpy.py.tpl +1 -1
  43. flwr/cli/new/templates/app/code/task.pytorch.py.tpl +14 -27
  44. flwr/cli/new/templates/app/code/task.pytorch_legacy_api.py.tpl +111 -0
  45. flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +1 -2
  46. flwr/cli/new/templates/app/code/task.xgboost.py.tpl +67 -0
  47. flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +4 -4
  48. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +2 -2
  49. flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +4 -4
  50. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
  51. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +2 -2
  52. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
  53. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +3 -3
  54. flwr/cli/new/templates/app/pyproject.pytorch_legacy_api.toml.tpl +53 -0
  55. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
  56. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
  57. flwr/cli/new/templates/app/pyproject.xgboost.toml.tpl +61 -0
  58. flwr/cli/pull.py +100 -0
  59. flwr/cli/run/run.py +9 -13
  60. flwr/cli/stop.py +7 -4
  61. flwr/cli/utils.py +36 -8
  62. flwr/client/grpc_rere_client/connection.py +1 -12
  63. flwr/client/rest_client/connection.py +3 -0
  64. flwr/clientapp/__init__.py +10 -0
  65. flwr/clientapp/mod/__init__.py +29 -0
  66. flwr/clientapp/mod/centraldp_mods.py +248 -0
  67. flwr/clientapp/mod/localdp_mod.py +169 -0
  68. flwr/clientapp/typing.py +22 -0
  69. flwr/common/args.py +20 -6
  70. flwr/common/auth_plugin/__init__.py +4 -4
  71. flwr/common/auth_plugin/auth_plugin.py +7 -7
  72. flwr/common/constant.py +26 -4
  73. flwr/common/event_log_plugin/event_log_plugin.py +1 -1
  74. flwr/common/exit/__init__.py +4 -0
  75. flwr/common/exit/exit.py +8 -1
  76. flwr/common/exit/exit_code.py +30 -7
  77. flwr/common/exit/exit_handler.py +62 -0
  78. flwr/common/{exit_handlers.py → exit/signal_handler.py} +20 -37
  79. flwr/common/grpc.py +0 -11
  80. flwr/common/inflatable_utils.py +1 -1
  81. flwr/common/logger.py +1 -1
  82. flwr/common/record/typeddict.py +12 -0
  83. flwr/common/retry_invoker.py +30 -11
  84. flwr/common/telemetry.py +4 -0
  85. flwr/compat/server/app.py +2 -2
  86. flwr/proto/appio_pb2.py +25 -17
  87. flwr/proto/appio_pb2.pyi +46 -2
  88. flwr/proto/clientappio_pb2.py +3 -11
  89. flwr/proto/clientappio_pb2.pyi +0 -47
  90. flwr/proto/clientappio_pb2_grpc.py +19 -20
  91. flwr/proto/clientappio_pb2_grpc.pyi +10 -11
  92. flwr/proto/control_pb2.py +66 -0
  93. flwr/proto/{exec_pb2.pyi → control_pb2.pyi} +24 -0
  94. flwr/proto/{exec_pb2_grpc.py → control_pb2_grpc.py} +88 -54
  95. flwr/proto/control_pb2_grpc.pyi +106 -0
  96. flwr/proto/serverappio_pb2.py +2 -2
  97. flwr/proto/serverappio_pb2_grpc.py +68 -0
  98. flwr/proto/serverappio_pb2_grpc.pyi +26 -0
  99. flwr/proto/simulationio_pb2.py +4 -11
  100. flwr/proto/simulationio_pb2.pyi +0 -58
  101. flwr/proto/simulationio_pb2_grpc.py +129 -27
  102. flwr/proto/simulationio_pb2_grpc.pyi +52 -13
  103. flwr/server/app.py +142 -152
  104. flwr/server/grid/grpc_grid.py +3 -0
  105. flwr/server/grid/inmemory_grid.py +1 -0
  106. flwr/server/serverapp/app.py +157 -146
  107. flwr/server/superlink/fleet/vce/backend/raybackend.py +3 -1
  108. flwr/server/superlink/fleet/vce/vce_api.py +6 -6
  109. flwr/server/superlink/linkstate/in_memory_linkstate.py +34 -0
  110. flwr/server/superlink/linkstate/linkstate.py +2 -1
  111. flwr/server/superlink/linkstate/sqlite_linkstate.py +45 -0
  112. flwr/server/superlink/serverappio/serverappio_grpc.py +1 -1
  113. flwr/server/superlink/serverappio/serverappio_servicer.py +61 -6
  114. flwr/server/superlink/simulation/simulationio_servicer.py +97 -21
  115. flwr/serverapp/__init__.py +12 -0
  116. flwr/serverapp/exception.py +38 -0
  117. flwr/serverapp/strategy/__init__.py +64 -0
  118. flwr/serverapp/strategy/bulyan.py +238 -0
  119. flwr/serverapp/strategy/dp_adaptive_clipping.py +335 -0
  120. flwr/serverapp/strategy/dp_fixed_clipping.py +374 -0
  121. flwr/serverapp/strategy/fedadagrad.py +159 -0
  122. flwr/serverapp/strategy/fedadam.py +178 -0
  123. flwr/serverapp/strategy/fedavg.py +320 -0
  124. flwr/serverapp/strategy/fedavgm.py +198 -0
  125. flwr/serverapp/strategy/fedmedian.py +105 -0
  126. flwr/serverapp/strategy/fedopt.py +218 -0
  127. flwr/serverapp/strategy/fedprox.py +174 -0
  128. flwr/serverapp/strategy/fedtrimmedavg.py +176 -0
  129. flwr/serverapp/strategy/fedxgb_bagging.py +117 -0
  130. flwr/serverapp/strategy/fedxgb_cyclic.py +220 -0
  131. flwr/serverapp/strategy/fedyogi.py +170 -0
  132. flwr/serverapp/strategy/krum.py +112 -0
  133. flwr/serverapp/strategy/multikrum.py +247 -0
  134. flwr/serverapp/strategy/qfedavg.py +252 -0
  135. flwr/serverapp/strategy/result.py +105 -0
  136. flwr/serverapp/strategy/strategy.py +285 -0
  137. flwr/serverapp/strategy/strategy_utils.py +299 -0
  138. flwr/simulation/app.py +161 -164
  139. flwr/simulation/run_simulation.py +25 -30
  140. flwr/supercore/app_utils.py +58 -0
  141. flwr/{supernode/scheduler → supercore/cli}/__init__.py +3 -3
  142. flwr/supercore/cli/flower_superexec.py +166 -0
  143. flwr/supercore/constant.py +19 -0
  144. flwr/supercore/{scheduler → corestate}/__init__.py +3 -3
  145. flwr/supercore/corestate/corestate.py +81 -0
  146. flwr/supercore/grpc_health/__init__.py +3 -0
  147. flwr/supercore/grpc_health/health_server.py +53 -0
  148. flwr/supercore/grpc_health/simple_health_servicer.py +2 -2
  149. flwr/{superexec → supercore/superexec}/__init__.py +1 -1
  150. flwr/supercore/superexec/plugin/__init__.py +28 -0
  151. flwr/{supernode/scheduler/simple_clientapp_scheduler_plugin.py → supercore/superexec/plugin/base_exec_plugin.py} +10 -6
  152. flwr/supercore/superexec/plugin/clientapp_exec_plugin.py +28 -0
  153. flwr/supercore/{scheduler/plugin.py → superexec/plugin/exec_plugin.py} +15 -5
  154. flwr/supercore/superexec/plugin/serverapp_exec_plugin.py +28 -0
  155. flwr/supercore/superexec/plugin/simulation_exec_plugin.py +28 -0
  156. flwr/supercore/superexec/run_superexec.py +199 -0
  157. flwr/superlink/artifact_provider/__init__.py +22 -0
  158. flwr/superlink/artifact_provider/artifact_provider.py +37 -0
  159. flwr/superlink/servicer/__init__.py +15 -0
  160. flwr/superlink/servicer/control/__init__.py +22 -0
  161. flwr/{superexec/exec_event_log_interceptor.py → superlink/servicer/control/control_event_log_interceptor.py} +7 -7
  162. flwr/{superexec/exec_grpc.py → superlink/servicer/control/control_grpc.py} +27 -29
  163. flwr/{superexec/exec_license_interceptor.py → superlink/servicer/control/control_license_interceptor.py} +6 -6
  164. flwr/{superexec/exec_servicer.py → superlink/servicer/control/control_servicer.py} +127 -31
  165. flwr/{superexec/exec_user_auth_interceptor.py → superlink/servicer/control/control_user_auth_interceptor.py} +10 -10
  166. flwr/supernode/cli/flower_supernode.py +3 -0
  167. flwr/supernode/cli/flwr_clientapp.py +18 -21
  168. flwr/supernode/nodestate/in_memory_nodestate.py +2 -2
  169. flwr/supernode/nodestate/nodestate.py +3 -59
  170. flwr/supernode/runtime/run_clientapp.py +39 -102
  171. flwr/supernode/servicer/clientappio/clientappio_servicer.py +10 -17
  172. flwr/supernode/start_client_internal.py +35 -76
  173. {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/METADATA +9 -18
  174. {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/RECORD +176 -128
  175. {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/entry_points.txt +1 -0
  176. flwr/proto/exec_pb2.py +0 -62
  177. flwr/proto/exec_pb2_grpc.pyi +0 -93
  178. flwr/superexec/app.py +0 -45
  179. flwr/superexec/deployment.py +0 -191
  180. flwr/superexec/executor.py +0 -100
  181. flwr/superexec/simulation.py +0 -129
  182. {flwr-1.20.0.dist-info → flwr-1.22.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.PullSimulationInputs = channel.unary_unary(
21
- '/flwr.proto.SimulationIo/PullSimulationInputs',
22
- request_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
23
- response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
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.PushSimulationOutputs = channel.unary_unary(
26
- '/flwr.proto.SimulationIo/PushSimulationOutputs',
27
- request_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
28
- response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
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 PullSimulationInputs(self, request, context):
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 PushSimulationOutputs(self, request, context):
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
- 'PullSimulationInputs': grpc.unary_unary_rpc_method_handler(
113
- servicer.PullSimulationInputs,
114
- request_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.FromString,
115
- response_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.SerializeToString,
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
- 'PushSimulationOutputs': grpc.unary_unary_rpc_method_handler(
118
- servicer.PushSimulationOutputs,
119
- request_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.FromString,
120
- response_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.SerializeToString,
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 PullSimulationInputs(request,
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/PullSimulationInputs',
169
- flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
170
- flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
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 PushSimulationOutputs(request,
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/PushSimulationOutputs',
186
- flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
187
- flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
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
- PullSimulationInputs: grpc.UnaryUnaryMultiCallable[
15
- flwr.proto.simulationio_pb2.PullSimulationInputsRequest,
16
- flwr.proto.simulationio_pb2.PullSimulationInputsResponse]
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
- PushSimulationOutputs: grpc.UnaryUnaryMultiCallable[
20
- flwr.proto.simulationio_pb2.PushSimulationOutputsRequest,
21
- flwr.proto.simulationio_pb2.PushSimulationOutputsResponse]
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 PullSimulationInputs(self,
53
- request: flwr.proto.simulationio_pb2.PullSimulationInputsRequest,
67
+ def ListAppsToLaunch(self,
68
+ request: flwr.proto.appio_pb2.ListAppsToLaunchRequest,
54
69
  context: grpc.ServicerContext,
55
- ) -> flwr.proto.simulationio_pb2.PullSimulationInputsResponse:
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 PushSimulationOutputs(self,
61
- request: flwr.proto.simulationio_pb2.PushSimulationOutputsRequest,
99
+ def PushAppOutputs(self,
100
+ request: flwr.proto.appio_pb2.PushAppOutputsRequest,
62
101
  context: grpc.ServicerContext,
63
- ) -> flwr.proto.simulationio_pb2.PushSimulationOutputsResponse:
102
+ ) -> flwr.proto.appio_pb2.PushAppOutputsResponse:
64
103
  """Push Simulation outputs"""
65
104
  pass
66
105