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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) 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 +132 -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 +298 -19
  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 +1 -1
  169. flwr/proto/recordset_pb2.py +35 -33
  170. flwr/proto/recordset_pb2.pyi +40 -14
  171. flwr/proto/run_pb2.py +64 -0
  172. flwr/proto/run_pb2.pyi +268 -0
  173. flwr/proto/run_pb2_grpc.py +4 -0
  174. flwr/proto/run_pb2_grpc.pyi +4 -0
  175. flwr/proto/serverappio_pb2.py +52 -0
  176. flwr/proto/{driver_pb2.pyi → serverappio_pb2.pyi} +62 -20
  177. flwr/proto/serverappio_pb2_grpc.py +410 -0
  178. flwr/proto/serverappio_pb2_grpc.pyi +160 -0
  179. flwr/proto/simulationio_pb2.py +38 -0
  180. flwr/proto/simulationio_pb2.pyi +65 -0
  181. flwr/proto/simulationio_pb2_grpc.py +239 -0
  182. flwr/proto/simulationio_pb2_grpc.pyi +94 -0
  183. flwr/proto/task_pb2.py +7 -8
  184. flwr/proto/task_pb2.pyi +8 -5
  185. flwr/proto/transport_pb2.py +8 -8
  186. flwr/proto/transport_pb2.pyi +9 -6
  187. flwr/server/__init__.py +2 -10
  188. flwr/server/app.py +579 -402
  189. flwr/server/client_manager.py +8 -6
  190. flwr/server/compat/app.py +6 -62
  191. flwr/server/compat/app_utils.py +14 -8
  192. flwr/server/compat/driver_client_proxy.py +25 -58
  193. flwr/server/compat/legacy_context.py +5 -4
  194. flwr/server/driver/__init__.py +2 -0
  195. flwr/server/driver/driver.py +36 -131
  196. flwr/server/driver/grpc_driver.py +217 -81
  197. flwr/server/driver/inmemory_driver.py +182 -0
  198. flwr/server/history.py +28 -29
  199. flwr/server/run_serverapp.py +15 -126
  200. flwr/server/server.py +50 -44
  201. flwr/server/server_app.py +59 -10
  202. flwr/server/serverapp/__init__.py +22 -0
  203. flwr/server/serverapp/app.py +256 -0
  204. flwr/server/serverapp_components.py +52 -0
  205. flwr/server/strategy/__init__.py +2 -2
  206. flwr/server/strategy/aggregate.py +37 -23
  207. flwr/server/strategy/bulyan.py +9 -9
  208. flwr/server/strategy/dp_adaptive_clipping.py +25 -25
  209. flwr/server/strategy/dp_fixed_clipping.py +23 -22
  210. flwr/server/strategy/dpfedavg_adaptive.py +8 -8
  211. flwr/server/strategy/dpfedavg_fixed.py +13 -12
  212. flwr/server/strategy/fault_tolerant_fedavg.py +11 -11
  213. flwr/server/strategy/fedadagrad.py +9 -9
  214. flwr/server/strategy/fedadam.py +20 -10
  215. flwr/server/strategy/fedavg.py +16 -16
  216. flwr/server/strategy/fedavg_android.py +17 -17
  217. flwr/server/strategy/fedavgm.py +9 -9
  218. flwr/server/strategy/fedmedian.py +5 -5
  219. flwr/server/strategy/fedopt.py +6 -6
  220. flwr/server/strategy/fedprox.py +7 -7
  221. flwr/server/strategy/fedtrimmedavg.py +8 -8
  222. flwr/server/strategy/fedxgb_bagging.py +12 -12
  223. flwr/server/strategy/fedxgb_cyclic.py +10 -10
  224. flwr/server/strategy/fedxgb_nn_avg.py +6 -6
  225. flwr/server/strategy/fedyogi.py +9 -9
  226. flwr/server/strategy/krum.py +9 -9
  227. flwr/server/strategy/qfedavg.py +16 -16
  228. flwr/server/strategy/strategy.py +10 -10
  229. flwr/server/superlink/driver/__init__.py +2 -2
  230. flwr/server/superlink/driver/serverappio_grpc.py +61 -0
  231. flwr/server/superlink/driver/serverappio_servicer.py +363 -0
  232. flwr/server/superlink/ffs/__init__.py +24 -0
  233. flwr/server/superlink/ffs/disk_ffs.py +108 -0
  234. flwr/server/superlink/ffs/ffs.py +79 -0
  235. flwr/server/superlink/ffs/ffs_factory.py +47 -0
  236. flwr/server/superlink/fleet/__init__.py +1 -1
  237. flwr/server/superlink/fleet/grpc_adapter/__init__.py +15 -0
  238. flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +162 -0
  239. flwr/server/superlink/fleet/grpc_bidi/__init__.py +1 -1
  240. flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +4 -2
  241. flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +3 -2
  242. flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +1 -1
  243. flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +5 -154
  244. flwr/server/superlink/fleet/grpc_rere/__init__.py +1 -1
  245. flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +120 -13
  246. flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +228 -0
  247. flwr/server/superlink/fleet/message_handler/__init__.py +1 -1
  248. flwr/server/superlink/fleet/message_handler/message_handler.py +153 -9
  249. flwr/server/superlink/fleet/rest_rere/__init__.py +1 -1
  250. flwr/server/superlink/fleet/rest_rere/rest_api.py +119 -81
  251. flwr/server/superlink/fleet/vce/__init__.py +1 -0
  252. flwr/server/superlink/fleet/vce/backend/__init__.py +4 -4
  253. flwr/server/superlink/fleet/vce/backend/backend.py +8 -9
  254. flwr/server/superlink/fleet/vce/backend/raybackend.py +87 -68
  255. flwr/server/superlink/fleet/vce/vce_api.py +208 -146
  256. flwr/server/superlink/linkstate/__init__.py +28 -0
  257. flwr/server/superlink/linkstate/in_memory_linkstate.py +581 -0
  258. flwr/server/superlink/linkstate/linkstate.py +389 -0
  259. flwr/server/superlink/{state/state_factory.py → linkstate/linkstate_factory.py} +19 -10
  260. flwr/server/superlink/linkstate/sqlite_linkstate.py +1236 -0
  261. flwr/server/superlink/linkstate/utils.py +389 -0
  262. flwr/server/superlink/simulation/__init__.py +15 -0
  263. flwr/server/superlink/simulation/simulationio_grpc.py +65 -0
  264. flwr/server/superlink/simulation/simulationio_servicer.py +186 -0
  265. flwr/server/superlink/utils.py +65 -0
  266. flwr/server/typing.py +2 -0
  267. flwr/server/utils/__init__.py +1 -1
  268. flwr/server/utils/tensorboard.py +5 -5
  269. flwr/server/utils/validator.py +31 -11
  270. flwr/server/workflow/default_workflows.py +70 -26
  271. flwr/server/workflow/secure_aggregation/secagg_workflow.py +1 -0
  272. flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +40 -27
  273. flwr/simulation/__init__.py +12 -5
  274. flwr/simulation/app.py +247 -315
  275. flwr/simulation/legacy_app.py +402 -0
  276. flwr/simulation/ray_transport/__init__.py +1 -1
  277. flwr/simulation/ray_transport/ray_actor.py +42 -67
  278. flwr/simulation/ray_transport/ray_client_proxy.py +37 -17
  279. flwr/simulation/ray_transport/utils.py +1 -0
  280. flwr/simulation/run_simulation.py +306 -163
  281. flwr/simulation/simulationio_connection.py +89 -0
  282. flwr/superexec/__init__.py +15 -0
  283. flwr/superexec/app.py +59 -0
  284. flwr/superexec/deployment.py +188 -0
  285. flwr/superexec/exec_grpc.py +80 -0
  286. flwr/superexec/exec_servicer.py +231 -0
  287. flwr/superexec/exec_user_auth_interceptor.py +101 -0
  288. flwr/superexec/executor.py +96 -0
  289. flwr/superexec/simulation.py +124 -0
  290. {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/METADATA +33 -26
  291. flwr_nightly-1.15.0.dev20250114.dist-info/RECORD +328 -0
  292. flwr_nightly-1.15.0.dev20250114.dist-info/entry_points.txt +12 -0
  293. flwr/cli/flower_toml.py +0 -140
  294. flwr/cli/new/templates/app/flower.toml.tpl +0 -13
  295. flwr/cli/new/templates/app/requirements.numpy.txt.tpl +0 -2
  296. flwr/cli/new/templates/app/requirements.pytorch.txt.tpl +0 -4
  297. flwr/cli/new/templates/app/requirements.tensorflow.txt.tpl +0 -4
  298. flwr/client/node_state.py +0 -48
  299. flwr/client/node_state_tests.py +0 -65
  300. flwr/proto/driver_pb2.py +0 -44
  301. flwr/proto/driver_pb2_grpc.py +0 -169
  302. flwr/proto/driver_pb2_grpc.pyi +0 -66
  303. flwr/server/superlink/driver/driver_grpc.py +0 -54
  304. flwr/server/superlink/driver/driver_servicer.py +0 -129
  305. flwr/server/superlink/state/in_memory_state.py +0 -230
  306. flwr/server/superlink/state/sqlite_state.py +0 -630
  307. flwr/server/superlink/state/state.py +0 -154
  308. flwr_nightly-1.8.0.dev20240315.dist-info/RECORD +0 -211
  309. flwr_nightly-1.8.0.dev20240315.dist-info/entry_points.txt +0 -9
  310. {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/LICENSE +0 -0
  311. {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/WHEEL +0 -0
flwr/proto/fleet_pb2.py CHANGED
@@ -14,9 +14,12 @@ _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 task_pb2 as flwr_dot_proto_dot_task__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
+ from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
17
20
 
18
21
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/fleet.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\"\x13\n\x11\x43reateNodeRequest\"4\n\x12\x43reateNodeResponse\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"3\n\x11\x44\x65leteNodeRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"\x14\n\x12\x44\x65leteNodeResponse\"F\n\x12PullTaskInsRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"k\n\x13PullTaskInsResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rtask_ins_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"@\n\x12PushTaskResRequest\x12*\n\rtask_res_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskRes\"\xae\x01\n\x13PushTaskResResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12=\n\x07results\x18\x02 \x03(\x0b\x32,.flwr.proto.PushTaskResResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x1e\n\tReconnect\x12\x11\n\treconnect\x18\x01 \x01(\x04\x32\xc9\x02\n\x05\x46leet\x12M\n\nCreateNode\x12\x1d.flwr.proto.CreateNodeRequest\x1a\x1e.flwr.proto.CreateNodeResponse\"\x00\x12M\n\nDeleteNode\x12\x1d.flwr.proto.DeleteNodeRequest\x1a\x1e.flwr.proto.DeleteNodeResponse\"\x00\x12P\n\x0bPullTaskIns\x12\x1e.flwr.proto.PullTaskInsRequest\x1a\x1f.flwr.proto.PullTaskInsResponse\"\x00\x12P\n\x0bPushTaskRes\x12\x1e.flwr.proto.PushTaskResRequest\x1a\x1f.flwr.proto.PushTaskResResponse\"\x00\x62\x06proto3')
22
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/fleet.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x18\x66lwr/proto/message.proto\"*\n\x11\x43reateNodeRequest\x12\x15\n\rping_interval\x18\x01 \x01(\x01\"4\n\x12\x43reateNodeResponse\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"3\n\x11\x44\x65leteNodeRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"\x14\n\x12\x44\x65leteNodeResponse\"D\n\x0bPingRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x15\n\rping_interval\x18\x02 \x01(\x01\"\x1f\n\x0cPingResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"F\n\x12PullTaskInsRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"k\n\x13PullTaskInsResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rtask_ins_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"`\n\x12PushTaskResRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rtask_res_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskRes\"\xae\x01\n\x13PushTaskResResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12=\n\x07results\x18\x02 \x03(\x0b\x32,.flwr.proto.PushTaskResResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"J\n\x13PullMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x13\n\x0bmessage_ids\x18\x02 \x03(\t\"l\n\x14PullMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"a\n\x13PushMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"\xb0\x01\n\x14PushMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12>\n\x07results\x18\x02 \x03(\x0b\x32-.flwr.proto.PushMessagesResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x1e\n\tReconnect\x12\x11\n\treconnect\x18\x01 \x01(\x04\x32\xb6\x05\n\x05\x46leet\x12M\n\nCreateNode\x12\x1d.flwr.proto.CreateNodeRequest\x1a\x1e.flwr.proto.CreateNodeResponse\"\x00\x12M\n\nDeleteNode\x12\x1d.flwr.proto.DeleteNodeRequest\x1a\x1e.flwr.proto.DeleteNodeResponse\"\x00\x12;\n\x04Ping\x12\x17.flwr.proto.PingRequest\x1a\x18.flwr.proto.PingResponse\"\x00\x12P\n\x0bPullTaskIns\x12\x1e.flwr.proto.PullTaskInsRequest\x1a\x1f.flwr.proto.PullTaskInsResponse\"\x00\x12S\n\x0cPullMessages\x12\x1f.flwr.proto.PullMessagesRequest\x1a .flwr.proto.PullMessagesResponse\"\x00\x12P\n\x0bPushTaskRes\x12\x1e.flwr.proto.PushTaskResRequest\x1a\x1f.flwr.proto.PushTaskResResponse\"\x00\x12S\n\x0cPushMessages\x12\x1f.flwr.proto.PushMessagesRequest\x1a .flwr.proto.PushMessagesResponse\"\x00\x12\x41\n\x06GetRun\x12\x19.flwr.proto.GetRunRequest\x1a\x1a.flwr.proto.GetRunResponse\"\x00\x12\x41\n\x06GetFab\x12\x19.flwr.proto.GetFabRequest\x1a\x1a.flwr.proto.GetFabResponse\"\x00\x62\x06proto3')
20
23
 
21
24
  _globals = globals()
22
25
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -25,26 +28,42 @@ if _descriptor._USE_C_DESCRIPTORS == False:
25
28
  DESCRIPTOR._options = None
26
29
  _globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._options = None
27
30
  _globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_options = b'8\001'
28
- _globals['_CREATENODEREQUEST']._serialized_start=84
29
- _globals['_CREATENODEREQUEST']._serialized_end=103
30
- _globals['_CREATENODERESPONSE']._serialized_start=105
31
- _globals['_CREATENODERESPONSE']._serialized_end=157
32
- _globals['_DELETENODEREQUEST']._serialized_start=159
33
- _globals['_DELETENODEREQUEST']._serialized_end=210
34
- _globals['_DELETENODERESPONSE']._serialized_start=212
35
- _globals['_DELETENODERESPONSE']._serialized_end=232
36
- _globals['_PULLTASKINSREQUEST']._serialized_start=234
37
- _globals['_PULLTASKINSREQUEST']._serialized_end=304
38
- _globals['_PULLTASKINSRESPONSE']._serialized_start=306
39
- _globals['_PULLTASKINSRESPONSE']._serialized_end=413
40
- _globals['_PUSHTASKRESREQUEST']._serialized_start=415
41
- _globals['_PUSHTASKRESREQUEST']._serialized_end=479
42
- _globals['_PUSHTASKRESRESPONSE']._serialized_start=482
43
- _globals['_PUSHTASKRESRESPONSE']._serialized_end=656
44
- _globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_start=610
45
- _globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_end=656
46
- _globals['_RECONNECT']._serialized_start=658
47
- _globals['_RECONNECT']._serialized_end=688
48
- _globals['_FLEET']._serialized_start=691
49
- _globals['_FLEET']._serialized_end=1020
31
+ _globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._options = None
32
+ _globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._serialized_options = b'8\001'
33
+ _globals['_CREATENODEREQUEST']._serialized_start=154
34
+ _globals['_CREATENODEREQUEST']._serialized_end=196
35
+ _globals['_CREATENODERESPONSE']._serialized_start=198
36
+ _globals['_CREATENODERESPONSE']._serialized_end=250
37
+ _globals['_DELETENODEREQUEST']._serialized_start=252
38
+ _globals['_DELETENODEREQUEST']._serialized_end=303
39
+ _globals['_DELETENODERESPONSE']._serialized_start=305
40
+ _globals['_DELETENODERESPONSE']._serialized_end=325
41
+ _globals['_PINGREQUEST']._serialized_start=327
42
+ _globals['_PINGREQUEST']._serialized_end=395
43
+ _globals['_PINGRESPONSE']._serialized_start=397
44
+ _globals['_PINGRESPONSE']._serialized_end=428
45
+ _globals['_PULLTASKINSREQUEST']._serialized_start=430
46
+ _globals['_PULLTASKINSREQUEST']._serialized_end=500
47
+ _globals['_PULLTASKINSRESPONSE']._serialized_start=502
48
+ _globals['_PULLTASKINSRESPONSE']._serialized_end=609
49
+ _globals['_PUSHTASKRESREQUEST']._serialized_start=611
50
+ _globals['_PUSHTASKRESREQUEST']._serialized_end=707
51
+ _globals['_PUSHTASKRESRESPONSE']._serialized_start=710
52
+ _globals['_PUSHTASKRESRESPONSE']._serialized_end=884
53
+ _globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_start=838
54
+ _globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_end=884
55
+ _globals['_PULLMESSAGESREQUEST']._serialized_start=886
56
+ _globals['_PULLMESSAGESREQUEST']._serialized_end=960
57
+ _globals['_PULLMESSAGESRESPONSE']._serialized_start=962
58
+ _globals['_PULLMESSAGESRESPONSE']._serialized_end=1070
59
+ _globals['_PUSHMESSAGESREQUEST']._serialized_start=1072
60
+ _globals['_PUSHMESSAGESREQUEST']._serialized_end=1169
61
+ _globals['_PUSHMESSAGESRESPONSE']._serialized_start=1172
62
+ _globals['_PUSHMESSAGESRESPONSE']._serialized_end=1348
63
+ _globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._serialized_start=838
64
+ _globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._serialized_end=884
65
+ _globals['_RECONNECT']._serialized_start=1350
66
+ _globals['_RECONNECT']._serialized_end=1380
67
+ _globals['_FLEET']._serialized_start=1383
68
+ _globals['_FLEET']._serialized_end=2077
50
69
  # @@protoc_insertion_point(module_scope)
flwr/proto/fleet_pb2.pyi CHANGED
@@ -3,6 +3,7 @@
3
3
  isort:skip_file
4
4
  """
5
5
  import builtins
6
+ import flwr.proto.message_pb2
6
7
  import flwr.proto.node_pb2
7
8
  import flwr.proto.task_pb2
8
9
  import google.protobuf.descriptor
@@ -16,8 +17,13 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
16
17
  class CreateNodeRequest(google.protobuf.message.Message):
17
18
  """CreateNode messages"""
18
19
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
20
+ PING_INTERVAL_FIELD_NUMBER: builtins.int
21
+ ping_interval: builtins.float
19
22
  def __init__(self,
23
+ *,
24
+ ping_interval: builtins.float = ...,
20
25
  ) -> None: ...
26
+ def ClearField(self, field_name: typing_extensions.Literal["ping_interval",b"ping_interval"]) -> None: ...
21
27
  global___CreateNodeRequest = CreateNodeRequest
22
28
 
23
29
  class CreateNodeResponse(google.protobuf.message.Message):
@@ -53,6 +59,34 @@ class DeleteNodeResponse(google.protobuf.message.Message):
53
59
  ) -> None: ...
54
60
  global___DeleteNodeResponse = DeleteNodeResponse
55
61
 
62
+ class PingRequest(google.protobuf.message.Message):
63
+ """Ping messages"""
64
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
65
+ NODE_FIELD_NUMBER: builtins.int
66
+ PING_INTERVAL_FIELD_NUMBER: builtins.int
67
+ @property
68
+ def node(self) -> flwr.proto.node_pb2.Node: ...
69
+ ping_interval: builtins.float
70
+ def __init__(self,
71
+ *,
72
+ node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
73
+ ping_interval: builtins.float = ...,
74
+ ) -> None: ...
75
+ def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
76
+ def ClearField(self, field_name: typing_extensions.Literal["node",b"node","ping_interval",b"ping_interval"]) -> None: ...
77
+ global___PingRequest = PingRequest
78
+
79
+ class PingResponse(google.protobuf.message.Message):
80
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
81
+ SUCCESS_FIELD_NUMBER: builtins.int
82
+ success: builtins.bool
83
+ def __init__(self,
84
+ *,
85
+ success: builtins.bool = ...,
86
+ ) -> None: ...
87
+ def ClearField(self, field_name: typing_extensions.Literal["success",b"success"]) -> None: ...
88
+ global___PingResponse = PingResponse
89
+
56
90
  class PullTaskInsRequest(google.protobuf.message.Message):
57
91
  """PullTaskIns messages"""
58
92
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -91,14 +125,19 @@ global___PullTaskInsResponse = PullTaskInsResponse
91
125
  class PushTaskResRequest(google.protobuf.message.Message):
92
126
  """PushTaskRes messages"""
93
127
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
128
+ NODE_FIELD_NUMBER: builtins.int
94
129
  TASK_RES_LIST_FIELD_NUMBER: builtins.int
95
130
  @property
131
+ def node(self) -> flwr.proto.node_pb2.Node: ...
132
+ @property
96
133
  def task_res_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.task_pb2.TaskRes]: ...
97
134
  def __init__(self,
98
135
  *,
136
+ node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
99
137
  task_res_list: typing.Optional[typing.Iterable[flwr.proto.task_pb2.TaskRes]] = ...,
100
138
  ) -> None: ...
101
- def ClearField(self, field_name: typing_extensions.Literal["task_res_list",b"task_res_list"]) -> None: ...
139
+ def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
140
+ def ClearField(self, field_name: typing_extensions.Literal["node",b"node","task_res_list",b"task_res_list"]) -> None: ...
102
141
  global___PushTaskResRequest = PushTaskResRequest
103
142
 
104
143
  class PushTaskResResponse(google.protobuf.message.Message):
@@ -131,6 +170,89 @@ class PushTaskResResponse(google.protobuf.message.Message):
131
170
  def ClearField(self, field_name: typing_extensions.Literal["reconnect",b"reconnect","results",b"results"]) -> None: ...
132
171
  global___PushTaskResResponse = PushTaskResResponse
133
172
 
173
+ class PullMessagesRequest(google.protobuf.message.Message):
174
+ """PullMessages messages"""
175
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
176
+ NODE_FIELD_NUMBER: builtins.int
177
+ MESSAGE_IDS_FIELD_NUMBER: builtins.int
178
+ @property
179
+ def node(self) -> flwr.proto.node_pb2.Node: ...
180
+ @property
181
+ def message_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
182
+ def __init__(self,
183
+ *,
184
+ node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
185
+ message_ids: typing.Optional[typing.Iterable[typing.Text]] = ...,
186
+ ) -> None: ...
187
+ def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
188
+ def ClearField(self, field_name: typing_extensions.Literal["message_ids",b"message_ids","node",b"node"]) -> None: ...
189
+ global___PullMessagesRequest = PullMessagesRequest
190
+
191
+ class PullMessagesResponse(google.protobuf.message.Message):
192
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
193
+ RECONNECT_FIELD_NUMBER: builtins.int
194
+ MESSAGES_LIST_FIELD_NUMBER: builtins.int
195
+ @property
196
+ def reconnect(self) -> global___Reconnect: ...
197
+ @property
198
+ def messages_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.Message]: ...
199
+ def __init__(self,
200
+ *,
201
+ reconnect: typing.Optional[global___Reconnect] = ...,
202
+ messages_list: typing.Optional[typing.Iterable[flwr.proto.message_pb2.Message]] = ...,
203
+ ) -> None: ...
204
+ def HasField(self, field_name: typing_extensions.Literal["reconnect",b"reconnect"]) -> builtins.bool: ...
205
+ def ClearField(self, field_name: typing_extensions.Literal["messages_list",b"messages_list","reconnect",b"reconnect"]) -> None: ...
206
+ global___PullMessagesResponse = PullMessagesResponse
207
+
208
+ class PushMessagesRequest(google.protobuf.message.Message):
209
+ """PushMessages messages"""
210
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
211
+ NODE_FIELD_NUMBER: builtins.int
212
+ MESSAGES_LIST_FIELD_NUMBER: builtins.int
213
+ @property
214
+ def node(self) -> flwr.proto.node_pb2.Node: ...
215
+ @property
216
+ def messages_list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[flwr.proto.message_pb2.Message]: ...
217
+ def __init__(self,
218
+ *,
219
+ node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
220
+ messages_list: typing.Optional[typing.Iterable[flwr.proto.message_pb2.Message]] = ...,
221
+ ) -> None: ...
222
+ def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
223
+ def ClearField(self, field_name: typing_extensions.Literal["messages_list",b"messages_list","node",b"node"]) -> None: ...
224
+ global___PushMessagesRequest = PushMessagesRequest
225
+
226
+ class PushMessagesResponse(google.protobuf.message.Message):
227
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
228
+ class ResultsEntry(google.protobuf.message.Message):
229
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
230
+ KEY_FIELD_NUMBER: builtins.int
231
+ VALUE_FIELD_NUMBER: builtins.int
232
+ key: typing.Text
233
+ value: builtins.int
234
+ def __init__(self,
235
+ *,
236
+ key: typing.Text = ...,
237
+ value: builtins.int = ...,
238
+ ) -> None: ...
239
+ def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
240
+
241
+ RECONNECT_FIELD_NUMBER: builtins.int
242
+ RESULTS_FIELD_NUMBER: builtins.int
243
+ @property
244
+ def reconnect(self) -> global___Reconnect: ...
245
+ @property
246
+ def results(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, builtins.int]: ...
247
+ def __init__(self,
248
+ *,
249
+ reconnect: typing.Optional[global___Reconnect] = ...,
250
+ results: typing.Optional[typing.Mapping[typing.Text, builtins.int]] = ...,
251
+ ) -> None: ...
252
+ def HasField(self, field_name: typing_extensions.Literal["reconnect",b"reconnect"]) -> builtins.bool: ...
253
+ def ClearField(self, field_name: typing_extensions.Literal["reconnect",b"reconnect","results",b"results"]) -> None: ...
254
+ global___PushMessagesResponse = PushMessagesResponse
255
+
134
256
  class Reconnect(google.protobuf.message.Message):
135
257
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
136
258
  RECONNECT_FIELD_NUMBER: builtins.int
@@ -2,7 +2,9 @@
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
4
 
5
+ from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
5
6
  from flwr.proto import fleet_pb2 as flwr_dot_proto_dot_fleet__pb2
7
+ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
6
8
 
7
9
 
8
10
  class FleetStub(object):
@@ -24,16 +26,41 @@ class FleetStub(object):
24
26
  request_serializer=flwr_dot_proto_dot_fleet__pb2.DeleteNodeRequest.SerializeToString,
25
27
  response_deserializer=flwr_dot_proto_dot_fleet__pb2.DeleteNodeResponse.FromString,
26
28
  )
29
+ self.Ping = channel.unary_unary(
30
+ '/flwr.proto.Fleet/Ping',
31
+ request_serializer=flwr_dot_proto_dot_fleet__pb2.PingRequest.SerializeToString,
32
+ response_deserializer=flwr_dot_proto_dot_fleet__pb2.PingResponse.FromString,
33
+ )
27
34
  self.PullTaskIns = channel.unary_unary(
28
35
  '/flwr.proto.Fleet/PullTaskIns',
29
36
  request_serializer=flwr_dot_proto_dot_fleet__pb2.PullTaskInsRequest.SerializeToString,
30
37
  response_deserializer=flwr_dot_proto_dot_fleet__pb2.PullTaskInsResponse.FromString,
31
38
  )
39
+ self.PullMessages = channel.unary_unary(
40
+ '/flwr.proto.Fleet/PullMessages',
41
+ request_serializer=flwr_dot_proto_dot_fleet__pb2.PullMessagesRequest.SerializeToString,
42
+ response_deserializer=flwr_dot_proto_dot_fleet__pb2.PullMessagesResponse.FromString,
43
+ )
32
44
  self.PushTaskRes = channel.unary_unary(
33
45
  '/flwr.proto.Fleet/PushTaskRes',
34
46
  request_serializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResRequest.SerializeToString,
35
47
  response_deserializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResResponse.FromString,
36
48
  )
49
+ self.PushMessages = channel.unary_unary(
50
+ '/flwr.proto.Fleet/PushMessages',
51
+ request_serializer=flwr_dot_proto_dot_fleet__pb2.PushMessagesRequest.SerializeToString,
52
+ response_deserializer=flwr_dot_proto_dot_fleet__pb2.PushMessagesResponse.FromString,
53
+ )
54
+ self.GetRun = channel.unary_unary(
55
+ '/flwr.proto.Fleet/GetRun',
56
+ request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
57
+ response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
58
+ )
59
+ self.GetFab = channel.unary_unary(
60
+ '/flwr.proto.Fleet/GetFab',
61
+ request_serializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
62
+ response_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
63
+ )
37
64
 
38
65
 
39
66
  class FleetServicer(object):
@@ -51,6 +78,12 @@ class FleetServicer(object):
51
78
  context.set_details('Method not implemented!')
52
79
  raise NotImplementedError('Method not implemented!')
53
80
 
81
+ def Ping(self, request, context):
82
+ """Missing associated documentation comment in .proto file."""
83
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
84
+ context.set_details('Method not implemented!')
85
+ raise NotImplementedError('Method not implemented!')
86
+
54
87
  def PullTaskIns(self, request, context):
55
88
  """Retrieve one or more tasks, if possible
56
89
 
@@ -60,6 +93,13 @@ class FleetServicer(object):
60
93
  context.set_details('Method not implemented!')
61
94
  raise NotImplementedError('Method not implemented!')
62
95
 
96
+ def PullMessages(self, request, context):
97
+ """HTTP API path: /api/v1/fleet/pull-messages
98
+ """
99
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
100
+ context.set_details('Method not implemented!')
101
+ raise NotImplementedError('Method not implemented!')
102
+
63
103
  def PushTaskRes(self, request, context):
64
104
  """Complete one or more tasks, if possible
65
105
 
@@ -69,6 +109,26 @@ class FleetServicer(object):
69
109
  context.set_details('Method not implemented!')
70
110
  raise NotImplementedError('Method not implemented!')
71
111
 
112
+ def PushMessages(self, request, context):
113
+ """HTTP API path: /api/v1/fleet/push-messages
114
+ """
115
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
116
+ context.set_details('Method not implemented!')
117
+ raise NotImplementedError('Method not implemented!')
118
+
119
+ def GetRun(self, request, context):
120
+ """Missing associated documentation comment in .proto file."""
121
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
122
+ context.set_details('Method not implemented!')
123
+ raise NotImplementedError('Method not implemented!')
124
+
125
+ def GetFab(self, request, context):
126
+ """Get FAB
127
+ """
128
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
129
+ context.set_details('Method not implemented!')
130
+ raise NotImplementedError('Method not implemented!')
131
+
72
132
 
73
133
  def add_FleetServicer_to_server(servicer, server):
74
134
  rpc_method_handlers = {
@@ -82,16 +142,41 @@ def add_FleetServicer_to_server(servicer, server):
82
142
  request_deserializer=flwr_dot_proto_dot_fleet__pb2.DeleteNodeRequest.FromString,
83
143
  response_serializer=flwr_dot_proto_dot_fleet__pb2.DeleteNodeResponse.SerializeToString,
84
144
  ),
145
+ 'Ping': grpc.unary_unary_rpc_method_handler(
146
+ servicer.Ping,
147
+ request_deserializer=flwr_dot_proto_dot_fleet__pb2.PingRequest.FromString,
148
+ response_serializer=flwr_dot_proto_dot_fleet__pb2.PingResponse.SerializeToString,
149
+ ),
85
150
  'PullTaskIns': grpc.unary_unary_rpc_method_handler(
86
151
  servicer.PullTaskIns,
87
152
  request_deserializer=flwr_dot_proto_dot_fleet__pb2.PullTaskInsRequest.FromString,
88
153
  response_serializer=flwr_dot_proto_dot_fleet__pb2.PullTaskInsResponse.SerializeToString,
89
154
  ),
155
+ 'PullMessages': grpc.unary_unary_rpc_method_handler(
156
+ servicer.PullMessages,
157
+ request_deserializer=flwr_dot_proto_dot_fleet__pb2.PullMessagesRequest.FromString,
158
+ response_serializer=flwr_dot_proto_dot_fleet__pb2.PullMessagesResponse.SerializeToString,
159
+ ),
90
160
  'PushTaskRes': grpc.unary_unary_rpc_method_handler(
91
161
  servicer.PushTaskRes,
92
162
  request_deserializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResRequest.FromString,
93
163
  response_serializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResResponse.SerializeToString,
94
164
  ),
165
+ 'PushMessages': grpc.unary_unary_rpc_method_handler(
166
+ servicer.PushMessages,
167
+ request_deserializer=flwr_dot_proto_dot_fleet__pb2.PushMessagesRequest.FromString,
168
+ response_serializer=flwr_dot_proto_dot_fleet__pb2.PushMessagesResponse.SerializeToString,
169
+ ),
170
+ 'GetRun': grpc.unary_unary_rpc_method_handler(
171
+ servicer.GetRun,
172
+ request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.FromString,
173
+ response_serializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.SerializeToString,
174
+ ),
175
+ 'GetFab': grpc.unary_unary_rpc_method_handler(
176
+ servicer.GetFab,
177
+ request_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.FromString,
178
+ response_serializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.SerializeToString,
179
+ ),
95
180
  }
96
181
  generic_handler = grpc.method_handlers_generic_handler(
97
182
  'flwr.proto.Fleet', rpc_method_handlers)
@@ -136,6 +221,23 @@ class Fleet(object):
136
221
  options, channel_credentials,
137
222
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
138
223
 
224
+ @staticmethod
225
+ def Ping(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.Fleet/Ping',
236
+ flwr_dot_proto_dot_fleet__pb2.PingRequest.SerializeToString,
237
+ flwr_dot_proto_dot_fleet__pb2.PingResponse.FromString,
238
+ options, channel_credentials,
239
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
240
+
139
241
  @staticmethod
140
242
  def PullTaskIns(request,
141
243
  target,
@@ -153,6 +255,23 @@ class Fleet(object):
153
255
  options, channel_credentials,
154
256
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
155
257
 
258
+ @staticmethod
259
+ def PullMessages(request,
260
+ target,
261
+ options=(),
262
+ channel_credentials=None,
263
+ call_credentials=None,
264
+ insecure=False,
265
+ compression=None,
266
+ wait_for_ready=None,
267
+ timeout=None,
268
+ metadata=None):
269
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/PullMessages',
270
+ flwr_dot_proto_dot_fleet__pb2.PullMessagesRequest.SerializeToString,
271
+ flwr_dot_proto_dot_fleet__pb2.PullMessagesResponse.FromString,
272
+ options, channel_credentials,
273
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
274
+
156
275
  @staticmethod
157
276
  def PushTaskRes(request,
158
277
  target,
@@ -169,3 +288,54 @@ class Fleet(object):
169
288
  flwr_dot_proto_dot_fleet__pb2.PushTaskResResponse.FromString,
170
289
  options, channel_credentials,
171
290
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
291
+
292
+ @staticmethod
293
+ def PushMessages(request,
294
+ target,
295
+ options=(),
296
+ channel_credentials=None,
297
+ call_credentials=None,
298
+ insecure=False,
299
+ compression=None,
300
+ wait_for_ready=None,
301
+ timeout=None,
302
+ metadata=None):
303
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/PushMessages',
304
+ flwr_dot_proto_dot_fleet__pb2.PushMessagesRequest.SerializeToString,
305
+ flwr_dot_proto_dot_fleet__pb2.PushMessagesResponse.FromString,
306
+ options, channel_credentials,
307
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
308
+
309
+ @staticmethod
310
+ def GetRun(request,
311
+ target,
312
+ options=(),
313
+ channel_credentials=None,
314
+ call_credentials=None,
315
+ insecure=False,
316
+ compression=None,
317
+ wait_for_ready=None,
318
+ timeout=None,
319
+ metadata=None):
320
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/GetRun',
321
+ flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
322
+ flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
323
+ options, channel_credentials,
324
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
325
+
326
+ @staticmethod
327
+ def GetFab(request,
328
+ target,
329
+ options=(),
330
+ channel_credentials=None,
331
+ call_credentials=None,
332
+ insecure=False,
333
+ compression=None,
334
+ wait_for_ready=None,
335
+ timeout=None,
336
+ metadata=None):
337
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/GetFab',
338
+ flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
339
+ flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
340
+ options, channel_credentials,
341
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -3,7 +3,9 @@
3
3
  isort:skip_file
4
4
  """
5
5
  import abc
6
+ import flwr.proto.fab_pb2
6
7
  import flwr.proto.fleet_pb2
8
+ import flwr.proto.run_pb2
7
9
  import grpc
8
10
 
9
11
  class FleetStub:
@@ -16,6 +18,10 @@ class FleetStub:
16
18
  flwr.proto.fleet_pb2.DeleteNodeRequest,
17
19
  flwr.proto.fleet_pb2.DeleteNodeResponse]
18
20
 
21
+ Ping: grpc.UnaryUnaryMultiCallable[
22
+ flwr.proto.fleet_pb2.PingRequest,
23
+ flwr.proto.fleet_pb2.PingResponse]
24
+
19
25
  PullTaskIns: grpc.UnaryUnaryMultiCallable[
20
26
  flwr.proto.fleet_pb2.PullTaskInsRequest,
21
27
  flwr.proto.fleet_pb2.PullTaskInsResponse]
@@ -24,6 +30,11 @@ class FleetStub:
24
30
  HTTP API path: /api/v1/fleet/pull-task-ins
25
31
  """
26
32
 
33
+ PullMessages: grpc.UnaryUnaryMultiCallable[
34
+ flwr.proto.fleet_pb2.PullMessagesRequest,
35
+ flwr.proto.fleet_pb2.PullMessagesResponse]
36
+ """HTTP API path: /api/v1/fleet/pull-messages"""
37
+
27
38
  PushTaskRes: grpc.UnaryUnaryMultiCallable[
28
39
  flwr.proto.fleet_pb2.PushTaskResRequest,
29
40
  flwr.proto.fleet_pb2.PushTaskResResponse]
@@ -32,6 +43,20 @@ class FleetStub:
32
43
  HTTP API path: /api/v1/fleet/push-task-res
33
44
  """
34
45
 
46
+ PushMessages: grpc.UnaryUnaryMultiCallable[
47
+ flwr.proto.fleet_pb2.PushMessagesRequest,
48
+ flwr.proto.fleet_pb2.PushMessagesResponse]
49
+ """HTTP API path: /api/v1/fleet/push-messages"""
50
+
51
+ GetRun: grpc.UnaryUnaryMultiCallable[
52
+ flwr.proto.run_pb2.GetRunRequest,
53
+ flwr.proto.run_pb2.GetRunResponse]
54
+
55
+ GetFab: grpc.UnaryUnaryMultiCallable[
56
+ flwr.proto.fab_pb2.GetFabRequest,
57
+ flwr.proto.fab_pb2.GetFabResponse]
58
+ """Get FAB"""
59
+
35
60
 
36
61
  class FleetServicer(metaclass=abc.ABCMeta):
37
62
  @abc.abstractmethod
@@ -46,6 +71,12 @@ class FleetServicer(metaclass=abc.ABCMeta):
46
71
  context: grpc.ServicerContext,
47
72
  ) -> flwr.proto.fleet_pb2.DeleteNodeResponse: ...
48
73
 
74
+ @abc.abstractmethod
75
+ def Ping(self,
76
+ request: flwr.proto.fleet_pb2.PingRequest,
77
+ context: grpc.ServicerContext,
78
+ ) -> flwr.proto.fleet_pb2.PingResponse: ...
79
+
49
80
  @abc.abstractmethod
50
81
  def PullTaskIns(self,
51
82
  request: flwr.proto.fleet_pb2.PullTaskInsRequest,
@@ -57,6 +88,14 @@ class FleetServicer(metaclass=abc.ABCMeta):
57
88
  """
58
89
  pass
59
90
 
91
+ @abc.abstractmethod
92
+ def PullMessages(self,
93
+ request: flwr.proto.fleet_pb2.PullMessagesRequest,
94
+ context: grpc.ServicerContext,
95
+ ) -> flwr.proto.fleet_pb2.PullMessagesResponse:
96
+ """HTTP API path: /api/v1/fleet/pull-messages"""
97
+ pass
98
+
60
99
  @abc.abstractmethod
61
100
  def PushTaskRes(self,
62
101
  request: flwr.proto.fleet_pb2.PushTaskResRequest,
@@ -68,5 +107,27 @@ class FleetServicer(metaclass=abc.ABCMeta):
68
107
  """
69
108
  pass
70
109
 
110
+ @abc.abstractmethod
111
+ def PushMessages(self,
112
+ request: flwr.proto.fleet_pb2.PushMessagesRequest,
113
+ context: grpc.ServicerContext,
114
+ ) -> flwr.proto.fleet_pb2.PushMessagesResponse:
115
+ """HTTP API path: /api/v1/fleet/push-messages"""
116
+ pass
117
+
118
+ @abc.abstractmethod
119
+ def GetRun(self,
120
+ request: flwr.proto.run_pb2.GetRunRequest,
121
+ context: grpc.ServicerContext,
122
+ ) -> flwr.proto.run_pb2.GetRunResponse: ...
123
+
124
+ @abc.abstractmethod
125
+ def GetFab(self,
126
+ request: flwr.proto.fab_pb2.GetFabRequest,
127
+ context: grpc.ServicerContext,
128
+ ) -> flwr.proto.fab_pb2.GetFabResponse:
129
+ """Get FAB"""
130
+ pass
131
+
71
132
 
72
133
  def add_FleetServicer_to_server(servicer: FleetServicer, server: grpc.Server) -> None: ...
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: flwr/proto/grpcadapter.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
+
16
+
17
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/grpcadapter.proto\x12\nflwr.proto\"\xba\x01\n\x10MessageContainer\x12<\n\x08metadata\x18\x01 \x03(\x0b\x32*.flwr.proto.MessageContainer.MetadataEntry\x12\x19\n\x11grpc_message_name\x18\x02 \x01(\t\x12\x1c\n\x14grpc_message_content\x18\x03 \x01(\x0c\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32Z\n\x0bGrpcAdapter\x12K\n\x0bSendReceive\x12\x1c.flwr.proto.MessageContainer\x1a\x1c.flwr.proto.MessageContainer\"\x00\x62\x06proto3')
18
+
19
+ _globals = globals()
20
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.grpcadapter_pb2', _globals)
22
+ if _descriptor._USE_C_DESCRIPTORS == False:
23
+ DESCRIPTOR._options = None
24
+ _globals['_MESSAGECONTAINER_METADATAENTRY']._options = None
25
+ _globals['_MESSAGECONTAINER_METADATAENTRY']._serialized_options = b'8\001'
26
+ _globals['_MESSAGECONTAINER']._serialized_start=45
27
+ _globals['_MESSAGECONTAINER']._serialized_end=231
28
+ _globals['_MESSAGECONTAINER_METADATAENTRY']._serialized_start=184
29
+ _globals['_MESSAGECONTAINER_METADATAENTRY']._serialized_end=231
30
+ _globals['_GRPCADAPTER']._serialized_start=233
31
+ _globals['_GRPCADAPTER']._serialized_end=323
32
+ # @@protoc_insertion_point(module_scope)