flwr 1.23.0__py3-none-any.whl → 1.24.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 (292) hide show
  1. flwr/__init__.py +16 -5
  2. flwr/app/error.py +2 -2
  3. flwr/app/exception.py +3 -3
  4. flwr/cli/app.py +19 -0
  5. flwr/cli/app_cmd/__init__.py +23 -0
  6. flwr/cli/app_cmd/publish.py +285 -0
  7. flwr/cli/app_cmd/review.py +252 -0
  8. flwr/cli/auth_plugin/auth_plugin.py +4 -5
  9. flwr/cli/auth_plugin/noop_auth_plugin.py +54 -11
  10. flwr/cli/auth_plugin/oidc_cli_plugin.py +32 -9
  11. flwr/cli/build.py +60 -18
  12. flwr/cli/cli_account_auth_interceptor.py +24 -7
  13. flwr/cli/config_utils.py +101 -13
  14. flwr/cli/federation/__init__.py +24 -0
  15. flwr/cli/federation/ls.py +140 -0
  16. flwr/cli/federation/show.py +317 -0
  17. flwr/cli/install.py +91 -13
  18. flwr/cli/log.py +52 -9
  19. flwr/cli/login/login.py +7 -4
  20. flwr/cli/ls.py +170 -130
  21. flwr/cli/new/new.py +33 -50
  22. flwr/cli/new/templates/app/code/task.pytorch.py.tpl +1 -0
  23. flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +1 -1
  24. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +1 -1
  25. flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +1 -1
  26. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
  27. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +1 -1
  28. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
  29. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +3 -3
  30. flwr/cli/new/templates/app/pyproject.pytorch_legacy_api.toml.tpl +1 -1
  31. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
  32. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +2 -2
  33. flwr/cli/new/templates/app/pyproject.xgboost.toml.tpl +1 -1
  34. flwr/cli/pull.py +10 -5
  35. flwr/cli/run/run.py +77 -30
  36. flwr/cli/run_utils.py +130 -0
  37. flwr/cli/stop.py +25 -7
  38. flwr/cli/supernode/ls.py +16 -8
  39. flwr/cli/supernode/register.py +9 -4
  40. flwr/cli/supernode/unregister.py +5 -3
  41. flwr/cli/utils.py +376 -16
  42. flwr/client/__init__.py +1 -1
  43. flwr/client/dpfedavg_numpy_client.py +4 -1
  44. flwr/client/grpc_adapter_client/connection.py +6 -7
  45. flwr/client/grpc_rere_client/connection.py +10 -11
  46. flwr/client/grpc_rere_client/grpc_adapter.py +6 -2
  47. flwr/client/grpc_rere_client/node_auth_client_interceptor.py +2 -1
  48. flwr/client/message_handler/message_handler.py +2 -2
  49. flwr/client/mod/secure_aggregation/secaggplus_mod.py +3 -3
  50. flwr/client/numpy_client.py +1 -1
  51. flwr/client/rest_client/connection.py +12 -14
  52. flwr/client/run_info_store.py +4 -5
  53. flwr/client/typing.py +1 -1
  54. flwr/clientapp/client_app.py +9 -10
  55. flwr/clientapp/mod/centraldp_mods.py +16 -17
  56. flwr/clientapp/mod/localdp_mod.py +8 -9
  57. flwr/clientapp/typing.py +1 -1
  58. flwr/clientapp/utils.py +3 -3
  59. flwr/common/address.py +1 -2
  60. flwr/common/args.py +3 -4
  61. flwr/common/config.py +13 -16
  62. flwr/common/constant.py +5 -2
  63. flwr/common/differential_privacy.py +3 -4
  64. flwr/common/event_log_plugin/event_log_plugin.py +3 -4
  65. flwr/common/exit/exit.py +15 -2
  66. flwr/common/exit/exit_code.py +19 -0
  67. flwr/common/exit/exit_handler.py +6 -2
  68. flwr/common/exit/signal_handler.py +5 -5
  69. flwr/common/grpc.py +6 -6
  70. flwr/common/inflatable_protobuf_utils.py +1 -1
  71. flwr/common/inflatable_utils.py +38 -21
  72. flwr/common/logger.py +19 -19
  73. flwr/common/message.py +4 -4
  74. flwr/common/object_ref.py +7 -7
  75. flwr/common/record/array.py +3 -3
  76. flwr/common/record/arrayrecord.py +18 -30
  77. flwr/common/record/configrecord.py +3 -3
  78. flwr/common/record/recorddict.py +5 -5
  79. flwr/common/record/typeddict.py +9 -2
  80. flwr/common/recorddict_compat.py +7 -10
  81. flwr/common/retry_invoker.py +20 -20
  82. flwr/common/secure_aggregation/ndarrays_arithmetic.py +3 -3
  83. flwr/common/serde.py +5 -4
  84. flwr/common/serde_utils.py +2 -2
  85. flwr/common/telemetry.py +9 -5
  86. flwr/common/typing.py +52 -37
  87. flwr/compat/client/app.py +38 -37
  88. flwr/compat/client/grpc_client/connection.py +11 -11
  89. flwr/compat/server/app.py +5 -6
  90. flwr/proto/appio_pb2.py +13 -3
  91. flwr/proto/appio_pb2.pyi +134 -65
  92. flwr/proto/appio_pb2_grpc.py +20 -0
  93. flwr/proto/appio_pb2_grpc.pyi +27 -0
  94. flwr/proto/clientappio_pb2.py +17 -7
  95. flwr/proto/clientappio_pb2.pyi +15 -0
  96. flwr/proto/clientappio_pb2_grpc.py +206 -40
  97. flwr/proto/clientappio_pb2_grpc.pyi +168 -53
  98. flwr/proto/control_pb2.py +71 -52
  99. flwr/proto/control_pb2.pyi +277 -111
  100. flwr/proto/control_pb2_grpc.py +249 -40
  101. flwr/proto/control_pb2_grpc.pyi +185 -52
  102. flwr/proto/error_pb2.py +13 -3
  103. flwr/proto/error_pb2.pyi +24 -6
  104. flwr/proto/error_pb2_grpc.py +20 -0
  105. flwr/proto/error_pb2_grpc.pyi +27 -0
  106. flwr/proto/fab_pb2.py +14 -4
  107. flwr/proto/fab_pb2.pyi +59 -31
  108. flwr/proto/fab_pb2_grpc.py +20 -0
  109. flwr/proto/fab_pb2_grpc.pyi +27 -0
  110. flwr/proto/federation_pb2.py +38 -0
  111. flwr/proto/federation_pb2.pyi +56 -0
  112. flwr/proto/federation_pb2_grpc.py +24 -0
  113. flwr/proto/federation_pb2_grpc.pyi +31 -0
  114. flwr/proto/fleet_pb2.py +14 -4
  115. flwr/proto/fleet_pb2.pyi +137 -61
  116. flwr/proto/fleet_pb2_grpc.py +189 -48
  117. flwr/proto/fleet_pb2_grpc.pyi +175 -61
  118. flwr/proto/grpcadapter_pb2.py +14 -4
  119. flwr/proto/grpcadapter_pb2.pyi +38 -16
  120. flwr/proto/grpcadapter_pb2_grpc.py +35 -4
  121. flwr/proto/grpcadapter_pb2_grpc.pyi +38 -7
  122. flwr/proto/heartbeat_pb2.py +17 -7
  123. flwr/proto/heartbeat_pb2.pyi +51 -22
  124. flwr/proto/heartbeat_pb2_grpc.py +20 -0
  125. flwr/proto/heartbeat_pb2_grpc.pyi +27 -0
  126. flwr/proto/log_pb2.py +13 -3
  127. flwr/proto/log_pb2.pyi +34 -11
  128. flwr/proto/log_pb2_grpc.py +20 -0
  129. flwr/proto/log_pb2_grpc.pyi +27 -0
  130. flwr/proto/message_pb2.py +15 -5
  131. flwr/proto/message_pb2.pyi +154 -86
  132. flwr/proto/message_pb2_grpc.py +20 -0
  133. flwr/proto/message_pb2_grpc.pyi +27 -0
  134. flwr/proto/node_pb2.py +15 -5
  135. flwr/proto/node_pb2.pyi +50 -25
  136. flwr/proto/node_pb2_grpc.py +20 -0
  137. flwr/proto/node_pb2_grpc.pyi +27 -0
  138. flwr/proto/recorddict_pb2.py +13 -3
  139. flwr/proto/recorddict_pb2.pyi +184 -107
  140. flwr/proto/recorddict_pb2_grpc.py +20 -0
  141. flwr/proto/recorddict_pb2_grpc.pyi +27 -0
  142. flwr/proto/run_pb2.py +40 -31
  143. flwr/proto/run_pb2.pyi +149 -84
  144. flwr/proto/run_pb2_grpc.py +20 -0
  145. flwr/proto/run_pb2_grpc.pyi +27 -0
  146. flwr/proto/serverappio_pb2.py +13 -3
  147. flwr/proto/serverappio_pb2.pyi +32 -8
  148. flwr/proto/serverappio_pb2_grpc.py +246 -65
  149. flwr/proto/serverappio_pb2_grpc.pyi +221 -85
  150. flwr/proto/simulationio_pb2.py +16 -8
  151. flwr/proto/simulationio_pb2.pyi +15 -0
  152. flwr/proto/simulationio_pb2_grpc.py +162 -41
  153. flwr/proto/simulationio_pb2_grpc.pyi +149 -55
  154. flwr/proto/transport_pb2.py +20 -10
  155. flwr/proto/transport_pb2.pyi +249 -160
  156. flwr/proto/transport_pb2_grpc.py +35 -4
  157. flwr/proto/transport_pb2_grpc.pyi +38 -8
  158. flwr/server/app.py +38 -17
  159. flwr/server/client_manager.py +4 -5
  160. flwr/server/client_proxy.py +10 -11
  161. flwr/server/compat/app.py +4 -5
  162. flwr/server/compat/app_utils.py +2 -1
  163. flwr/server/compat/grid_client_proxy.py +10 -12
  164. flwr/server/compat/legacy_context.py +3 -4
  165. flwr/server/fleet_event_log_interceptor.py +2 -1
  166. flwr/server/grid/grid.py +2 -3
  167. flwr/server/grid/grpc_grid.py +10 -8
  168. flwr/server/grid/inmemory_grid.py +4 -4
  169. flwr/server/run_serverapp.py +2 -3
  170. flwr/server/server.py +34 -39
  171. flwr/server/server_app.py +7 -8
  172. flwr/server/server_config.py +1 -2
  173. flwr/server/serverapp/app.py +34 -28
  174. flwr/server/serverapp_components.py +4 -5
  175. flwr/server/strategy/aggregate.py +9 -8
  176. flwr/server/strategy/bulyan.py +13 -11
  177. flwr/server/strategy/dp_adaptive_clipping.py +16 -20
  178. flwr/server/strategy/dp_fixed_clipping.py +12 -17
  179. flwr/server/strategy/dpfedavg_adaptive.py +3 -4
  180. flwr/server/strategy/dpfedavg_fixed.py +6 -10
  181. flwr/server/strategy/fault_tolerant_fedavg.py +14 -13
  182. flwr/server/strategy/fedadagrad.py +18 -14
  183. flwr/server/strategy/fedadam.py +16 -14
  184. flwr/server/strategy/fedavg.py +16 -17
  185. flwr/server/strategy/fedavg_android.py +15 -15
  186. flwr/server/strategy/fedavgm.py +21 -18
  187. flwr/server/strategy/fedmedian.py +2 -3
  188. flwr/server/strategy/fedopt.py +11 -10
  189. flwr/server/strategy/fedprox.py +10 -9
  190. flwr/server/strategy/fedtrimmedavg.py +12 -11
  191. flwr/server/strategy/fedxgb_bagging.py +13 -11
  192. flwr/server/strategy/fedxgb_cyclic.py +6 -6
  193. flwr/server/strategy/fedxgb_nn_avg.py +4 -4
  194. flwr/server/strategy/fedyogi.py +16 -14
  195. flwr/server/strategy/krum.py +12 -11
  196. flwr/server/strategy/qfedavg.py +16 -15
  197. flwr/server/strategy/strategy.py +6 -9
  198. flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +2 -1
  199. flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +1 -2
  200. flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +3 -4
  201. flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +10 -12
  202. flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +1 -3
  203. flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +4 -4
  204. flwr/server/superlink/fleet/grpc_rere/node_auth_server_interceptor.py +3 -2
  205. flwr/server/superlink/fleet/message_handler/message_handler.py +34 -28
  206. flwr/server/superlink/fleet/rest_rere/rest_api.py +2 -2
  207. flwr/server/superlink/fleet/vce/backend/backend.py +1 -1
  208. flwr/server/superlink/fleet/vce/backend/raybackend.py +5 -5
  209. flwr/server/superlink/fleet/vce/vce_api.py +15 -9
  210. flwr/server/superlink/linkstate/in_memory_linkstate.py +115 -150
  211. flwr/server/superlink/linkstate/linkstate.py +59 -43
  212. flwr/server/superlink/linkstate/linkstate_factory.py +22 -5
  213. flwr/server/superlink/linkstate/sqlite_linkstate.py +447 -438
  214. flwr/server/superlink/linkstate/utils.py +6 -6
  215. flwr/server/superlink/serverappio/serverappio_grpc.py +1 -2
  216. flwr/server/superlink/serverappio/serverappio_servicer.py +26 -21
  217. flwr/server/superlink/simulation/simulationio_grpc.py +1 -2
  218. flwr/server/superlink/simulation/simulationio_servicer.py +18 -13
  219. flwr/server/superlink/utils.py +4 -6
  220. flwr/server/typing.py +1 -1
  221. flwr/server/utils/tensorboard.py +15 -8
  222. flwr/server/workflow/default_workflows.py +5 -5
  223. flwr/server/workflow/secure_aggregation/secagg_workflow.py +2 -4
  224. flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +8 -8
  225. flwr/serverapp/strategy/bulyan.py +16 -15
  226. flwr/serverapp/strategy/dp_adaptive_clipping.py +12 -11
  227. flwr/serverapp/strategy/dp_fixed_clipping.py +11 -14
  228. flwr/serverapp/strategy/fedadagrad.py +10 -11
  229. flwr/serverapp/strategy/fedadam.py +10 -11
  230. flwr/serverapp/strategy/fedavg.py +9 -10
  231. flwr/serverapp/strategy/fedavgm.py +17 -16
  232. flwr/serverapp/strategy/fedmedian.py +2 -2
  233. flwr/serverapp/strategy/fedopt.py +10 -11
  234. flwr/serverapp/strategy/fedprox.py +7 -8
  235. flwr/serverapp/strategy/fedtrimmedavg.py +9 -9
  236. flwr/serverapp/strategy/fedxgb_bagging.py +3 -3
  237. flwr/serverapp/strategy/fedxgb_cyclic.py +9 -9
  238. flwr/serverapp/strategy/fedyogi.py +9 -11
  239. flwr/serverapp/strategy/krum.py +7 -7
  240. flwr/serverapp/strategy/multikrum.py +9 -9
  241. flwr/serverapp/strategy/qfedavg.py +17 -16
  242. flwr/serverapp/strategy/strategy.py +6 -9
  243. flwr/serverapp/strategy/strategy_utils.py +7 -8
  244. flwr/simulation/app.py +46 -42
  245. flwr/simulation/legacy_app.py +12 -12
  246. flwr/simulation/ray_transport/ray_actor.py +10 -11
  247. flwr/simulation/ray_transport/ray_client_proxy.py +11 -12
  248. flwr/simulation/run_simulation.py +43 -43
  249. flwr/simulation/simulationio_connection.py +4 -4
  250. flwr/supercore/cli/flower_superexec.py +3 -4
  251. flwr/supercore/constant.py +31 -1
  252. flwr/supercore/corestate/corestate.py +24 -3
  253. flwr/supercore/corestate/in_memory_corestate.py +138 -0
  254. flwr/supercore/corestate/sqlite_corestate.py +157 -0
  255. flwr/supercore/ffs/disk_ffs.py +1 -2
  256. flwr/supercore/ffs/ffs.py +1 -2
  257. flwr/supercore/ffs/ffs_factory.py +1 -2
  258. flwr/{common → supercore}/heartbeat.py +20 -25
  259. flwr/supercore/object_store/in_memory_object_store.py +1 -2
  260. flwr/supercore/object_store/object_store.py +1 -2
  261. flwr/supercore/object_store/object_store_factory.py +1 -2
  262. flwr/supercore/object_store/sqlite_object_store.py +8 -7
  263. flwr/supercore/primitives/asymmetric.py +1 -1
  264. flwr/supercore/primitives/asymmetric_ed25519.py +11 -1
  265. flwr/supercore/sqlite_mixin.py +37 -34
  266. flwr/supercore/superexec/plugin/base_exec_plugin.py +1 -2
  267. flwr/supercore/superexec/plugin/exec_plugin.py +3 -3
  268. flwr/supercore/superexec/run_superexec.py +9 -13
  269. flwr/superlink/artifact_provider/artifact_provider.py +1 -2
  270. flwr/superlink/auth_plugin/auth_plugin.py +6 -9
  271. flwr/superlink/auth_plugin/noop_auth_plugin.py +6 -9
  272. flwr/superlink/federation/__init__.py +24 -0
  273. flwr/superlink/federation/federation_manager.py +64 -0
  274. flwr/superlink/federation/noop_federation_manager.py +71 -0
  275. flwr/superlink/servicer/control/control_account_auth_interceptor.py +22 -13
  276. flwr/superlink/servicer/control/control_event_log_interceptor.py +7 -7
  277. flwr/superlink/servicer/control/control_grpc.py +5 -6
  278. flwr/superlink/servicer/control/control_license_interceptor.py +3 -3
  279. flwr/superlink/servicer/control/control_servicer.py +102 -18
  280. flwr/supernode/cli/flower_supernode.py +58 -3
  281. flwr/supernode/nodestate/in_memory_nodestate.py +60 -49
  282. flwr/supernode/nodestate/nodestate.py +7 -8
  283. flwr/supernode/nodestate/nodestate_factory.py +7 -4
  284. flwr/supernode/runtime/run_clientapp.py +41 -22
  285. flwr/supernode/servicer/clientappio/clientappio_servicer.py +40 -10
  286. flwr/supernode/start_client_internal.py +158 -42
  287. {flwr-1.23.0.dist-info → flwr-1.24.0.dist-info}/METADATA +8 -8
  288. flwr-1.24.0.dist-info/RECORD +454 -0
  289. flwr/supercore/object_store/utils.py +0 -43
  290. flwr-1.23.0.dist-info/RECORD +0 -439
  291. {flwr-1.23.0.dist-info → flwr-1.24.0.dist-info}/WHEEL +0 -0
  292. {flwr-1.23.0.dist-info → flwr-1.24.0.dist-info}/entry_points.txt +0 -0
@@ -1,12 +1,32 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
+ import warnings
4
5
 
5
6
  from flwr.proto import appio_pb2 as flwr_dot_proto_dot_appio__pb2
6
7
  from flwr.proto import heartbeat_pb2 as flwr_dot_proto_dot_heartbeat__pb2
7
8
  from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
8
9
  from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
9
10
 
11
+ GRPC_GENERATED_VERSION = '1.70.0'
12
+ GRPC_VERSION = grpc.__version__
13
+ _version_not_supported = False
14
+
15
+ try:
16
+ from grpc._utilities import first_version_is_lower
17
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
18
+ except ImportError:
19
+ _version_not_supported = True
20
+
21
+ if _version_not_supported:
22
+ raise RuntimeError(
23
+ f'The grpc package installed is at version {GRPC_VERSION},'
24
+ + f' but the generated code in flwr/proto/simulationio_pb2_grpc.py depends on'
25
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
26
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
27
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
28
+ )
29
+
10
30
 
11
31
  class SimulationIoStub(object):
12
32
  """Missing associated documentation comment in .proto file."""
@@ -21,52 +41,52 @@ class SimulationIoStub(object):
21
41
  '/flwr.proto.SimulationIo/ListAppsToLaunch',
22
42
  request_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
23
43
  response_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
24
- )
44
+ _registered_method=True)
25
45
  self.RequestToken = channel.unary_unary(
26
46
  '/flwr.proto.SimulationIo/RequestToken',
27
47
  request_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
28
48
  response_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
29
- )
49
+ _registered_method=True)
30
50
  self.GetRun = channel.unary_unary(
31
51
  '/flwr.proto.SimulationIo/GetRun',
32
52
  request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
33
53
  response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
34
- )
54
+ _registered_method=True)
35
55
  self.PullAppInputs = channel.unary_unary(
36
56
  '/flwr.proto.SimulationIo/PullAppInputs',
37
57
  request_serializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
38
58
  response_deserializer=flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
39
- )
59
+ _registered_method=True)
40
60
  self.PushAppOutputs = channel.unary_unary(
41
61
  '/flwr.proto.SimulationIo/PushAppOutputs',
42
62
  request_serializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
43
63
  response_deserializer=flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
44
- )
64
+ _registered_method=True)
45
65
  self.UpdateRunStatus = channel.unary_unary(
46
66
  '/flwr.proto.SimulationIo/UpdateRunStatus',
47
67
  request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
48
68
  response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
49
- )
69
+ _registered_method=True)
50
70
  self.PushLogs = channel.unary_unary(
51
71
  '/flwr.proto.SimulationIo/PushLogs',
52
72
  request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
53
73
  response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
54
- )
74
+ _registered_method=True)
55
75
  self.GetFederationOptions = channel.unary_unary(
56
76
  '/flwr.proto.SimulationIo/GetFederationOptions',
57
77
  request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
58
78
  response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
59
- )
79
+ _registered_method=True)
60
80
  self.GetRunStatus = channel.unary_unary(
61
81
  '/flwr.proto.SimulationIo/GetRunStatus',
62
82
  request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
63
83
  response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
64
- )
84
+ _registered_method=True)
65
85
  self.SendAppHeartbeat = channel.unary_unary(
66
86
  '/flwr.proto.SimulationIo/SendAppHeartbeat',
67
87
  request_serializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
68
88
  response_deserializer=flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
69
- )
89
+ _registered_method=True)
70
90
 
71
91
 
72
92
  class SimulationIoServicer(object):
@@ -136,7 +156,7 @@ class SimulationIoServicer(object):
136
156
  raise NotImplementedError('Method not implemented!')
137
157
 
138
158
  def SendAppHeartbeat(self, request, context):
139
- """Heartbeat
159
+ """App heartbeat
140
160
  """
141
161
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
142
162
  context.set_details('Method not implemented!')
@@ -199,6 +219,7 @@ def add_SimulationIoServicer_to_server(servicer, server):
199
219
  generic_handler = grpc.method_handlers_generic_handler(
200
220
  'flwr.proto.SimulationIo', rpc_method_handlers)
201
221
  server.add_generic_rpc_handlers((generic_handler,))
222
+ server.add_registered_method_handlers('flwr.proto.SimulationIo', rpc_method_handlers)
202
223
 
203
224
 
204
225
  # This class is part of an EXPERIMENTAL API.
@@ -216,11 +237,21 @@ class SimulationIo(object):
216
237
  wait_for_ready=None,
217
238
  timeout=None,
218
239
  metadata=None):
219
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/ListAppsToLaunch',
240
+ return grpc.experimental.unary_unary(
241
+ request,
242
+ target,
243
+ '/flwr.proto.SimulationIo/ListAppsToLaunch',
220
244
  flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
221
245
  flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
222
- options, channel_credentials,
223
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
246
+ options,
247
+ channel_credentials,
248
+ insecure,
249
+ call_credentials,
250
+ compression,
251
+ wait_for_ready,
252
+ timeout,
253
+ metadata,
254
+ _registered_method=True)
224
255
 
225
256
  @staticmethod
226
257
  def RequestToken(request,
@@ -233,11 +264,21 @@ class SimulationIo(object):
233
264
  wait_for_ready=None,
234
265
  timeout=None,
235
266
  metadata=None):
236
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/RequestToken',
267
+ return grpc.experimental.unary_unary(
268
+ request,
269
+ target,
270
+ '/flwr.proto.SimulationIo/RequestToken',
237
271
  flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
238
272
  flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
239
- options, channel_credentials,
240
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
273
+ options,
274
+ channel_credentials,
275
+ insecure,
276
+ call_credentials,
277
+ compression,
278
+ wait_for_ready,
279
+ timeout,
280
+ metadata,
281
+ _registered_method=True)
241
282
 
242
283
  @staticmethod
243
284
  def GetRun(request,
@@ -250,11 +291,21 @@ class SimulationIo(object):
250
291
  wait_for_ready=None,
251
292
  timeout=None,
252
293
  metadata=None):
253
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetRun',
294
+ return grpc.experimental.unary_unary(
295
+ request,
296
+ target,
297
+ '/flwr.proto.SimulationIo/GetRun',
254
298
  flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
255
299
  flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
256
- options, channel_credentials,
257
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
300
+ options,
301
+ channel_credentials,
302
+ insecure,
303
+ call_credentials,
304
+ compression,
305
+ wait_for_ready,
306
+ timeout,
307
+ metadata,
308
+ _registered_method=True)
258
309
 
259
310
  @staticmethod
260
311
  def PullAppInputs(request,
@@ -267,11 +318,21 @@ class SimulationIo(object):
267
318
  wait_for_ready=None,
268
319
  timeout=None,
269
320
  metadata=None):
270
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PullAppInputs',
321
+ return grpc.experimental.unary_unary(
322
+ request,
323
+ target,
324
+ '/flwr.proto.SimulationIo/PullAppInputs',
271
325
  flwr_dot_proto_dot_appio__pb2.PullAppInputsRequest.SerializeToString,
272
326
  flwr_dot_proto_dot_appio__pb2.PullAppInputsResponse.FromString,
273
- options, channel_credentials,
274
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
327
+ options,
328
+ channel_credentials,
329
+ insecure,
330
+ call_credentials,
331
+ compression,
332
+ wait_for_ready,
333
+ timeout,
334
+ metadata,
335
+ _registered_method=True)
275
336
 
276
337
  @staticmethod
277
338
  def PushAppOutputs(request,
@@ -284,11 +345,21 @@ class SimulationIo(object):
284
345
  wait_for_ready=None,
285
346
  timeout=None,
286
347
  metadata=None):
287
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushAppOutputs',
348
+ return grpc.experimental.unary_unary(
349
+ request,
350
+ target,
351
+ '/flwr.proto.SimulationIo/PushAppOutputs',
288
352
  flwr_dot_proto_dot_appio__pb2.PushAppOutputsRequest.SerializeToString,
289
353
  flwr_dot_proto_dot_appio__pb2.PushAppOutputsResponse.FromString,
290
- options, channel_credentials,
291
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
354
+ options,
355
+ channel_credentials,
356
+ insecure,
357
+ call_credentials,
358
+ compression,
359
+ wait_for_ready,
360
+ timeout,
361
+ metadata,
362
+ _registered_method=True)
292
363
 
293
364
  @staticmethod
294
365
  def UpdateRunStatus(request,
@@ -301,11 +372,21 @@ class SimulationIo(object):
301
372
  wait_for_ready=None,
302
373
  timeout=None,
303
374
  metadata=None):
304
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/UpdateRunStatus',
375
+ return grpc.experimental.unary_unary(
376
+ request,
377
+ target,
378
+ '/flwr.proto.SimulationIo/UpdateRunStatus',
305
379
  flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
306
380
  flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
307
- options, channel_credentials,
308
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
381
+ options,
382
+ channel_credentials,
383
+ insecure,
384
+ call_credentials,
385
+ compression,
386
+ wait_for_ready,
387
+ timeout,
388
+ metadata,
389
+ _registered_method=True)
309
390
 
310
391
  @staticmethod
311
392
  def PushLogs(request,
@@ -318,11 +399,21 @@ class SimulationIo(object):
318
399
  wait_for_ready=None,
319
400
  timeout=None,
320
401
  metadata=None):
321
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushLogs',
402
+ return grpc.experimental.unary_unary(
403
+ request,
404
+ target,
405
+ '/flwr.proto.SimulationIo/PushLogs',
322
406
  flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
323
407
  flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
324
- options, channel_credentials,
325
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
408
+ options,
409
+ channel_credentials,
410
+ insecure,
411
+ call_credentials,
412
+ compression,
413
+ wait_for_ready,
414
+ timeout,
415
+ metadata,
416
+ _registered_method=True)
326
417
 
327
418
  @staticmethod
328
419
  def GetFederationOptions(request,
@@ -335,11 +426,21 @@ class SimulationIo(object):
335
426
  wait_for_ready=None,
336
427
  timeout=None,
337
428
  metadata=None):
338
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetFederationOptions',
429
+ return grpc.experimental.unary_unary(
430
+ request,
431
+ target,
432
+ '/flwr.proto.SimulationIo/GetFederationOptions',
339
433
  flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
340
434
  flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
341
- options, channel_credentials,
342
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
435
+ options,
436
+ channel_credentials,
437
+ insecure,
438
+ call_credentials,
439
+ compression,
440
+ wait_for_ready,
441
+ timeout,
442
+ metadata,
443
+ _registered_method=True)
343
444
 
344
445
  @staticmethod
345
446
  def GetRunStatus(request,
@@ -352,11 +453,21 @@ class SimulationIo(object):
352
453
  wait_for_ready=None,
353
454
  timeout=None,
354
455
  metadata=None):
355
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetRunStatus',
456
+ return grpc.experimental.unary_unary(
457
+ request,
458
+ target,
459
+ '/flwr.proto.SimulationIo/GetRunStatus',
356
460
  flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
357
461
  flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
358
- options, channel_credentials,
359
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
462
+ options,
463
+ channel_credentials,
464
+ insecure,
465
+ call_credentials,
466
+ compression,
467
+ wait_for_ready,
468
+ timeout,
469
+ metadata,
470
+ _registered_method=True)
360
471
 
361
472
  @staticmethod
362
473
  def SendAppHeartbeat(request,
@@ -369,8 +480,18 @@ class SimulationIo(object):
369
480
  wait_for_ready=None,
370
481
  timeout=None,
371
482
  metadata=None):
372
- return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/SendAppHeartbeat',
483
+ return grpc.experimental.unary_unary(
484
+ request,
485
+ target,
486
+ '/flwr.proto.SimulationIo/SendAppHeartbeat',
373
487
  flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatRequest.SerializeToString,
374
488
  flwr_dot_proto_dot_heartbeat__pb2.SendAppHeartbeatResponse.FromString,
375
- options, channel_credentials,
376
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
489
+ options,
490
+ channel_credentials,
491
+ insecure,
492
+ call_credentials,
493
+ compression,
494
+ wait_for_ready,
495
+ timeout,
496
+ metadata,
497
+ _registered_method=True)
@@ -1,147 +1,241 @@
1
1
  """
2
2
  @generated by mypy-protobuf. Do not edit manually!
3
3
  isort:skip_file
4
+ Copyright 2024 Flower Labs GmbH. All Rights Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ ==============================================================================
4
18
  """
19
+
5
20
  import abc
21
+ import collections.abc
6
22
  import flwr.proto.appio_pb2
7
23
  import flwr.proto.heartbeat_pb2
8
24
  import flwr.proto.log_pb2
9
25
  import flwr.proto.run_pb2
10
26
  import grpc
27
+ import grpc.aio
28
+ import typing
29
+
30
+ _T = typing.TypeVar("_T")
31
+
32
+ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
33
+
34
+ class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
35
+ ...
11
36
 
12
37
  class SimulationIoStub:
13
- def __init__(self, channel: grpc.Channel) -> None: ...
38
+ def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
14
39
  ListAppsToLaunch: grpc.UnaryUnaryMultiCallable[
15
40
  flwr.proto.appio_pb2.ListAppsToLaunchRequest,
16
- flwr.proto.appio_pb2.ListAppsToLaunchResponse]
41
+ flwr.proto.appio_pb2.ListAppsToLaunchResponse,
42
+ ]
17
43
  """List runs to launch"""
18
44
 
19
45
  RequestToken: grpc.UnaryUnaryMultiCallable[
20
46
  flwr.proto.appio_pb2.RequestTokenRequest,
21
- flwr.proto.appio_pb2.RequestTokenResponse]
47
+ flwr.proto.appio_pb2.RequestTokenResponse,
48
+ ]
22
49
  """Request token for a run"""
23
50
 
24
51
  GetRun: grpc.UnaryUnaryMultiCallable[
25
52
  flwr.proto.run_pb2.GetRunRequest,
26
- flwr.proto.run_pb2.GetRunResponse]
53
+ flwr.proto.run_pb2.GetRunResponse,
54
+ ]
27
55
  """Get run details"""
28
56
 
29
57
  PullAppInputs: grpc.UnaryUnaryMultiCallable[
30
58
  flwr.proto.appio_pb2.PullAppInputsRequest,
31
- flwr.proto.appio_pb2.PullAppInputsResponse]
59
+ flwr.proto.appio_pb2.PullAppInputsResponse,
60
+ ]
32
61
  """Pull Simulation inputs"""
33
62
 
34
63
  PushAppOutputs: grpc.UnaryUnaryMultiCallable[
35
64
  flwr.proto.appio_pb2.PushAppOutputsRequest,
36
- flwr.proto.appio_pb2.PushAppOutputsResponse]
65
+ flwr.proto.appio_pb2.PushAppOutputsResponse,
66
+ ]
37
67
  """Push Simulation outputs"""
38
68
 
39
69
  UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
40
70
  flwr.proto.run_pb2.UpdateRunStatusRequest,
41
- flwr.proto.run_pb2.UpdateRunStatusResponse]
71
+ flwr.proto.run_pb2.UpdateRunStatusResponse,
72
+ ]
42
73
  """Update the status of a given run"""
43
74
 
44
75
  PushLogs: grpc.UnaryUnaryMultiCallable[
45
76
  flwr.proto.log_pb2.PushLogsRequest,
46
- flwr.proto.log_pb2.PushLogsResponse]
77
+ flwr.proto.log_pb2.PushLogsResponse,
78
+ ]
47
79
  """Push ServerApp logs"""
48
80
 
49
81
  GetFederationOptions: grpc.UnaryUnaryMultiCallable[
50
82
  flwr.proto.run_pb2.GetFederationOptionsRequest,
51
- flwr.proto.run_pb2.GetFederationOptionsResponse]
83
+ flwr.proto.run_pb2.GetFederationOptionsResponse,
84
+ ]
52
85
  """Get Federation Options"""
53
86
 
54
87
  GetRunStatus: grpc.UnaryUnaryMultiCallable[
55
88
  flwr.proto.run_pb2.GetRunStatusRequest,
56
- flwr.proto.run_pb2.GetRunStatusResponse]
89
+ flwr.proto.run_pb2.GetRunStatusResponse,
90
+ ]
57
91
  """Get Run Status"""
58
92
 
59
93
  SendAppHeartbeat: grpc.UnaryUnaryMultiCallable[
60
94
  flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
61
- flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]
62
- """Heartbeat"""
95
+ flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
96
+ ]
97
+ """App heartbeat"""
98
+
99
+ class SimulationIoAsyncStub:
100
+ ListAppsToLaunch: grpc.aio.UnaryUnaryMultiCallable[
101
+ flwr.proto.appio_pb2.ListAppsToLaunchRequest,
102
+ flwr.proto.appio_pb2.ListAppsToLaunchResponse,
103
+ ]
104
+ """List runs to launch"""
105
+
106
+ RequestToken: grpc.aio.UnaryUnaryMultiCallable[
107
+ flwr.proto.appio_pb2.RequestTokenRequest,
108
+ flwr.proto.appio_pb2.RequestTokenResponse,
109
+ ]
110
+ """Request token for a run"""
111
+
112
+ GetRun: grpc.aio.UnaryUnaryMultiCallable[
113
+ flwr.proto.run_pb2.GetRunRequest,
114
+ flwr.proto.run_pb2.GetRunResponse,
115
+ ]
116
+ """Get run details"""
117
+
118
+ PullAppInputs: grpc.aio.UnaryUnaryMultiCallable[
119
+ flwr.proto.appio_pb2.PullAppInputsRequest,
120
+ flwr.proto.appio_pb2.PullAppInputsResponse,
121
+ ]
122
+ """Pull Simulation inputs"""
123
+
124
+ PushAppOutputs: grpc.aio.UnaryUnaryMultiCallable[
125
+ flwr.proto.appio_pb2.PushAppOutputsRequest,
126
+ flwr.proto.appio_pb2.PushAppOutputsResponse,
127
+ ]
128
+ """Push Simulation outputs"""
129
+
130
+ UpdateRunStatus: grpc.aio.UnaryUnaryMultiCallable[
131
+ flwr.proto.run_pb2.UpdateRunStatusRequest,
132
+ flwr.proto.run_pb2.UpdateRunStatusResponse,
133
+ ]
134
+ """Update the status of a given run"""
135
+
136
+ PushLogs: grpc.aio.UnaryUnaryMultiCallable[
137
+ flwr.proto.log_pb2.PushLogsRequest,
138
+ flwr.proto.log_pb2.PushLogsResponse,
139
+ ]
140
+ """Push ServerApp logs"""
63
141
 
142
+ GetFederationOptions: grpc.aio.UnaryUnaryMultiCallable[
143
+ flwr.proto.run_pb2.GetFederationOptionsRequest,
144
+ flwr.proto.run_pb2.GetFederationOptionsResponse,
145
+ ]
146
+ """Get Federation Options"""
147
+
148
+ GetRunStatus: grpc.aio.UnaryUnaryMultiCallable[
149
+ flwr.proto.run_pb2.GetRunStatusRequest,
150
+ flwr.proto.run_pb2.GetRunStatusResponse,
151
+ ]
152
+ """Get Run Status"""
153
+
154
+ SendAppHeartbeat: grpc.aio.UnaryUnaryMultiCallable[
155
+ flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
156
+ flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
157
+ ]
158
+ """App heartbeat"""
64
159
 
65
160
  class SimulationIoServicer(metaclass=abc.ABCMeta):
66
161
  @abc.abstractmethod
67
- def ListAppsToLaunch(self,
162
+ def ListAppsToLaunch(
163
+ self,
68
164
  request: flwr.proto.appio_pb2.ListAppsToLaunchRequest,
69
- context: grpc.ServicerContext,
70
- ) -> flwr.proto.appio_pb2.ListAppsToLaunchResponse:
165
+ context: _ServicerContext,
166
+ ) -> typing.Union[flwr.proto.appio_pb2.ListAppsToLaunchResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.ListAppsToLaunchResponse]]:
71
167
  """List runs to launch"""
72
- pass
73
168
 
74
169
  @abc.abstractmethod
75
- def RequestToken(self,
170
+ def RequestToken(
171
+ self,
76
172
  request: flwr.proto.appio_pb2.RequestTokenRequest,
77
- context: grpc.ServicerContext,
78
- ) -> flwr.proto.appio_pb2.RequestTokenResponse:
173
+ context: _ServicerContext,
174
+ ) -> typing.Union[flwr.proto.appio_pb2.RequestTokenResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.RequestTokenResponse]]:
79
175
  """Request token for a run"""
80
- pass
81
176
 
82
177
  @abc.abstractmethod
83
- def GetRun(self,
178
+ def GetRun(
179
+ self,
84
180
  request: flwr.proto.run_pb2.GetRunRequest,
85
- context: grpc.ServicerContext,
86
- ) -> flwr.proto.run_pb2.GetRunResponse:
181
+ context: _ServicerContext,
182
+ ) -> typing.Union[flwr.proto.run_pb2.GetRunResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetRunResponse]]:
87
183
  """Get run details"""
88
- pass
89
184
 
90
185
  @abc.abstractmethod
91
- def PullAppInputs(self,
186
+ def PullAppInputs(
187
+ self,
92
188
  request: flwr.proto.appio_pb2.PullAppInputsRequest,
93
- context: grpc.ServicerContext,
94
- ) -> flwr.proto.appio_pb2.PullAppInputsResponse:
189
+ context: _ServicerContext,
190
+ ) -> typing.Union[flwr.proto.appio_pb2.PullAppInputsResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PullAppInputsResponse]]:
95
191
  """Pull Simulation inputs"""
96
- pass
97
192
 
98
193
  @abc.abstractmethod
99
- def PushAppOutputs(self,
194
+ def PushAppOutputs(
195
+ self,
100
196
  request: flwr.proto.appio_pb2.PushAppOutputsRequest,
101
- context: grpc.ServicerContext,
102
- ) -> flwr.proto.appio_pb2.PushAppOutputsResponse:
197
+ context: _ServicerContext,
198
+ ) -> typing.Union[flwr.proto.appio_pb2.PushAppOutputsResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PushAppOutputsResponse]]:
103
199
  """Push Simulation outputs"""
104
- pass
105
200
 
106
201
  @abc.abstractmethod
107
- def UpdateRunStatus(self,
202
+ def UpdateRunStatus(
203
+ self,
108
204
  request: flwr.proto.run_pb2.UpdateRunStatusRequest,
109
- context: grpc.ServicerContext,
110
- ) -> flwr.proto.run_pb2.UpdateRunStatusResponse:
205
+ context: _ServicerContext,
206
+ ) -> typing.Union[flwr.proto.run_pb2.UpdateRunStatusResponse, collections.abc.Awaitable[flwr.proto.run_pb2.UpdateRunStatusResponse]]:
111
207
  """Update the status of a given run"""
112
- pass
113
208
 
114
209
  @abc.abstractmethod
115
- def PushLogs(self,
210
+ def PushLogs(
211
+ self,
116
212
  request: flwr.proto.log_pb2.PushLogsRequest,
117
- context: grpc.ServicerContext,
118
- ) -> flwr.proto.log_pb2.PushLogsResponse:
213
+ context: _ServicerContext,
214
+ ) -> typing.Union[flwr.proto.log_pb2.PushLogsResponse, collections.abc.Awaitable[flwr.proto.log_pb2.PushLogsResponse]]:
119
215
  """Push ServerApp logs"""
120
- pass
121
216
 
122
217
  @abc.abstractmethod
123
- def GetFederationOptions(self,
218
+ def GetFederationOptions(
219
+ self,
124
220
  request: flwr.proto.run_pb2.GetFederationOptionsRequest,
125
- context: grpc.ServicerContext,
126
- ) -> flwr.proto.run_pb2.GetFederationOptionsResponse:
221
+ context: _ServicerContext,
222
+ ) -> typing.Union[flwr.proto.run_pb2.GetFederationOptionsResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetFederationOptionsResponse]]:
127
223
  """Get Federation Options"""
128
- pass
129
224
 
130
225
  @abc.abstractmethod
131
- def GetRunStatus(self,
226
+ def GetRunStatus(
227
+ self,
132
228
  request: flwr.proto.run_pb2.GetRunStatusRequest,
133
- context: grpc.ServicerContext,
134
- ) -> flwr.proto.run_pb2.GetRunStatusResponse:
229
+ context: _ServicerContext,
230
+ ) -> typing.Union[flwr.proto.run_pb2.GetRunStatusResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetRunStatusResponse]]:
135
231
  """Get Run Status"""
136
- pass
137
232
 
138
233
  @abc.abstractmethod
139
- def SendAppHeartbeat(self,
234
+ def SendAppHeartbeat(
235
+ self,
140
236
  request: flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
141
- context: grpc.ServicerContext,
142
- ) -> flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse:
143
- """Heartbeat"""
144
- pass
145
-
237
+ context: _ServicerContext,
238
+ ) -> typing.Union[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse, collections.abc.Awaitable[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]]:
239
+ """App heartbeat"""
146
240
 
147
- def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: grpc.Server) -> None: ...
241
+ def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...