flwr-nightly 1.8.0.dev20240315__py3-none-any.whl → 1.15.0.dev20250115__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (312) hide show
  1. flwr/cli/app.py +16 -2
  2. flwr/cli/build.py +181 -0
  3. flwr/cli/cli_user_auth_interceptor.py +90 -0
  4. flwr/cli/config_utils.py +343 -0
  5. flwr/cli/example.py +4 -1
  6. flwr/cli/install.py +253 -0
  7. flwr/cli/log.py +182 -0
  8. flwr/{server/superlink/state → cli/login}/__init__.py +4 -10
  9. flwr/cli/login/login.py +88 -0
  10. flwr/cli/ls.py +327 -0
  11. flwr/cli/new/__init__.py +1 -0
  12. flwr/cli/new/new.py +210 -66
  13. flwr/cli/new/templates/app/.gitignore.tpl +163 -0
  14. flwr/cli/new/templates/app/LICENSE.tpl +202 -0
  15. flwr/cli/new/templates/app/README.baseline.md.tpl +127 -0
  16. flwr/cli/new/templates/app/README.flowertune.md.tpl +66 -0
  17. flwr/cli/new/templates/app/README.md.tpl +16 -32
  18. flwr/cli/new/templates/app/code/__init__.baseline.py.tpl +1 -0
  19. flwr/cli/new/templates/app/code/__init__.py.tpl +1 -1
  20. flwr/cli/new/templates/app/code/client.baseline.py.tpl +58 -0
  21. flwr/cli/new/templates/app/code/client.huggingface.py.tpl +55 -0
  22. flwr/cli/new/templates/app/code/client.jax.py.tpl +50 -0
  23. flwr/cli/new/templates/app/code/client.mlx.py.tpl +73 -0
  24. flwr/cli/new/templates/app/code/client.numpy.py.tpl +7 -7
  25. flwr/cli/new/templates/app/code/client.pytorch.py.tpl +30 -21
  26. flwr/cli/new/templates/app/code/client.sklearn.py.tpl +63 -0
  27. flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +57 -1
  28. flwr/cli/new/templates/app/code/dataset.baseline.py.tpl +36 -0
  29. flwr/cli/new/templates/app/code/flwr_tune/__init__.py +15 -0
  30. flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +126 -0
  31. flwr/cli/new/templates/app/code/flwr_tune/dataset.py.tpl +87 -0
  32. flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +78 -0
  33. flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +94 -0
  34. flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +83 -0
  35. flwr/cli/new/templates/app/code/model.baseline.py.tpl +80 -0
  36. flwr/cli/new/templates/app/code/server.baseline.py.tpl +46 -0
  37. flwr/cli/new/templates/app/code/server.huggingface.py.tpl +38 -0
  38. flwr/cli/new/templates/app/code/server.jax.py.tpl +26 -0
  39. flwr/cli/new/templates/app/code/server.mlx.py.tpl +31 -0
  40. flwr/cli/new/templates/app/code/server.numpy.py.tpl +22 -9
  41. flwr/cli/new/templates/app/code/server.pytorch.py.tpl +21 -18
  42. flwr/cli/new/templates/app/code/server.sklearn.py.tpl +36 -0
  43. flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +29 -1
  44. flwr/cli/new/templates/app/code/strategy.baseline.py.tpl +1 -0
  45. flwr/cli/new/templates/app/code/task.huggingface.py.tpl +102 -0
  46. flwr/cli/new/templates/app/code/task.jax.py.tpl +57 -0
  47. flwr/cli/new/templates/app/code/task.mlx.py.tpl +102 -0
  48. flwr/cli/new/templates/app/code/task.numpy.py.tpl +7 -0
  49. flwr/cli/new/templates/app/code/task.pytorch.py.tpl +29 -24
  50. flwr/cli/new/templates/app/code/task.sklearn.py.tpl +67 -0
  51. flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +53 -0
  52. flwr/cli/new/templates/app/code/utils.baseline.py.tpl +1 -0
  53. flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +138 -0
  54. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +68 -0
  55. flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +46 -0
  56. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +35 -0
  57. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +39 -0
  58. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +25 -12
  59. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +29 -14
  60. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +35 -0
  61. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +29 -14
  62. flwr/cli/run/__init__.py +1 -0
  63. flwr/cli/run/run.py +212 -34
  64. flwr/cli/stop.py +130 -0
  65. flwr/cli/utils.py +240 -5
  66. flwr/client/__init__.py +3 -2
  67. flwr/client/app.py +432 -255
  68. flwr/client/client.py +1 -11
  69. flwr/client/client_app.py +74 -13
  70. flwr/client/clientapp/__init__.py +22 -0
  71. flwr/client/clientapp/app.py +259 -0
  72. flwr/client/clientapp/clientappio_servicer.py +244 -0
  73. flwr/client/clientapp/utils.py +115 -0
  74. flwr/client/dpfedavg_numpy_client.py +7 -8
  75. flwr/client/grpc_adapter_client/__init__.py +15 -0
  76. flwr/client/grpc_adapter_client/connection.py +98 -0
  77. flwr/client/grpc_client/connection.py +21 -7
  78. flwr/client/grpc_rere_client/__init__.py +1 -1
  79. flwr/client/grpc_rere_client/client_interceptor.py +176 -0
  80. flwr/client/grpc_rere_client/connection.py +163 -56
  81. flwr/client/grpc_rere_client/grpc_adapter.py +167 -0
  82. flwr/client/heartbeat.py +74 -0
  83. flwr/client/message_handler/__init__.py +1 -1
  84. flwr/client/message_handler/message_handler.py +10 -11
  85. flwr/client/mod/__init__.py +5 -5
  86. flwr/client/mod/centraldp_mods.py +4 -2
  87. flwr/client/mod/comms_mods.py +5 -4
  88. flwr/client/mod/localdp_mod.py +10 -5
  89. flwr/client/mod/secure_aggregation/__init__.py +1 -1
  90. flwr/client/mod/secure_aggregation/secaggplus_mod.py +26 -26
  91. flwr/client/mod/utils.py +2 -4
  92. flwr/client/nodestate/__init__.py +26 -0
  93. flwr/client/nodestate/in_memory_nodestate.py +38 -0
  94. flwr/client/nodestate/nodestate.py +31 -0
  95. flwr/client/nodestate/nodestate_factory.py +38 -0
  96. flwr/client/numpy_client.py +8 -31
  97. flwr/client/rest_client/__init__.py +1 -1
  98. flwr/client/rest_client/connection.py +199 -176
  99. flwr/client/run_info_store.py +112 -0
  100. flwr/client/supernode/__init__.py +24 -0
  101. flwr/client/supernode/app.py +321 -0
  102. flwr/client/typing.py +1 -0
  103. flwr/common/__init__.py +17 -11
  104. flwr/common/address.py +47 -3
  105. flwr/common/args.py +153 -0
  106. flwr/common/auth_plugin/__init__.py +24 -0
  107. flwr/common/auth_plugin/auth_plugin.py +121 -0
  108. flwr/common/config.py +243 -0
  109. flwr/common/constant.py +135 -1
  110. flwr/common/context.py +32 -2
  111. flwr/common/date.py +22 -4
  112. flwr/common/differential_privacy.py +2 -2
  113. flwr/common/dp.py +2 -4
  114. flwr/common/exit_handlers.py +3 -3
  115. flwr/common/grpc.py +164 -5
  116. flwr/common/logger.py +230 -12
  117. flwr/common/message.py +191 -106
  118. flwr/common/object_ref.py +179 -44
  119. flwr/common/pyproject.py +1 -0
  120. flwr/common/record/__init__.py +2 -1
  121. flwr/common/record/configsrecord.py +58 -18
  122. flwr/common/record/metricsrecord.py +57 -17
  123. flwr/common/record/parametersrecord.py +88 -20
  124. flwr/common/record/recordset.py +153 -30
  125. flwr/common/record/typeddict.py +30 -55
  126. flwr/common/recordset_compat.py +31 -12
  127. flwr/common/retry_invoker.py +123 -30
  128. flwr/common/secure_aggregation/__init__.py +1 -1
  129. flwr/common/secure_aggregation/crypto/__init__.py +1 -1
  130. flwr/common/secure_aggregation/crypto/shamir.py +11 -11
  131. flwr/common/secure_aggregation/crypto/symmetric_encryption.py +68 -4
  132. flwr/common/secure_aggregation/ndarrays_arithmetic.py +17 -17
  133. flwr/common/secure_aggregation/quantization.py +8 -8
  134. flwr/common/secure_aggregation/secaggplus_constants.py +1 -1
  135. flwr/common/secure_aggregation/secaggplus_utils.py +10 -12
  136. flwr/common/serde.py +304 -23
  137. flwr/common/telemetry.py +65 -29
  138. flwr/common/typing.py +120 -19
  139. flwr/common/version.py +17 -3
  140. flwr/proto/clientappio_pb2.py +45 -0
  141. flwr/proto/clientappio_pb2.pyi +132 -0
  142. flwr/proto/clientappio_pb2_grpc.py +135 -0
  143. flwr/proto/clientappio_pb2_grpc.pyi +53 -0
  144. flwr/proto/exec_pb2.py +62 -0
  145. flwr/proto/exec_pb2.pyi +212 -0
  146. flwr/proto/exec_pb2_grpc.py +237 -0
  147. flwr/proto/exec_pb2_grpc.pyi +93 -0
  148. flwr/proto/fab_pb2.py +31 -0
  149. flwr/proto/fab_pb2.pyi +65 -0
  150. flwr/proto/fab_pb2_grpc.py +4 -0
  151. flwr/proto/fab_pb2_grpc.pyi +4 -0
  152. flwr/proto/fleet_pb2.py +42 -23
  153. flwr/proto/fleet_pb2.pyi +123 -1
  154. flwr/proto/fleet_pb2_grpc.py +170 -0
  155. flwr/proto/fleet_pb2_grpc.pyi +61 -0
  156. flwr/proto/grpcadapter_pb2.py +32 -0
  157. flwr/proto/grpcadapter_pb2.pyi +43 -0
  158. flwr/proto/grpcadapter_pb2_grpc.py +66 -0
  159. flwr/proto/grpcadapter_pb2_grpc.pyi +24 -0
  160. flwr/proto/log_pb2.py +29 -0
  161. flwr/proto/log_pb2.pyi +39 -0
  162. flwr/proto/log_pb2_grpc.py +4 -0
  163. flwr/proto/log_pb2_grpc.pyi +4 -0
  164. flwr/proto/message_pb2.py +41 -0
  165. flwr/proto/message_pb2.pyi +128 -0
  166. flwr/proto/message_pb2_grpc.py +4 -0
  167. flwr/proto/message_pb2_grpc.pyi +4 -0
  168. flwr/proto/node_pb2.py +2 -2
  169. flwr/proto/node_pb2.pyi +1 -4
  170. flwr/proto/recordset_pb2.py +35 -33
  171. flwr/proto/recordset_pb2.pyi +40 -14
  172. flwr/proto/run_pb2.py +64 -0
  173. flwr/proto/run_pb2.pyi +268 -0
  174. flwr/proto/run_pb2_grpc.py +4 -0
  175. flwr/proto/run_pb2_grpc.pyi +4 -0
  176. flwr/proto/serverappio_pb2.py +52 -0
  177. flwr/proto/{driver_pb2.pyi → serverappio_pb2.pyi} +62 -20
  178. flwr/proto/serverappio_pb2_grpc.py +410 -0
  179. flwr/proto/serverappio_pb2_grpc.pyi +160 -0
  180. flwr/proto/simulationio_pb2.py +38 -0
  181. flwr/proto/simulationio_pb2.pyi +65 -0
  182. flwr/proto/simulationio_pb2_grpc.py +239 -0
  183. flwr/proto/simulationio_pb2_grpc.pyi +94 -0
  184. flwr/proto/task_pb2.py +7 -8
  185. flwr/proto/task_pb2.pyi +8 -5
  186. flwr/proto/transport_pb2.py +8 -8
  187. flwr/proto/transport_pb2.pyi +9 -6
  188. flwr/server/__init__.py +2 -10
  189. flwr/server/app.py +579 -402
  190. flwr/server/client_manager.py +8 -6
  191. flwr/server/compat/app.py +6 -62
  192. flwr/server/compat/app_utils.py +14 -9
  193. flwr/server/compat/driver_client_proxy.py +25 -59
  194. flwr/server/compat/legacy_context.py +5 -4
  195. flwr/server/driver/__init__.py +2 -0
  196. flwr/server/driver/driver.py +36 -131
  197. flwr/server/driver/grpc_driver.py +220 -81
  198. flwr/server/driver/inmemory_driver.py +183 -0
  199. flwr/server/history.py +28 -29
  200. flwr/server/run_serverapp.py +15 -126
  201. flwr/server/server.py +50 -44
  202. flwr/server/server_app.py +59 -10
  203. flwr/server/serverapp/__init__.py +22 -0
  204. flwr/server/serverapp/app.py +256 -0
  205. flwr/server/serverapp_components.py +52 -0
  206. flwr/server/strategy/__init__.py +2 -2
  207. flwr/server/strategy/aggregate.py +37 -23
  208. flwr/server/strategy/bulyan.py +9 -9
  209. flwr/server/strategy/dp_adaptive_clipping.py +25 -25
  210. flwr/server/strategy/dp_fixed_clipping.py +23 -22
  211. flwr/server/strategy/dpfedavg_adaptive.py +8 -8
  212. flwr/server/strategy/dpfedavg_fixed.py +13 -12
  213. flwr/server/strategy/fault_tolerant_fedavg.py +11 -11
  214. flwr/server/strategy/fedadagrad.py +9 -9
  215. flwr/server/strategy/fedadam.py +20 -10
  216. flwr/server/strategy/fedavg.py +16 -16
  217. flwr/server/strategy/fedavg_android.py +17 -17
  218. flwr/server/strategy/fedavgm.py +9 -9
  219. flwr/server/strategy/fedmedian.py +5 -5
  220. flwr/server/strategy/fedopt.py +6 -6
  221. flwr/server/strategy/fedprox.py +7 -7
  222. flwr/server/strategy/fedtrimmedavg.py +8 -8
  223. flwr/server/strategy/fedxgb_bagging.py +12 -12
  224. flwr/server/strategy/fedxgb_cyclic.py +10 -10
  225. flwr/server/strategy/fedxgb_nn_avg.py +6 -6
  226. flwr/server/strategy/fedyogi.py +9 -9
  227. flwr/server/strategy/krum.py +9 -9
  228. flwr/server/strategy/qfedavg.py +16 -16
  229. flwr/server/strategy/strategy.py +10 -10
  230. flwr/server/superlink/driver/__init__.py +2 -2
  231. flwr/server/superlink/driver/serverappio_grpc.py +61 -0
  232. flwr/server/superlink/driver/serverappio_servicer.py +361 -0
  233. flwr/server/superlink/ffs/__init__.py +24 -0
  234. flwr/server/superlink/ffs/disk_ffs.py +108 -0
  235. flwr/server/superlink/ffs/ffs.py +79 -0
  236. flwr/server/superlink/ffs/ffs_factory.py +47 -0
  237. flwr/server/superlink/fleet/__init__.py +1 -1
  238. flwr/server/superlink/fleet/grpc_adapter/__init__.py +15 -0
  239. flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +162 -0
  240. flwr/server/superlink/fleet/grpc_bidi/__init__.py +1 -1
  241. flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +4 -2
  242. flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +3 -2
  243. flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +1 -1
  244. flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +5 -154
  245. flwr/server/superlink/fleet/grpc_rere/__init__.py +1 -1
  246. flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +120 -13
  247. flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +228 -0
  248. flwr/server/superlink/fleet/message_handler/__init__.py +1 -1
  249. flwr/server/superlink/fleet/message_handler/message_handler.py +156 -13
  250. flwr/server/superlink/fleet/rest_rere/__init__.py +1 -1
  251. flwr/server/superlink/fleet/rest_rere/rest_api.py +119 -81
  252. flwr/server/superlink/fleet/vce/__init__.py +1 -0
  253. flwr/server/superlink/fleet/vce/backend/__init__.py +4 -4
  254. flwr/server/superlink/fleet/vce/backend/backend.py +8 -9
  255. flwr/server/superlink/fleet/vce/backend/raybackend.py +87 -68
  256. flwr/server/superlink/fleet/vce/vce_api.py +208 -146
  257. flwr/server/superlink/linkstate/__init__.py +28 -0
  258. flwr/server/superlink/linkstate/in_memory_linkstate.py +569 -0
  259. flwr/server/superlink/linkstate/linkstate.py +376 -0
  260. flwr/server/superlink/{state/state_factory.py → linkstate/linkstate_factory.py} +19 -10
  261. flwr/server/superlink/linkstate/sqlite_linkstate.py +1196 -0
  262. flwr/server/superlink/linkstate/utils.py +399 -0
  263. flwr/server/superlink/simulation/__init__.py +15 -0
  264. flwr/server/superlink/simulation/simulationio_grpc.py +65 -0
  265. flwr/server/superlink/simulation/simulationio_servicer.py +186 -0
  266. flwr/server/superlink/utils.py +65 -0
  267. flwr/server/typing.py +2 -0
  268. flwr/server/utils/__init__.py +1 -1
  269. flwr/server/utils/tensorboard.py +5 -5
  270. flwr/server/utils/validator.py +40 -45
  271. flwr/server/workflow/default_workflows.py +70 -26
  272. flwr/server/workflow/secure_aggregation/secagg_workflow.py +1 -0
  273. flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +40 -27
  274. flwr/simulation/__init__.py +12 -5
  275. flwr/simulation/app.py +247 -315
  276. flwr/simulation/legacy_app.py +404 -0
  277. flwr/simulation/ray_transport/__init__.py +1 -1
  278. flwr/simulation/ray_transport/ray_actor.py +42 -67
  279. flwr/simulation/ray_transport/ray_client_proxy.py +37 -17
  280. flwr/simulation/ray_transport/utils.py +1 -0
  281. flwr/simulation/run_simulation.py +306 -163
  282. flwr/simulation/simulationio_connection.py +89 -0
  283. flwr/superexec/__init__.py +15 -0
  284. flwr/superexec/app.py +59 -0
  285. flwr/superexec/deployment.py +188 -0
  286. flwr/superexec/exec_grpc.py +80 -0
  287. flwr/superexec/exec_servicer.py +231 -0
  288. flwr/superexec/exec_user_auth_interceptor.py +101 -0
  289. flwr/superexec/executor.py +96 -0
  290. flwr/superexec/simulation.py +124 -0
  291. {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250115.dist-info}/METADATA +33 -26
  292. flwr_nightly-1.15.0.dev20250115.dist-info/RECORD +328 -0
  293. flwr_nightly-1.15.0.dev20250115.dist-info/entry_points.txt +12 -0
  294. flwr/cli/flower_toml.py +0 -140
  295. flwr/cli/new/templates/app/flower.toml.tpl +0 -13
  296. flwr/cli/new/templates/app/requirements.numpy.txt.tpl +0 -2
  297. flwr/cli/new/templates/app/requirements.pytorch.txt.tpl +0 -4
  298. flwr/cli/new/templates/app/requirements.tensorflow.txt.tpl +0 -4
  299. flwr/client/node_state.py +0 -48
  300. flwr/client/node_state_tests.py +0 -65
  301. flwr/proto/driver_pb2.py +0 -44
  302. flwr/proto/driver_pb2_grpc.py +0 -169
  303. flwr/proto/driver_pb2_grpc.pyi +0 -66
  304. flwr/server/superlink/driver/driver_grpc.py +0 -54
  305. flwr/server/superlink/driver/driver_servicer.py +0 -129
  306. flwr/server/superlink/state/in_memory_state.py +0 -230
  307. flwr/server/superlink/state/sqlite_state.py +0 -630
  308. flwr/server/superlink/state/state.py +0 -154
  309. flwr_nightly-1.8.0.dev20240315.dist-info/RECORD +0 -211
  310. flwr_nightly-1.8.0.dev20240315.dist-info/entry_points.txt +0 -9
  311. {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250115.dist-info}/LICENSE +0 -0
  312. {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250115.dist-info}/WHEEL +0 -0
@@ -0,0 +1,160 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+ import abc
6
+ import flwr.proto.fab_pb2
7
+ import flwr.proto.log_pb2
8
+ import flwr.proto.run_pb2
9
+ import flwr.proto.serverappio_pb2
10
+ import grpc
11
+
12
+ class ServerAppIoStub:
13
+ def __init__(self, channel: grpc.Channel) -> None: ...
14
+ CreateRun: grpc.UnaryUnaryMultiCallable[
15
+ flwr.proto.run_pb2.CreateRunRequest,
16
+ flwr.proto.run_pb2.CreateRunResponse]
17
+ """Request run_id"""
18
+
19
+ GetNodes: grpc.UnaryUnaryMultiCallable[
20
+ flwr.proto.serverappio_pb2.GetNodesRequest,
21
+ flwr.proto.serverappio_pb2.GetNodesResponse]
22
+ """Return a set of nodes"""
23
+
24
+ PushTaskIns: grpc.UnaryUnaryMultiCallable[
25
+ flwr.proto.serverappio_pb2.PushTaskInsRequest,
26
+ flwr.proto.serverappio_pb2.PushTaskInsResponse]
27
+ """Create one or more tasks"""
28
+
29
+ PullTaskRes: grpc.UnaryUnaryMultiCallable[
30
+ flwr.proto.serverappio_pb2.PullTaskResRequest,
31
+ flwr.proto.serverappio_pb2.PullTaskResResponse]
32
+ """Get task results"""
33
+
34
+ GetRun: grpc.UnaryUnaryMultiCallable[
35
+ flwr.proto.run_pb2.GetRunRequest,
36
+ flwr.proto.run_pb2.GetRunResponse]
37
+ """Get run details"""
38
+
39
+ GetFab: grpc.UnaryUnaryMultiCallable[
40
+ flwr.proto.fab_pb2.GetFabRequest,
41
+ flwr.proto.fab_pb2.GetFabResponse]
42
+ """Get FAB"""
43
+
44
+ PullServerAppInputs: grpc.UnaryUnaryMultiCallable[
45
+ flwr.proto.serverappio_pb2.PullServerAppInputsRequest,
46
+ flwr.proto.serverappio_pb2.PullServerAppInputsResponse]
47
+ """Pull ServerApp inputs"""
48
+
49
+ PushServerAppOutputs: grpc.UnaryUnaryMultiCallable[
50
+ flwr.proto.serverappio_pb2.PushServerAppOutputsRequest,
51
+ flwr.proto.serverappio_pb2.PushServerAppOutputsResponse]
52
+ """Push ServerApp outputs"""
53
+
54
+ UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
55
+ flwr.proto.run_pb2.UpdateRunStatusRequest,
56
+ flwr.proto.run_pb2.UpdateRunStatusResponse]
57
+ """Update the status of a given run"""
58
+
59
+ GetRunStatus: grpc.UnaryUnaryMultiCallable[
60
+ flwr.proto.run_pb2.GetRunStatusRequest,
61
+ flwr.proto.run_pb2.GetRunStatusResponse]
62
+ """Get the status of a given run"""
63
+
64
+ PushLogs: grpc.UnaryUnaryMultiCallable[
65
+ flwr.proto.log_pb2.PushLogsRequest,
66
+ flwr.proto.log_pb2.PushLogsResponse]
67
+ """Push ServerApp logs"""
68
+
69
+
70
+ class ServerAppIoServicer(metaclass=abc.ABCMeta):
71
+ @abc.abstractmethod
72
+ def CreateRun(self,
73
+ request: flwr.proto.run_pb2.CreateRunRequest,
74
+ context: grpc.ServicerContext,
75
+ ) -> flwr.proto.run_pb2.CreateRunResponse:
76
+ """Request run_id"""
77
+ pass
78
+
79
+ @abc.abstractmethod
80
+ def GetNodes(self,
81
+ request: flwr.proto.serverappio_pb2.GetNodesRequest,
82
+ context: grpc.ServicerContext,
83
+ ) -> flwr.proto.serverappio_pb2.GetNodesResponse:
84
+ """Return a set of nodes"""
85
+ pass
86
+
87
+ @abc.abstractmethod
88
+ def PushTaskIns(self,
89
+ request: flwr.proto.serverappio_pb2.PushTaskInsRequest,
90
+ context: grpc.ServicerContext,
91
+ ) -> flwr.proto.serverappio_pb2.PushTaskInsResponse:
92
+ """Create one or more tasks"""
93
+ pass
94
+
95
+ @abc.abstractmethod
96
+ def PullTaskRes(self,
97
+ request: flwr.proto.serverappio_pb2.PullTaskResRequest,
98
+ context: grpc.ServicerContext,
99
+ ) -> flwr.proto.serverappio_pb2.PullTaskResResponse:
100
+ """Get task results"""
101
+ pass
102
+
103
+ @abc.abstractmethod
104
+ def GetRun(self,
105
+ request: flwr.proto.run_pb2.GetRunRequest,
106
+ context: grpc.ServicerContext,
107
+ ) -> flwr.proto.run_pb2.GetRunResponse:
108
+ """Get run details"""
109
+ pass
110
+
111
+ @abc.abstractmethod
112
+ def GetFab(self,
113
+ request: flwr.proto.fab_pb2.GetFabRequest,
114
+ context: grpc.ServicerContext,
115
+ ) -> flwr.proto.fab_pb2.GetFabResponse:
116
+ """Get FAB"""
117
+ pass
118
+
119
+ @abc.abstractmethod
120
+ def PullServerAppInputs(self,
121
+ request: flwr.proto.serverappio_pb2.PullServerAppInputsRequest,
122
+ context: grpc.ServicerContext,
123
+ ) -> flwr.proto.serverappio_pb2.PullServerAppInputsResponse:
124
+ """Pull ServerApp inputs"""
125
+ pass
126
+
127
+ @abc.abstractmethod
128
+ def PushServerAppOutputs(self,
129
+ request: flwr.proto.serverappio_pb2.PushServerAppOutputsRequest,
130
+ context: grpc.ServicerContext,
131
+ ) -> flwr.proto.serverappio_pb2.PushServerAppOutputsResponse:
132
+ """Push ServerApp outputs"""
133
+ pass
134
+
135
+ @abc.abstractmethod
136
+ def UpdateRunStatus(self,
137
+ request: flwr.proto.run_pb2.UpdateRunStatusRequest,
138
+ context: grpc.ServicerContext,
139
+ ) -> flwr.proto.run_pb2.UpdateRunStatusResponse:
140
+ """Update the status of a given run"""
141
+ pass
142
+
143
+ @abc.abstractmethod
144
+ def GetRunStatus(self,
145
+ request: flwr.proto.run_pb2.GetRunStatusRequest,
146
+ context: grpc.ServicerContext,
147
+ ) -> flwr.proto.run_pb2.GetRunStatusResponse:
148
+ """Get the status of a given run"""
149
+ pass
150
+
151
+ @abc.abstractmethod
152
+ def PushLogs(self,
153
+ request: flwr.proto.log_pb2.PushLogsRequest,
154
+ context: grpc.ServicerContext,
155
+ ) -> flwr.proto.log_pb2.PushLogsResponse:
156
+ """Push ServerApp logs"""
157
+ pass
158
+
159
+
160
+ def add_ServerAppIoServicer_to_server(servicer: ServerAppIoServicer, server: grpc.Server) -> None: ...
@@ -0,0 +1,38 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: flwr/proto/simulationio.proto
4
+ # Protobuf Python Version: 4.25.0
5
+ """Generated protocol buffer code."""
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
16
+ from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
17
+ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
18
+ from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
19
+
20
+
21
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lwr/proto/simulationio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"\x1d\n\x1bPullSimulationInputsRequest\"\x80\x01\n\x1cPullSimulationInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"T\n\x1cPushSimulationOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1f\n\x1dPushSimulationOutputsResponse2\xd4\x04\n\x0cSimulationIo\x12k\n\x14PullSimulationInputs\x12\'.flwr.proto.PullSimulationInputsRequest\x1a(.flwr.proto.PullSimulationInputsResponse\"\x00\x12n\n\x15PushSimulationOutputs\x12(.flwr.proto.PushSimulationOutputsRequest\x1a).flwr.proto.PushSimulationOutputsResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x12G\n\x08PushLogs\x12\x1b.flwr.proto.PushLogsRequest\x1a\x1c.flwr.proto.PushLogsResponse\"\x00\x12k\n\x14GetFederationOptions\x12\'.flwr.proto.GetFederationOptionsRequest\x1a(.flwr.proto.GetFederationOptionsResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x62\x06proto3')
22
+
23
+ _globals = globals()
24
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
25
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.simulationio_pb2', _globals)
26
+ if _descriptor._USE_C_DESCRIPTORS == False:
27
+ DESCRIPTOR._options = None
28
+ _globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_start=137
29
+ _globals['_PULLSIMULATIONINPUTSREQUEST']._serialized_end=166
30
+ _globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_start=169
31
+ _globals['_PULLSIMULATIONINPUTSRESPONSE']._serialized_end=297
32
+ _globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_start=299
33
+ _globals['_PUSHSIMULATIONOUTPUTSREQUEST']._serialized_end=383
34
+ _globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_start=385
35
+ _globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_end=416
36
+ _globals['_SIMULATIONIO']._serialized_start=419
37
+ _globals['_SIMULATIONIO']._serialized_end=1015
38
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,65 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+ import builtins
6
+ import flwr.proto.fab_pb2
7
+ import flwr.proto.message_pb2
8
+ import flwr.proto.run_pb2
9
+ import google.protobuf.descriptor
10
+ import google.protobuf.message
11
+ import typing
12
+ import typing_extensions
13
+
14
+ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
15
+
16
+ class PullSimulationInputsRequest(google.protobuf.message.Message):
17
+ """PullSimulationInputs messages"""
18
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
19
+ def __init__(self,
20
+ ) -> None: ...
21
+ global___PullSimulationInputsRequest = PullSimulationInputsRequest
22
+
23
+ class PullSimulationInputsResponse(google.protobuf.message.Message):
24
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
25
+ CONTEXT_FIELD_NUMBER: builtins.int
26
+ RUN_FIELD_NUMBER: builtins.int
27
+ FAB_FIELD_NUMBER: builtins.int
28
+ @property
29
+ def context(self) -> flwr.proto.message_pb2.Context: ...
30
+ @property
31
+ def run(self) -> flwr.proto.run_pb2.Run: ...
32
+ @property
33
+ def fab(self) -> flwr.proto.fab_pb2.Fab: ...
34
+ def __init__(self,
35
+ *,
36
+ context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
37
+ run: typing.Optional[flwr.proto.run_pb2.Run] = ...,
38
+ fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
39
+ ) -> None: ...
40
+ def HasField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> builtins.bool: ...
41
+ def ClearField(self, field_name: typing_extensions.Literal["context",b"context","fab",b"fab","run",b"run"]) -> None: ...
42
+ global___PullSimulationInputsResponse = PullSimulationInputsResponse
43
+
44
+ class PushSimulationOutputsRequest(google.protobuf.message.Message):
45
+ """PushSimulationOutputs messages"""
46
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
47
+ RUN_ID_FIELD_NUMBER: builtins.int
48
+ CONTEXT_FIELD_NUMBER: builtins.int
49
+ run_id: builtins.int
50
+ @property
51
+ def context(self) -> flwr.proto.message_pb2.Context: ...
52
+ def __init__(self,
53
+ *,
54
+ run_id: builtins.int = ...,
55
+ context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
56
+ ) -> None: ...
57
+ def HasField(self, field_name: typing_extensions.Literal["context",b"context"]) -> builtins.bool: ...
58
+ def ClearField(self, field_name: typing_extensions.Literal["context",b"context","run_id",b"run_id"]) -> None: ...
59
+ global___PushSimulationOutputsRequest = PushSimulationOutputsRequest
60
+
61
+ class PushSimulationOutputsResponse(google.protobuf.message.Message):
62
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
63
+ def __init__(self,
64
+ ) -> None: ...
65
+ global___PushSimulationOutputsResponse = PushSimulationOutputsResponse
@@ -0,0 +1,239 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
6
+ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
7
+ from flwr.proto import simulationio_pb2 as flwr_dot_proto_dot_simulationio__pb2
8
+
9
+
10
+ class SimulationIoStub(object):
11
+ """Missing associated documentation comment in .proto file."""
12
+
13
+ def __init__(self, channel):
14
+ """Constructor.
15
+
16
+ Args:
17
+ channel: A grpc.Channel.
18
+ """
19
+ self.PullSimulationInputs = channel.unary_unary(
20
+ '/flwr.proto.SimulationIo/PullSimulationInputs',
21
+ request_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
22
+ response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
23
+ )
24
+ self.PushSimulationOutputs = channel.unary_unary(
25
+ '/flwr.proto.SimulationIo/PushSimulationOutputs',
26
+ request_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
27
+ response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
28
+ )
29
+ self.UpdateRunStatus = channel.unary_unary(
30
+ '/flwr.proto.SimulationIo/UpdateRunStatus',
31
+ request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
32
+ response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
33
+ )
34
+ self.PushLogs = channel.unary_unary(
35
+ '/flwr.proto.SimulationIo/PushLogs',
36
+ request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
37
+ response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
38
+ )
39
+ self.GetFederationOptions = channel.unary_unary(
40
+ '/flwr.proto.SimulationIo/GetFederationOptions',
41
+ request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
42
+ response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
43
+ )
44
+ self.GetRunStatus = channel.unary_unary(
45
+ '/flwr.proto.SimulationIo/GetRunStatus',
46
+ request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
47
+ response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
48
+ )
49
+
50
+
51
+ class SimulationIoServicer(object):
52
+ """Missing associated documentation comment in .proto file."""
53
+
54
+ def PullSimulationInputs(self, request, context):
55
+ """Pull Simulation inputs
56
+ """
57
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
58
+ context.set_details('Method not implemented!')
59
+ raise NotImplementedError('Method not implemented!')
60
+
61
+ def PushSimulationOutputs(self, request, context):
62
+ """Push Simulation outputs
63
+ """
64
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
65
+ context.set_details('Method not implemented!')
66
+ raise NotImplementedError('Method not implemented!')
67
+
68
+ def UpdateRunStatus(self, request, context):
69
+ """Update the status of a given run
70
+ """
71
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
72
+ context.set_details('Method not implemented!')
73
+ raise NotImplementedError('Method not implemented!')
74
+
75
+ def PushLogs(self, request, context):
76
+ """Push ServerApp logs
77
+ """
78
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
79
+ context.set_details('Method not implemented!')
80
+ raise NotImplementedError('Method not implemented!')
81
+
82
+ def GetFederationOptions(self, request, context):
83
+ """Get Federation Options
84
+ """
85
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
86
+ context.set_details('Method not implemented!')
87
+ raise NotImplementedError('Method not implemented!')
88
+
89
+ def GetRunStatus(self, request, context):
90
+ """Get Run Status
91
+ """
92
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
93
+ context.set_details('Method not implemented!')
94
+ raise NotImplementedError('Method not implemented!')
95
+
96
+
97
+ def add_SimulationIoServicer_to_server(servicer, server):
98
+ rpc_method_handlers = {
99
+ 'PullSimulationInputs': grpc.unary_unary_rpc_method_handler(
100
+ servicer.PullSimulationInputs,
101
+ request_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.FromString,
102
+ response_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.SerializeToString,
103
+ ),
104
+ 'PushSimulationOutputs': grpc.unary_unary_rpc_method_handler(
105
+ servicer.PushSimulationOutputs,
106
+ request_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.FromString,
107
+ response_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.SerializeToString,
108
+ ),
109
+ 'UpdateRunStatus': grpc.unary_unary_rpc_method_handler(
110
+ servicer.UpdateRunStatus,
111
+ request_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.FromString,
112
+ response_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.SerializeToString,
113
+ ),
114
+ 'PushLogs': grpc.unary_unary_rpc_method_handler(
115
+ servicer.PushLogs,
116
+ request_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.FromString,
117
+ response_serializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.SerializeToString,
118
+ ),
119
+ 'GetFederationOptions': grpc.unary_unary_rpc_method_handler(
120
+ servicer.GetFederationOptions,
121
+ request_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.FromString,
122
+ response_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.SerializeToString,
123
+ ),
124
+ 'GetRunStatus': grpc.unary_unary_rpc_method_handler(
125
+ servicer.GetRunStatus,
126
+ request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
127
+ response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
128
+ ),
129
+ }
130
+ generic_handler = grpc.method_handlers_generic_handler(
131
+ 'flwr.proto.SimulationIo', rpc_method_handlers)
132
+ server.add_generic_rpc_handlers((generic_handler,))
133
+
134
+
135
+ # This class is part of an EXPERIMENTAL API.
136
+ class SimulationIo(object):
137
+ """Missing associated documentation comment in .proto file."""
138
+
139
+ @staticmethod
140
+ def PullSimulationInputs(request,
141
+ target,
142
+ options=(),
143
+ channel_credentials=None,
144
+ call_credentials=None,
145
+ insecure=False,
146
+ compression=None,
147
+ wait_for_ready=None,
148
+ timeout=None,
149
+ metadata=None):
150
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PullSimulationInputs',
151
+ flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
152
+ flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
153
+ options, channel_credentials,
154
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
155
+
156
+ @staticmethod
157
+ def PushSimulationOutputs(request,
158
+ target,
159
+ options=(),
160
+ channel_credentials=None,
161
+ call_credentials=None,
162
+ insecure=False,
163
+ compression=None,
164
+ wait_for_ready=None,
165
+ timeout=None,
166
+ metadata=None):
167
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushSimulationOutputs',
168
+ flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
169
+ flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
170
+ options, channel_credentials,
171
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
172
+
173
+ @staticmethod
174
+ def UpdateRunStatus(request,
175
+ target,
176
+ options=(),
177
+ channel_credentials=None,
178
+ call_credentials=None,
179
+ insecure=False,
180
+ compression=None,
181
+ wait_for_ready=None,
182
+ timeout=None,
183
+ metadata=None):
184
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/UpdateRunStatus',
185
+ flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
186
+ flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
187
+ options, channel_credentials,
188
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
189
+
190
+ @staticmethod
191
+ def PushLogs(request,
192
+ target,
193
+ options=(),
194
+ channel_credentials=None,
195
+ call_credentials=None,
196
+ insecure=False,
197
+ compression=None,
198
+ wait_for_ready=None,
199
+ timeout=None,
200
+ metadata=None):
201
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushLogs',
202
+ flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
203
+ flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
204
+ options, channel_credentials,
205
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
206
+
207
+ @staticmethod
208
+ def GetFederationOptions(request,
209
+ target,
210
+ options=(),
211
+ channel_credentials=None,
212
+ call_credentials=None,
213
+ insecure=False,
214
+ compression=None,
215
+ wait_for_ready=None,
216
+ timeout=None,
217
+ metadata=None):
218
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetFederationOptions',
219
+ flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
220
+ flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
221
+ options, channel_credentials,
222
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
223
+
224
+ @staticmethod
225
+ def GetRunStatus(request,
226
+ target,
227
+ options=(),
228
+ channel_credentials=None,
229
+ call_credentials=None,
230
+ insecure=False,
231
+ compression=None,
232
+ wait_for_ready=None,
233
+ timeout=None,
234
+ metadata=None):
235
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetRunStatus',
236
+ flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
237
+ flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
238
+ options, channel_credentials,
239
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -0,0 +1,94 @@
1
+ """
2
+ @generated by mypy-protobuf. Do not edit manually!
3
+ isort:skip_file
4
+ """
5
+ import abc
6
+ import flwr.proto.log_pb2
7
+ import flwr.proto.run_pb2
8
+ import flwr.proto.simulationio_pb2
9
+ import grpc
10
+
11
+ class SimulationIoStub:
12
+ def __init__(self, channel: grpc.Channel) -> None: ...
13
+ PullSimulationInputs: grpc.UnaryUnaryMultiCallable[
14
+ flwr.proto.simulationio_pb2.PullSimulationInputsRequest,
15
+ flwr.proto.simulationio_pb2.PullSimulationInputsResponse]
16
+ """Pull Simulation inputs"""
17
+
18
+ PushSimulationOutputs: grpc.UnaryUnaryMultiCallable[
19
+ flwr.proto.simulationio_pb2.PushSimulationOutputsRequest,
20
+ flwr.proto.simulationio_pb2.PushSimulationOutputsResponse]
21
+ """Push Simulation outputs"""
22
+
23
+ UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
24
+ flwr.proto.run_pb2.UpdateRunStatusRequest,
25
+ flwr.proto.run_pb2.UpdateRunStatusResponse]
26
+ """Update the status of a given run"""
27
+
28
+ PushLogs: grpc.UnaryUnaryMultiCallable[
29
+ flwr.proto.log_pb2.PushLogsRequest,
30
+ flwr.proto.log_pb2.PushLogsResponse]
31
+ """Push ServerApp logs"""
32
+
33
+ GetFederationOptions: grpc.UnaryUnaryMultiCallable[
34
+ flwr.proto.run_pb2.GetFederationOptionsRequest,
35
+ flwr.proto.run_pb2.GetFederationOptionsResponse]
36
+ """Get Federation Options"""
37
+
38
+ GetRunStatus: grpc.UnaryUnaryMultiCallable[
39
+ flwr.proto.run_pb2.GetRunStatusRequest,
40
+ flwr.proto.run_pb2.GetRunStatusResponse]
41
+ """Get Run Status"""
42
+
43
+
44
+ class SimulationIoServicer(metaclass=abc.ABCMeta):
45
+ @abc.abstractmethod
46
+ def PullSimulationInputs(self,
47
+ request: flwr.proto.simulationio_pb2.PullSimulationInputsRequest,
48
+ context: grpc.ServicerContext,
49
+ ) -> flwr.proto.simulationio_pb2.PullSimulationInputsResponse:
50
+ """Pull Simulation inputs"""
51
+ pass
52
+
53
+ @abc.abstractmethod
54
+ def PushSimulationOutputs(self,
55
+ request: flwr.proto.simulationio_pb2.PushSimulationOutputsRequest,
56
+ context: grpc.ServicerContext,
57
+ ) -> flwr.proto.simulationio_pb2.PushSimulationOutputsResponse:
58
+ """Push Simulation outputs"""
59
+ pass
60
+
61
+ @abc.abstractmethod
62
+ def UpdateRunStatus(self,
63
+ request: flwr.proto.run_pb2.UpdateRunStatusRequest,
64
+ context: grpc.ServicerContext,
65
+ ) -> flwr.proto.run_pb2.UpdateRunStatusResponse:
66
+ """Update the status of a given run"""
67
+ pass
68
+
69
+ @abc.abstractmethod
70
+ def PushLogs(self,
71
+ request: flwr.proto.log_pb2.PushLogsRequest,
72
+ context: grpc.ServicerContext,
73
+ ) -> flwr.proto.log_pb2.PushLogsResponse:
74
+ """Push ServerApp logs"""
75
+ pass
76
+
77
+ @abc.abstractmethod
78
+ def GetFederationOptions(self,
79
+ request: flwr.proto.run_pb2.GetFederationOptionsRequest,
80
+ context: grpc.ServicerContext,
81
+ ) -> flwr.proto.run_pb2.GetFederationOptionsResponse:
82
+ """Get Federation Options"""
83
+ pass
84
+
85
+ @abc.abstractmethod
86
+ def GetRunStatus(self,
87
+ request: flwr.proto.run_pb2.GetRunStatusRequest,
88
+ context: grpc.ServicerContext,
89
+ ) -> flwr.proto.run_pb2.GetRunStatusResponse:
90
+ """Get Run Status"""
91
+ pass
92
+
93
+
94
+ def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: grpc.Server) -> None: ...
flwr/proto/task_pb2.py CHANGED
@@ -14,21 +14,20 @@ _sym_db = _symbol_database.Default()
14
14
 
15
15
  from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2
16
16
  from flwr.proto import recordset_pb2 as flwr_dot_proto_dot_recordset__pb2
17
- from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
18
17
  from flwr.proto import error_pb2 as flwr_dot_proto_dot_error__pb2
19
18
 
20
19
 
21
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/task.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x1a\x66lwr/proto/transport.proto\x1a\x16\x66lwr/proto/error.proto\"\xf6\x01\n\x04Task\x12\"\n\x08producer\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\"\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x12\n\ncreated_at\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x65livered_at\x18\x04 \x01(\t\x12\x0b\n\x03ttl\x18\x05 \x01(\t\x12\x10\n\x08\x61ncestry\x18\x06 \x03(\t\x12\x11\n\ttask_type\x18\x07 \x01(\t\x12(\n\trecordset\x18\x08 \x01(\x0b\x32\x15.flwr.proto.RecordSet\x12 \n\x05\x65rror\x18\t \x01(\x0b\x32\x11.flwr.proto.Error\"\\\n\x07TaskIns\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x12\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Task\"\\\n\x07TaskRes\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x12\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Taskb\x06proto3')
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/task.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x16\x66lwr/proto/error.proto\"\x89\x02\n\x04Task\x12\"\n\x08producer\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\"\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x12\n\ncreated_at\x18\x03 \x01(\x01\x12\x14\n\x0c\x64\x65livered_at\x18\x04 \x01(\t\x12\x11\n\tpushed_at\x18\x05 \x01(\x01\x12\x0b\n\x03ttl\x18\x06 \x01(\x01\x12\x10\n\x08\x61ncestry\x18\x07 \x03(\t\x12\x11\n\ttask_type\x18\x08 \x01(\t\x12(\n\trecordset\x18\t \x01(\x0b\x32\x15.flwr.proto.RecordSet\x12 \n\x05\x65rror\x18\n \x01(\x0b\x32\x11.flwr.proto.Error\"\\\n\x07TaskIns\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Task\"\\\n\x07TaskRes\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Taskb\x06proto3')
22
21
 
23
22
  _globals = globals()
24
23
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
25
24
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.task_pb2', _globals)
26
25
  if _descriptor._USE_C_DESCRIPTORS == False:
27
26
  DESCRIPTOR._options = None
28
- _globals['_TASK']._serialized_start=141
29
- _globals['_TASK']._serialized_end=387
30
- _globals['_TASKINS']._serialized_start=389
31
- _globals['_TASKINS']._serialized_end=481
32
- _globals['_TASKRES']._serialized_start=483
33
- _globals['_TASKRES']._serialized_end=575
27
+ _globals['_TASK']._serialized_start=113
28
+ _globals['_TASK']._serialized_end=378
29
+ _globals['_TASKINS']._serialized_start=380
30
+ _globals['_TASKINS']._serialized_end=472
31
+ _globals['_TASKRES']._serialized_start=474
32
+ _globals['_TASKRES']._serialized_end=566
34
33
  # @@protoc_insertion_point(module_scope)
flwr/proto/task_pb2.pyi CHANGED
@@ -20,6 +20,7 @@ class Task(google.protobuf.message.Message):
20
20
  CONSUMER_FIELD_NUMBER: builtins.int
21
21
  CREATED_AT_FIELD_NUMBER: builtins.int
22
22
  DELIVERED_AT_FIELD_NUMBER: builtins.int
23
+ PUSHED_AT_FIELD_NUMBER: builtins.int
23
24
  TTL_FIELD_NUMBER: builtins.int
24
25
  ANCESTRY_FIELD_NUMBER: builtins.int
25
26
  TASK_TYPE_FIELD_NUMBER: builtins.int
@@ -29,9 +30,10 @@ class Task(google.protobuf.message.Message):
29
30
  def producer(self) -> flwr.proto.node_pb2.Node: ...
30
31
  @property
31
32
  def consumer(self) -> flwr.proto.node_pb2.Node: ...
32
- created_at: typing.Text
33
+ created_at: builtins.float
33
34
  delivered_at: typing.Text
34
- ttl: typing.Text
35
+ pushed_at: builtins.float
36
+ ttl: builtins.float
35
37
  @property
36
38
  def ancestry(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
37
39
  task_type: typing.Text
@@ -43,16 +45,17 @@ class Task(google.protobuf.message.Message):
43
45
  *,
44
46
  producer: typing.Optional[flwr.proto.node_pb2.Node] = ...,
45
47
  consumer: typing.Optional[flwr.proto.node_pb2.Node] = ...,
46
- created_at: typing.Text = ...,
48
+ created_at: builtins.float = ...,
47
49
  delivered_at: typing.Text = ...,
48
- ttl: typing.Text = ...,
50
+ pushed_at: builtins.float = ...,
51
+ ttl: builtins.float = ...,
49
52
  ancestry: typing.Optional[typing.Iterable[typing.Text]] = ...,
50
53
  task_type: typing.Text = ...,
51
54
  recordset: typing.Optional[flwr.proto.recordset_pb2.RecordSet] = ...,
52
55
  error: typing.Optional[flwr.proto.error_pb2.Error] = ...,
53
56
  ) -> None: ...
54
57
  def HasField(self, field_name: typing_extensions.Literal["consumer",b"consumer","error",b"error","producer",b"producer","recordset",b"recordset"]) -> builtins.bool: ...
55
- def ClearField(self, field_name: typing_extensions.Literal["ancestry",b"ancestry","consumer",b"consumer","created_at",b"created_at","delivered_at",b"delivered_at","error",b"error","producer",b"producer","recordset",b"recordset","task_type",b"task_type","ttl",b"ttl"]) -> None: ...
58
+ def ClearField(self, field_name: typing_extensions.Literal["ancestry",b"ancestry","consumer",b"consumer","created_at",b"created_at","delivered_at",b"delivered_at","error",b"error","producer",b"producer","pushed_at",b"pushed_at","recordset",b"recordset","task_type",b"task_type","ttl",b"ttl"]) -> None: ...
56
59
  global___Task = Task
57
60
 
58
61
  class TaskIns(google.protobuf.message.Message):