flwr 1.22.0__py3-none-any.whl → 1.24.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. flwr/__init__.py +16 -5
  2. flwr/app/error.py +2 -2
  3. flwr/app/exception.py +3 -3
  4. flwr/cli/app.py +34 -1
  5. flwr/cli/app_cmd/__init__.py +23 -0
  6. flwr/cli/app_cmd/publish.py +285 -0
  7. flwr/cli/app_cmd/review.py +252 -0
  8. flwr/cli/auth_plugin/__init__.py +15 -6
  9. flwr/cli/auth_plugin/auth_plugin.py +94 -0
  10. flwr/cli/auth_plugin/noop_auth_plugin.py +101 -0
  11. flwr/cli/auth_plugin/oidc_cli_plugin.py +46 -32
  12. flwr/cli/build.py +166 -53
  13. flwr/cli/{cli_user_auth_interceptor.py → cli_account_auth_interceptor.py} +29 -11
  14. flwr/cli/config_utils.py +101 -13
  15. flwr/cli/federation/__init__.py +24 -0
  16. flwr/cli/federation/ls.py +140 -0
  17. flwr/cli/federation/show.py +317 -0
  18. flwr/cli/install.py +91 -13
  19. flwr/cli/log.py +54 -11
  20. flwr/cli/login/login.py +41 -27
  21. flwr/cli/ls.py +177 -133
  22. flwr/cli/new/new.py +175 -40
  23. flwr/cli/new/templates/app/code/task.pytorch.py.tpl +1 -0
  24. flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +1 -1
  25. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +1 -1
  26. flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +1 -1
  27. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
  28. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +1 -1
  29. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
  30. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +3 -3
  31. flwr/cli/new/templates/app/pyproject.pytorch_legacy_api.toml.tpl +1 -1
  32. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
  33. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +2 -2
  34. flwr/cli/new/templates/app/pyproject.xgboost.toml.tpl +1 -1
  35. flwr/cli/pull.py +12 -7
  36. flwr/cli/run/run.py +82 -31
  37. flwr/cli/run_utils.py +130 -0
  38. flwr/cli/stop.py +27 -9
  39. flwr/cli/supernode/__init__.py +25 -0
  40. flwr/cli/supernode/ls.py +268 -0
  41. flwr/cli/supernode/register.py +190 -0
  42. flwr/cli/supernode/unregister.py +140 -0
  43. flwr/cli/utils.py +464 -81
  44. flwr/client/__init__.py +2 -1
  45. flwr/client/dpfedavg_numpy_client.py +4 -1
  46. flwr/client/grpc_adapter_client/connection.py +12 -15
  47. flwr/client/grpc_rere_client/connection.py +68 -41
  48. flwr/client/grpc_rere_client/grpc_adapter.py +34 -14
  49. flwr/client/grpc_rere_client/{client_interceptor.py → node_auth_client_interceptor.py} +5 -7
  50. flwr/client/message_handler/message_handler.py +2 -2
  51. flwr/client/mod/secure_aggregation/secaggplus_mod.py +10 -8
  52. flwr/client/numpy_client.py +1 -1
  53. flwr/client/rest_client/connection.py +94 -51
  54. flwr/client/run_info_store.py +4 -5
  55. flwr/client/typing.py +1 -1
  56. flwr/clientapp/__init__.py +1 -2
  57. flwr/{client → clientapp}/client_app.py +9 -10
  58. flwr/clientapp/mod/centraldp_mods.py +16 -17
  59. flwr/clientapp/mod/localdp_mod.py +8 -9
  60. flwr/clientapp/typing.py +1 -1
  61. flwr/{client/clientapp → clientapp}/utils.py +4 -4
  62. flwr/common/address.py +1 -2
  63. flwr/common/args.py +3 -4
  64. flwr/common/config.py +13 -16
  65. flwr/common/constant.py +56 -13
  66. flwr/common/differential_privacy.py +3 -4
  67. flwr/common/event_log_plugin/event_log_plugin.py +3 -4
  68. flwr/common/exit/exit.py +15 -2
  69. flwr/common/exit/exit_code.py +39 -10
  70. flwr/common/exit/exit_handler.py +6 -2
  71. flwr/common/exit/signal_handler.py +5 -5
  72. flwr/common/grpc.py +6 -6
  73. flwr/common/inflatable_protobuf_utils.py +1 -1
  74. flwr/common/inflatable_utils.py +48 -31
  75. flwr/common/logger.py +19 -19
  76. flwr/common/message.py +4 -4
  77. flwr/common/object_ref.py +7 -7
  78. flwr/common/record/array.py +6 -6
  79. flwr/common/record/arrayrecord.py +18 -21
  80. flwr/common/record/configrecord.py +3 -3
  81. flwr/common/record/recorddict.py +5 -5
  82. flwr/common/record/typeddict.py +9 -2
  83. flwr/common/recorddict_compat.py +7 -10
  84. flwr/common/retry_invoker.py +20 -20
  85. flwr/common/secure_aggregation/crypto/symmetric_encryption.py +1 -89
  86. flwr/common/secure_aggregation/ndarrays_arithmetic.py +3 -3
  87. flwr/common/serde.py +9 -6
  88. flwr/common/serde_utils.py +2 -2
  89. flwr/common/telemetry.py +9 -5
  90. flwr/common/typing.py +59 -43
  91. flwr/compat/client/app.py +39 -38
  92. flwr/compat/client/grpc_client/connection.py +13 -13
  93. flwr/compat/server/app.py +5 -6
  94. flwr/proto/appio_pb2.py +13 -3
  95. flwr/proto/appio_pb2.pyi +134 -65
  96. flwr/proto/appio_pb2_grpc.py +20 -0
  97. flwr/proto/appio_pb2_grpc.pyi +27 -0
  98. flwr/proto/clientappio_pb2.py +17 -7
  99. flwr/proto/clientappio_pb2.pyi +15 -0
  100. flwr/proto/clientappio_pb2_grpc.py +206 -40
  101. flwr/proto/clientappio_pb2_grpc.pyi +168 -53
  102. flwr/proto/control_pb2.py +72 -40
  103. flwr/proto/control_pb2.pyi +319 -87
  104. flwr/proto/control_pb2_grpc.py +339 -28
  105. flwr/proto/control_pb2_grpc.pyi +209 -37
  106. flwr/proto/error_pb2.py +13 -3
  107. flwr/proto/error_pb2.pyi +24 -6
  108. flwr/proto/error_pb2_grpc.py +20 -0
  109. flwr/proto/error_pb2_grpc.pyi +27 -0
  110. flwr/proto/fab_pb2.py +24 -10
  111. flwr/proto/fab_pb2.pyi +68 -20
  112. flwr/proto/fab_pb2_grpc.py +20 -0
  113. flwr/proto/fab_pb2_grpc.pyi +27 -0
  114. flwr/proto/federation_pb2.py +38 -0
  115. flwr/proto/federation_pb2.pyi +56 -0
  116. flwr/proto/federation_pb2_grpc.py +24 -0
  117. flwr/proto/federation_pb2_grpc.pyi +31 -0
  118. flwr/proto/fleet_pb2.py +45 -27
  119. flwr/proto/fleet_pb2.pyi +186 -70
  120. flwr/proto/fleet_pb2_grpc.py +277 -66
  121. flwr/proto/fleet_pb2_grpc.pyi +201 -55
  122. flwr/proto/grpcadapter_pb2.py +14 -4
  123. flwr/proto/grpcadapter_pb2.pyi +38 -16
  124. flwr/proto/grpcadapter_pb2_grpc.py +35 -4
  125. flwr/proto/grpcadapter_pb2_grpc.pyi +38 -7
  126. flwr/proto/heartbeat_pb2.py +17 -7
  127. flwr/proto/heartbeat_pb2.pyi +51 -22
  128. flwr/proto/heartbeat_pb2_grpc.py +20 -0
  129. flwr/proto/heartbeat_pb2_grpc.pyi +27 -0
  130. flwr/proto/log_pb2.py +13 -3
  131. flwr/proto/log_pb2.pyi +34 -11
  132. flwr/proto/log_pb2_grpc.py +20 -0
  133. flwr/proto/log_pb2_grpc.pyi +27 -0
  134. flwr/proto/message_pb2.py +15 -5
  135. flwr/proto/message_pb2.pyi +154 -86
  136. flwr/proto/message_pb2_grpc.py +20 -0
  137. flwr/proto/message_pb2_grpc.pyi +27 -0
  138. flwr/proto/node_pb2.py +16 -4
  139. flwr/proto/node_pb2.pyi +77 -4
  140. flwr/proto/node_pb2_grpc.py +20 -0
  141. flwr/proto/node_pb2_grpc.pyi +27 -0
  142. flwr/proto/recorddict_pb2.py +13 -3
  143. flwr/proto/recorddict_pb2.pyi +184 -107
  144. flwr/proto/recorddict_pb2_grpc.py +20 -0
  145. flwr/proto/recorddict_pb2_grpc.pyi +27 -0
  146. flwr/proto/run_pb2.py +40 -31
  147. flwr/proto/run_pb2.pyi +149 -84
  148. flwr/proto/run_pb2_grpc.py +20 -0
  149. flwr/proto/run_pb2_grpc.pyi +27 -0
  150. flwr/proto/serverappio_pb2.py +13 -3
  151. flwr/proto/serverappio_pb2.pyi +32 -8
  152. flwr/proto/serverappio_pb2_grpc.py +246 -65
  153. flwr/proto/serverappio_pb2_grpc.pyi +221 -85
  154. flwr/proto/simulationio_pb2.py +16 -8
  155. flwr/proto/simulationio_pb2.pyi +15 -0
  156. flwr/proto/simulationio_pb2_grpc.py +162 -41
  157. flwr/proto/simulationio_pb2_grpc.pyi +149 -55
  158. flwr/proto/transport_pb2.py +20 -10
  159. flwr/proto/transport_pb2.pyi +249 -160
  160. flwr/proto/transport_pb2_grpc.py +35 -4
  161. flwr/proto/transport_pb2_grpc.pyi +38 -8
  162. flwr/server/app.py +173 -127
  163. flwr/server/client_manager.py +4 -5
  164. flwr/server/client_proxy.py +10 -11
  165. flwr/server/compat/app.py +4 -5
  166. flwr/server/compat/app_utils.py +2 -1
  167. flwr/server/compat/grid_client_proxy.py +10 -12
  168. flwr/server/compat/legacy_context.py +3 -4
  169. flwr/server/fleet_event_log_interceptor.py +2 -1
  170. flwr/server/grid/grid.py +2 -3
  171. flwr/server/grid/grpc_grid.py +10 -8
  172. flwr/server/grid/inmemory_grid.py +4 -4
  173. flwr/server/run_serverapp.py +2 -3
  174. flwr/server/server.py +34 -39
  175. flwr/server/server_app.py +7 -8
  176. flwr/server/server_config.py +1 -2
  177. flwr/server/serverapp/app.py +34 -28
  178. flwr/server/serverapp_components.py +4 -5
  179. flwr/server/strategy/aggregate.py +9 -8
  180. flwr/server/strategy/bulyan.py +13 -11
  181. flwr/server/strategy/dp_adaptive_clipping.py +16 -20
  182. flwr/server/strategy/dp_fixed_clipping.py +12 -17
  183. flwr/server/strategy/dpfedavg_adaptive.py +3 -4
  184. flwr/server/strategy/dpfedavg_fixed.py +6 -10
  185. flwr/server/strategy/fault_tolerant_fedavg.py +14 -13
  186. flwr/server/strategy/fedadagrad.py +18 -14
  187. flwr/server/strategy/fedadam.py +16 -14
  188. flwr/server/strategy/fedavg.py +16 -17
  189. flwr/server/strategy/fedavg_android.py +15 -15
  190. flwr/server/strategy/fedavgm.py +21 -18
  191. flwr/server/strategy/fedmedian.py +2 -3
  192. flwr/server/strategy/fedopt.py +11 -10
  193. flwr/server/strategy/fedprox.py +10 -9
  194. flwr/server/strategy/fedtrimmedavg.py +12 -11
  195. flwr/server/strategy/fedxgb_bagging.py +13 -11
  196. flwr/server/strategy/fedxgb_cyclic.py +6 -6
  197. flwr/server/strategy/fedxgb_nn_avg.py +4 -4
  198. flwr/server/strategy/fedyogi.py +16 -14
  199. flwr/server/strategy/krum.py +12 -11
  200. flwr/server/strategy/qfedavg.py +16 -15
  201. flwr/server/strategy/strategy.py +6 -9
  202. flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +19 -8
  203. flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +1 -2
  204. flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +3 -4
  205. flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +10 -12
  206. flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +1 -3
  207. flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +136 -42
  208. flwr/server/superlink/fleet/grpc_rere/{server_interceptor.py → node_auth_server_interceptor.py} +28 -51
  209. flwr/server/superlink/fleet/message_handler/message_handler.py +100 -49
  210. flwr/server/superlink/fleet/rest_rere/rest_api.py +54 -33
  211. flwr/server/superlink/fleet/vce/backend/backend.py +2 -2
  212. flwr/server/superlink/fleet/vce/backend/raybackend.py +6 -6
  213. flwr/server/superlink/fleet/vce/vce_api.py +32 -13
  214. flwr/server/superlink/linkstate/in_memory_linkstate.py +266 -207
  215. flwr/server/superlink/linkstate/linkstate.py +161 -62
  216. flwr/server/superlink/linkstate/linkstate_factory.py +24 -6
  217. flwr/server/superlink/linkstate/sqlite_linkstate.py +698 -638
  218. flwr/server/superlink/linkstate/utils.py +9 -60
  219. flwr/server/superlink/serverappio/serverappio_grpc.py +1 -2
  220. flwr/server/superlink/serverappio/serverappio_servicer.py +28 -23
  221. flwr/server/superlink/simulation/simulationio_grpc.py +1 -2
  222. flwr/server/superlink/simulation/simulationio_servicer.py +19 -14
  223. flwr/server/superlink/utils.py +4 -6
  224. flwr/server/typing.py +1 -1
  225. flwr/server/utils/tensorboard.py +15 -8
  226. flwr/server/utils/validator.py +2 -3
  227. flwr/server/workflow/default_workflows.py +5 -5
  228. flwr/server/workflow/secure_aggregation/secagg_workflow.py +2 -4
  229. flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +12 -10
  230. flwr/serverapp/strategy/bulyan.py +16 -15
  231. flwr/serverapp/strategy/dp_adaptive_clipping.py +12 -11
  232. flwr/serverapp/strategy/dp_fixed_clipping.py +11 -14
  233. flwr/serverapp/strategy/fedadagrad.py +10 -11
  234. flwr/serverapp/strategy/fedadam.py +10 -11
  235. flwr/serverapp/strategy/fedavg.py +9 -10
  236. flwr/serverapp/strategy/fedavgm.py +17 -16
  237. flwr/serverapp/strategy/fedmedian.py +2 -2
  238. flwr/serverapp/strategy/fedopt.py +10 -11
  239. flwr/serverapp/strategy/fedprox.py +7 -8
  240. flwr/serverapp/strategy/fedtrimmedavg.py +9 -9
  241. flwr/serverapp/strategy/fedxgb_bagging.py +3 -3
  242. flwr/serverapp/strategy/fedxgb_cyclic.py +9 -9
  243. flwr/serverapp/strategy/fedyogi.py +9 -11
  244. flwr/serverapp/strategy/krum.py +7 -7
  245. flwr/serverapp/strategy/multikrum.py +9 -9
  246. flwr/serverapp/strategy/qfedavg.py +17 -16
  247. flwr/serverapp/strategy/strategy.py +6 -9
  248. flwr/serverapp/strategy/strategy_utils.py +7 -8
  249. flwr/simulation/app.py +46 -42
  250. flwr/simulation/legacy_app.py +12 -12
  251. flwr/simulation/ray_transport/ray_actor.py +11 -12
  252. flwr/simulation/ray_transport/ray_client_proxy.py +12 -13
  253. flwr/simulation/run_simulation.py +44 -43
  254. flwr/simulation/simulationio_connection.py +4 -4
  255. flwr/supercore/cli/flower_superexec.py +3 -4
  256. flwr/supercore/constant.py +52 -0
  257. flwr/supercore/corestate/corestate.py +24 -3
  258. flwr/supercore/corestate/in_memory_corestate.py +138 -0
  259. flwr/supercore/corestate/sqlite_corestate.py +157 -0
  260. flwr/supercore/ffs/disk_ffs.py +1 -2
  261. flwr/supercore/ffs/ffs.py +1 -2
  262. flwr/supercore/ffs/ffs_factory.py +1 -2
  263. flwr/{common → supercore}/heartbeat.py +20 -25
  264. flwr/supercore/object_store/in_memory_object_store.py +1 -6
  265. flwr/supercore/object_store/object_store.py +1 -2
  266. flwr/supercore/object_store/object_store_factory.py +27 -8
  267. flwr/supercore/object_store/sqlite_object_store.py +253 -0
  268. flwr/{client/clientapp → supercore/primitives}/__init__.py +1 -1
  269. flwr/supercore/primitives/asymmetric.py +117 -0
  270. flwr/supercore/primitives/asymmetric_ed25519.py +175 -0
  271. flwr/supercore/sqlite_mixin.py +159 -0
  272. flwr/supercore/superexec/plugin/base_exec_plugin.py +1 -2
  273. flwr/supercore/superexec/plugin/exec_plugin.py +3 -3
  274. flwr/supercore/superexec/run_superexec.py +9 -13
  275. flwr/supercore/utils.py +20 -0
  276. flwr/superlink/artifact_provider/artifact_provider.py +1 -2
  277. flwr/{common → superlink}/auth_plugin/__init__.py +6 -6
  278. flwr/superlink/auth_plugin/auth_plugin.py +88 -0
  279. flwr/superlink/auth_plugin/noop_auth_plugin.py +84 -0
  280. flwr/superlink/federation/__init__.py +24 -0
  281. flwr/superlink/federation/federation_manager.py +64 -0
  282. flwr/superlink/federation/noop_federation_manager.py +71 -0
  283. flwr/superlink/servicer/control/{control_user_auth_interceptor.py → control_account_auth_interceptor.py} +41 -32
  284. flwr/superlink/servicer/control/control_event_log_interceptor.py +7 -7
  285. flwr/superlink/servicer/control/control_grpc.py +18 -17
  286. flwr/superlink/servicer/control/control_license_interceptor.py +3 -3
  287. flwr/superlink/servicer/control/control_servicer.py +239 -63
  288. flwr/supernode/cli/flower_supernode.py +74 -26
  289. flwr/supernode/nodestate/in_memory_nodestate.py +60 -49
  290. flwr/supernode/nodestate/nodestate.py +7 -8
  291. flwr/supernode/nodestate/nodestate_factory.py +7 -4
  292. flwr/supernode/runtime/run_clientapp.py +43 -24
  293. flwr/supernode/servicer/clientappio/clientappio_servicer.py +40 -10
  294. flwr/supernode/start_client_internal.py +175 -51
  295. {flwr-1.22.0.dist-info → flwr-1.24.0.dist-info}/METADATA +8 -8
  296. flwr-1.24.0.dist-info/RECORD +454 -0
  297. flwr/common/auth_plugin/auth_plugin.py +0 -149
  298. flwr/supercore/object_store/utils.py +0 -43
  299. flwr-1.22.0.dist-info/RECORD +0 -428
  300. {flwr-1.22.0.dist-info → flwr-1.24.0.dist-info}/WHEEL +0 -0
  301. {flwr-1.22.0.dist-info → flwr-1.24.0.dist-info}/entry_points.txt +0 -0
@@ -1,106 +1,278 @@
1
1
  """
2
2
  @generated by mypy-protobuf. Do not edit manually!
3
3
  isort:skip_file
4
+ Copyright 2024 Flower Labs GmbH. All Rights Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ ==============================================================================
4
18
  """
19
+
5
20
  import abc
21
+ import collections.abc
6
22
  import flwr.proto.control_pb2
7
23
  import grpc
24
+ import grpc.aio
8
25
  import typing
9
26
 
27
+ _T = typing.TypeVar("_T")
28
+
29
+ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
30
+
31
+ class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
32
+ ...
33
+
10
34
  class ControlStub:
11
- def __init__(self, channel: grpc.Channel) -> None: ...
35
+ def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
12
36
  StartRun: grpc.UnaryUnaryMultiCallable[
13
37
  flwr.proto.control_pb2.StartRunRequest,
14
- flwr.proto.control_pb2.StartRunResponse]
38
+ flwr.proto.control_pb2.StartRunResponse,
39
+ ]
15
40
  """Start run upon request"""
16
41
 
17
42
  StopRun: grpc.UnaryUnaryMultiCallable[
18
43
  flwr.proto.control_pb2.StopRunRequest,
19
- flwr.proto.control_pb2.StopRunResponse]
44
+ flwr.proto.control_pb2.StopRunResponse,
45
+ ]
20
46
  """Stop run upon request"""
21
47
 
22
48
  StreamLogs: grpc.UnaryStreamMultiCallable[
23
49
  flwr.proto.control_pb2.StreamLogsRequest,
24
- flwr.proto.control_pb2.StreamLogsResponse]
50
+ flwr.proto.control_pb2.StreamLogsResponse,
51
+ ]
25
52
  """Start log stream upon request"""
26
53
 
27
54
  ListRuns: grpc.UnaryUnaryMultiCallable[
28
55
  flwr.proto.control_pb2.ListRunsRequest,
29
- flwr.proto.control_pb2.ListRunsResponse]
56
+ flwr.proto.control_pb2.ListRunsResponse,
57
+ ]
30
58
  """flwr ls command"""
31
59
 
32
60
  GetLoginDetails: grpc.UnaryUnaryMultiCallable[
33
61
  flwr.proto.control_pb2.GetLoginDetailsRequest,
34
- flwr.proto.control_pb2.GetLoginDetailsResponse]
62
+ flwr.proto.control_pb2.GetLoginDetailsResponse,
63
+ ]
35
64
  """Get login details upon request"""
36
65
 
37
66
  GetAuthTokens: grpc.UnaryUnaryMultiCallable[
38
67
  flwr.proto.control_pb2.GetAuthTokensRequest,
39
- flwr.proto.control_pb2.GetAuthTokensResponse]
68
+ flwr.proto.control_pb2.GetAuthTokensResponse,
69
+ ]
40
70
  """Get auth tokens upon request"""
41
71
 
42
72
  PullArtifacts: grpc.UnaryUnaryMultiCallable[
43
73
  flwr.proto.control_pb2.PullArtifactsRequest,
44
- flwr.proto.control_pb2.PullArtifactsResponse]
74
+ flwr.proto.control_pb2.PullArtifactsResponse,
75
+ ]
76
+ """Pull artifacts generated during a run (flwr pull)"""
77
+
78
+ RegisterNode: grpc.UnaryUnaryMultiCallable[
79
+ flwr.proto.control_pb2.RegisterNodeRequest,
80
+ flwr.proto.control_pb2.RegisterNodeResponse,
81
+ ]
82
+ """Register SuperNode"""
83
+
84
+ UnregisterNode: grpc.UnaryUnaryMultiCallable[
85
+ flwr.proto.control_pb2.UnregisterNodeRequest,
86
+ flwr.proto.control_pb2.UnregisterNodeResponse,
87
+ ]
88
+ """Unregister SuperNode"""
89
+
90
+ ListNodes: grpc.UnaryUnaryMultiCallable[
91
+ flwr.proto.control_pb2.ListNodesRequest,
92
+ flwr.proto.control_pb2.ListNodesResponse,
93
+ ]
94
+ """List SuperNodes"""
95
+
96
+ ListFederations: grpc.UnaryUnaryMultiCallable[
97
+ flwr.proto.control_pb2.ListFederationsRequest,
98
+ flwr.proto.control_pb2.ListFederationsResponse,
99
+ ]
100
+ """List Federations"""
101
+
102
+ ShowFederation: grpc.UnaryUnaryMultiCallable[
103
+ flwr.proto.control_pb2.ShowFederationRequest,
104
+ flwr.proto.control_pb2.ShowFederationResponse,
105
+ ]
106
+ """Show Federation"""
107
+
108
+ class ControlAsyncStub:
109
+ StartRun: grpc.aio.UnaryUnaryMultiCallable[
110
+ flwr.proto.control_pb2.StartRunRequest,
111
+ flwr.proto.control_pb2.StartRunResponse,
112
+ ]
113
+ """Start run upon request"""
114
+
115
+ StopRun: grpc.aio.UnaryUnaryMultiCallable[
116
+ flwr.proto.control_pb2.StopRunRequest,
117
+ flwr.proto.control_pb2.StopRunResponse,
118
+ ]
119
+ """Stop run upon request"""
120
+
121
+ StreamLogs: grpc.aio.UnaryStreamMultiCallable[
122
+ flwr.proto.control_pb2.StreamLogsRequest,
123
+ flwr.proto.control_pb2.StreamLogsResponse,
124
+ ]
125
+ """Start log stream upon request"""
126
+
127
+ ListRuns: grpc.aio.UnaryUnaryMultiCallable[
128
+ flwr.proto.control_pb2.ListRunsRequest,
129
+ flwr.proto.control_pb2.ListRunsResponse,
130
+ ]
131
+ """flwr ls command"""
132
+
133
+ GetLoginDetails: grpc.aio.UnaryUnaryMultiCallable[
134
+ flwr.proto.control_pb2.GetLoginDetailsRequest,
135
+ flwr.proto.control_pb2.GetLoginDetailsResponse,
136
+ ]
137
+ """Get login details upon request"""
138
+
139
+ GetAuthTokens: grpc.aio.UnaryUnaryMultiCallable[
140
+ flwr.proto.control_pb2.GetAuthTokensRequest,
141
+ flwr.proto.control_pb2.GetAuthTokensResponse,
142
+ ]
143
+ """Get auth tokens upon request"""
144
+
145
+ PullArtifacts: grpc.aio.UnaryUnaryMultiCallable[
146
+ flwr.proto.control_pb2.PullArtifactsRequest,
147
+ flwr.proto.control_pb2.PullArtifactsResponse,
148
+ ]
45
149
  """Pull artifacts generated during a run (flwr pull)"""
46
150
 
151
+ RegisterNode: grpc.aio.UnaryUnaryMultiCallable[
152
+ flwr.proto.control_pb2.RegisterNodeRequest,
153
+ flwr.proto.control_pb2.RegisterNodeResponse,
154
+ ]
155
+ """Register SuperNode"""
156
+
157
+ UnregisterNode: grpc.aio.UnaryUnaryMultiCallable[
158
+ flwr.proto.control_pb2.UnregisterNodeRequest,
159
+ flwr.proto.control_pb2.UnregisterNodeResponse,
160
+ ]
161
+ """Unregister SuperNode"""
162
+
163
+ ListNodes: grpc.aio.UnaryUnaryMultiCallable[
164
+ flwr.proto.control_pb2.ListNodesRequest,
165
+ flwr.proto.control_pb2.ListNodesResponse,
166
+ ]
167
+ """List SuperNodes"""
168
+
169
+ ListFederations: grpc.aio.UnaryUnaryMultiCallable[
170
+ flwr.proto.control_pb2.ListFederationsRequest,
171
+ flwr.proto.control_pb2.ListFederationsResponse,
172
+ ]
173
+ """List Federations"""
174
+
175
+ ShowFederation: grpc.aio.UnaryUnaryMultiCallable[
176
+ flwr.proto.control_pb2.ShowFederationRequest,
177
+ flwr.proto.control_pb2.ShowFederationResponse,
178
+ ]
179
+ """Show Federation"""
47
180
 
48
181
  class ControlServicer(metaclass=abc.ABCMeta):
49
182
  @abc.abstractmethod
50
- def StartRun(self,
183
+ def StartRun(
184
+ self,
51
185
  request: flwr.proto.control_pb2.StartRunRequest,
52
- context: grpc.ServicerContext,
53
- ) -> flwr.proto.control_pb2.StartRunResponse:
186
+ context: _ServicerContext,
187
+ ) -> typing.Union[flwr.proto.control_pb2.StartRunResponse, collections.abc.Awaitable[flwr.proto.control_pb2.StartRunResponse]]:
54
188
  """Start run upon request"""
55
- pass
56
189
 
57
190
  @abc.abstractmethod
58
- def StopRun(self,
191
+ def StopRun(
192
+ self,
59
193
  request: flwr.proto.control_pb2.StopRunRequest,
60
- context: grpc.ServicerContext,
61
- ) -> flwr.proto.control_pb2.StopRunResponse:
194
+ context: _ServicerContext,
195
+ ) -> typing.Union[flwr.proto.control_pb2.StopRunResponse, collections.abc.Awaitable[flwr.proto.control_pb2.StopRunResponse]]:
62
196
  """Stop run upon request"""
63
- pass
64
197
 
65
198
  @abc.abstractmethod
66
- def StreamLogs(self,
199
+ def StreamLogs(
200
+ self,
67
201
  request: flwr.proto.control_pb2.StreamLogsRequest,
68
- context: grpc.ServicerContext,
69
- ) -> typing.Iterator[flwr.proto.control_pb2.StreamLogsResponse]:
202
+ context: _ServicerContext,
203
+ ) -> typing.Union[collections.abc.Iterator[flwr.proto.control_pb2.StreamLogsResponse], collections.abc.AsyncIterator[flwr.proto.control_pb2.StreamLogsResponse]]:
70
204
  """Start log stream upon request"""
71
- pass
72
205
 
73
206
  @abc.abstractmethod
74
- def ListRuns(self,
207
+ def ListRuns(
208
+ self,
75
209
  request: flwr.proto.control_pb2.ListRunsRequest,
76
- context: grpc.ServicerContext,
77
- ) -> flwr.proto.control_pb2.ListRunsResponse:
210
+ context: _ServicerContext,
211
+ ) -> typing.Union[flwr.proto.control_pb2.ListRunsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ListRunsResponse]]:
78
212
  """flwr ls command"""
79
- pass
80
213
 
81
214
  @abc.abstractmethod
82
- def GetLoginDetails(self,
215
+ def GetLoginDetails(
216
+ self,
83
217
  request: flwr.proto.control_pb2.GetLoginDetailsRequest,
84
- context: grpc.ServicerContext,
85
- ) -> flwr.proto.control_pb2.GetLoginDetailsResponse:
218
+ context: _ServicerContext,
219
+ ) -> typing.Union[flwr.proto.control_pb2.GetLoginDetailsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.GetLoginDetailsResponse]]:
86
220
  """Get login details upon request"""
87
- pass
88
221
 
89
222
  @abc.abstractmethod
90
- def GetAuthTokens(self,
223
+ def GetAuthTokens(
224
+ self,
91
225
  request: flwr.proto.control_pb2.GetAuthTokensRequest,
92
- context: grpc.ServicerContext,
93
- ) -> flwr.proto.control_pb2.GetAuthTokensResponse:
226
+ context: _ServicerContext,
227
+ ) -> typing.Union[flwr.proto.control_pb2.GetAuthTokensResponse, collections.abc.Awaitable[flwr.proto.control_pb2.GetAuthTokensResponse]]:
94
228
  """Get auth tokens upon request"""
95
- pass
96
229
 
97
230
  @abc.abstractmethod
98
- def PullArtifacts(self,
231
+ def PullArtifacts(
232
+ self,
99
233
  request: flwr.proto.control_pb2.PullArtifactsRequest,
100
- context: grpc.ServicerContext,
101
- ) -> flwr.proto.control_pb2.PullArtifactsResponse:
234
+ context: _ServicerContext,
235
+ ) -> typing.Union[flwr.proto.control_pb2.PullArtifactsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.PullArtifactsResponse]]:
102
236
  """Pull artifacts generated during a run (flwr pull)"""
103
- pass
104
237
 
238
+ @abc.abstractmethod
239
+ def RegisterNode(
240
+ self,
241
+ request: flwr.proto.control_pb2.RegisterNodeRequest,
242
+ context: _ServicerContext,
243
+ ) -> typing.Union[flwr.proto.control_pb2.RegisterNodeResponse, collections.abc.Awaitable[flwr.proto.control_pb2.RegisterNodeResponse]]:
244
+ """Register SuperNode"""
245
+
246
+ @abc.abstractmethod
247
+ def UnregisterNode(
248
+ self,
249
+ request: flwr.proto.control_pb2.UnregisterNodeRequest,
250
+ context: _ServicerContext,
251
+ ) -> typing.Union[flwr.proto.control_pb2.UnregisterNodeResponse, collections.abc.Awaitable[flwr.proto.control_pb2.UnregisterNodeResponse]]:
252
+ """Unregister SuperNode"""
253
+
254
+ @abc.abstractmethod
255
+ def ListNodes(
256
+ self,
257
+ request: flwr.proto.control_pb2.ListNodesRequest,
258
+ context: _ServicerContext,
259
+ ) -> typing.Union[flwr.proto.control_pb2.ListNodesResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ListNodesResponse]]:
260
+ """List SuperNodes"""
261
+
262
+ @abc.abstractmethod
263
+ def ListFederations(
264
+ self,
265
+ request: flwr.proto.control_pb2.ListFederationsRequest,
266
+ context: _ServicerContext,
267
+ ) -> typing.Union[flwr.proto.control_pb2.ListFederationsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ListFederationsResponse]]:
268
+ """List Federations"""
269
+
270
+ @abc.abstractmethod
271
+ def ShowFederation(
272
+ self,
273
+ request: flwr.proto.control_pb2.ShowFederationRequest,
274
+ context: _ServicerContext,
275
+ ) -> typing.Union[flwr.proto.control_pb2.ShowFederationResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ShowFederationResponse]]:
276
+ """Show Federation"""
105
277
 
106
- def add_ControlServicer_to_server(servicer: ControlServicer, server: grpc.Server) -> None: ...
278
+ def add_ControlServicer_to_server(servicer: ControlServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
flwr/proto/error_pb2.py CHANGED
@@ -1,12 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: flwr/proto/error.proto
4
- # Protobuf Python Version: 4.25.1
5
+ # Protobuf Python Version: 5.29.0
5
6
  """Generated protocol buffer code."""
6
7
  from google.protobuf import descriptor as _descriptor
7
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
8
10
  from google.protobuf import symbol_database as _symbol_database
9
11
  from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'flwr/proto/error.proto'
19
+ )
10
20
  # @@protoc_insertion_point(imports)
11
21
 
12
22
  _sym_db = _symbol_database.Default()
@@ -19,8 +29,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/
19
29
  _globals = globals()
20
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
21
31
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.error_pb2', _globals)
22
- if _descriptor._USE_C_DESCRIPTORS == False:
23
- DESCRIPTOR._options = None
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
24
34
  _globals['_ERROR']._serialized_start=38
25
35
  _globals['_ERROR']._serialized_end=75
26
36
  # @@protoc_insertion_point(module_scope)
flwr/proto/error_pb2.pyi CHANGED
@@ -1,25 +1,43 @@
1
1
  """
2
2
  @generated by mypy-protobuf. Do not edit manually!
3
3
  isort:skip_file
4
+ Copyright 2024 Flower Labs GmbH. All Rights Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ ==============================================================================
4
18
  """
19
+
5
20
  import builtins
6
21
  import google.protobuf.descriptor
7
22
  import google.protobuf.message
8
23
  import typing
9
- import typing_extensions
10
24
 
11
25
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
12
26
 
27
+ @typing.final
13
28
  class Error(google.protobuf.message.Message):
14
29
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
30
+
15
31
  CODE_FIELD_NUMBER: builtins.int
16
32
  REASON_FIELD_NUMBER: builtins.int
17
33
  code: builtins.int
18
- reason: typing.Text
19
- def __init__(self,
34
+ reason: builtins.str
35
+ def __init__(
36
+ self,
20
37
  *,
21
38
  code: builtins.int = ...,
22
- reason: typing.Text = ...,
23
- ) -> None: ...
24
- def ClearField(self, field_name: typing_extensions.Literal["code",b"code","reason",b"reason"]) -> None: ...
39
+ reason: builtins.str = ...,
40
+ ) -> None: ...
41
+ def ClearField(self, field_name: typing.Literal["code", b"code", "reason", b"reason"]) -> None: ...
42
+
25
43
  global___Error = Error
@@ -1,4 +1,24 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
+ import warnings
4
5
 
6
+
7
+ GRPC_GENERATED_VERSION = '1.70.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in flwr/proto/error_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -1,4 +1,31 @@
1
1
  """
2
2
  @generated by mypy-protobuf. Do not edit manually!
3
3
  isort:skip_file
4
+ Copyright 2024 Flower Labs GmbH. All Rights Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ ==============================================================================
4
18
  """
19
+
20
+ import abc
21
+ import collections.abc
22
+ import grpc
23
+ import grpc.aio
24
+ import typing
25
+
26
+ _T = typing.TypeVar("_T")
27
+
28
+ class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
29
+
30
+ class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
31
+ ...
flwr/proto/fab_pb2.py CHANGED
@@ -1,12 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: flwr/proto/fab.proto
4
- # Protobuf Python Version: 4.25.1
5
+ # Protobuf Python Version: 5.29.0
5
6
  """Generated protocol buffer code."""
6
7
  from google.protobuf import descriptor as _descriptor
7
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
8
10
  from google.protobuf import symbol_database as _symbol_database
9
11
  from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'flwr/proto/fab.proto'
19
+ )
10
20
  # @@protoc_insertion_point(imports)
11
21
 
12
22
  _sym_db = _symbol_database.Default()
@@ -15,17 +25,21 @@ _sym_db = _symbol_database.Default()
15
25
  from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2
16
26
 
17
27
 
18
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"Q\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3')
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\"\x99\x01\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\x12\x39\n\rverifications\x18\x03 \x03(\x0b\x32\".flwr.proto.Fab.VerificationsEntry\x1a\x34\n\x12VerificationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"Q\n\rGetFabRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08hash_str\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3')
19
29
 
20
30
  _globals = globals()
21
31
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
22
32
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.fab_pb2', _globals)
23
- if _descriptor._USE_C_DESCRIPTORS == False:
24
- DESCRIPTOR._options = None
25
- _globals['_FAB']._serialized_start=59
26
- _globals['_FAB']._serialized_end=99
27
- _globals['_GETFABREQUEST']._serialized_start=101
28
- _globals['_GETFABREQUEST']._serialized_end=182
29
- _globals['_GETFABRESPONSE']._serialized_start=184
30
- _globals['_GETFABRESPONSE']._serialized_end=230
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ DESCRIPTOR._loaded_options = None
35
+ _globals['_FAB_VERIFICATIONSENTRY']._loaded_options = None
36
+ _globals['_FAB_VERIFICATIONSENTRY']._serialized_options = b'8\001'
37
+ _globals['_FAB']._serialized_start=60
38
+ _globals['_FAB']._serialized_end=213
39
+ _globals['_FAB_VERIFICATIONSENTRY']._serialized_start=161
40
+ _globals['_FAB_VERIFICATIONSENTRY']._serialized_end=213
41
+ _globals['_GETFABREQUEST']._serialized_start=215
42
+ _globals['_GETFABREQUEST']._serialized_end=296
43
+ _globals['_GETFABRESPONSE']._serialized_start=298
44
+ _globals['_GETFABRESPONSE']._serialized_end=344
31
45
  # @@protoc_insertion_point(module_scope)
flwr/proto/fab_pb2.pyi CHANGED
@@ -1,65 +1,113 @@
1
1
  """
2
2
  @generated by mypy-protobuf. Do not edit manually!
3
3
  isort:skip_file
4
+ Copyright 2024 Flower Labs GmbH. All Rights Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ ==============================================================================
4
18
  """
19
+
5
20
  import builtins
21
+ import collections.abc
6
22
  import flwr.proto.node_pb2
7
23
  import google.protobuf.descriptor
24
+ import google.protobuf.internal.containers
8
25
  import google.protobuf.message
9
26
  import typing
10
- import typing_extensions
11
27
 
12
28
  DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
13
29
 
30
+ @typing.final
14
31
  class Fab(google.protobuf.message.Message):
15
32
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
33
+
34
+ @typing.final
35
+ class VerificationsEntry(google.protobuf.message.Message):
36
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
37
+
38
+ KEY_FIELD_NUMBER: builtins.int
39
+ VALUE_FIELD_NUMBER: builtins.int
40
+ key: builtins.str
41
+ value: builtins.str
42
+ def __init__(
43
+ self,
44
+ *,
45
+ key: builtins.str = ...,
46
+ value: builtins.str = ...,
47
+ ) -> None: ...
48
+ def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
49
+
16
50
  HASH_STR_FIELD_NUMBER: builtins.int
17
51
  CONTENT_FIELD_NUMBER: builtins.int
18
- hash_str: typing.Text
52
+ VERIFICATIONS_FIELD_NUMBER: builtins.int
53
+ hash_str: builtins.str
19
54
  """This field is the hash of the data field. It is used to identify the data.
20
55
  The hash is calculated using the SHA-256 algorithm and is represented as a
21
56
  hex string (sha256hex).
22
57
  """
23
-
24
58
  content: builtins.bytes
25
59
  """This field contains the fab file contents a one bytes blob."""
60
+ @property
61
+ def verifications(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
62
+ """Verifications."""
26
63
 
27
- def __init__(self,
64
+ def __init__(
65
+ self,
28
66
  *,
29
- hash_str: typing.Text = ...,
67
+ hash_str: builtins.str = ...,
30
68
  content: builtins.bytes = ...,
31
- ) -> None: ...
32
- def ClearField(self, field_name: typing_extensions.Literal["content",b"content","hash_str",b"hash_str"]) -> None: ...
69
+ verifications: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
70
+ ) -> None: ...
71
+ def ClearField(self, field_name: typing.Literal["content", b"content", "hash_str", b"hash_str", "verifications", b"verifications"]) -> None: ...
72
+
33
73
  global___Fab = Fab
34
74
 
75
+ @typing.final
35
76
  class GetFabRequest(google.protobuf.message.Message):
36
77
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
78
+
37
79
  NODE_FIELD_NUMBER: builtins.int
38
80
  HASH_STR_FIELD_NUMBER: builtins.int
39
81
  RUN_ID_FIELD_NUMBER: builtins.int
82
+ hash_str: builtins.str
83
+ run_id: builtins.int
40
84
  @property
41
85
  def node(self) -> flwr.proto.node_pb2.Node: ...
42
- hash_str: typing.Text
43
- run_id: builtins.int
44
- def __init__(self,
86
+ def __init__(
87
+ self,
45
88
  *,
46
- node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
47
- hash_str: typing.Text = ...,
89
+ node: flwr.proto.node_pb2.Node | None = ...,
90
+ hash_str: builtins.str = ...,
48
91
  run_id: builtins.int = ...,
49
- ) -> None: ...
50
- def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
51
- def ClearField(self, field_name: typing_extensions.Literal["hash_str",b"hash_str","node",b"node","run_id",b"run_id"]) -> None: ...
92
+ ) -> None: ...
93
+ def HasField(self, field_name: typing.Literal["node", b"node"]) -> builtins.bool: ...
94
+ def ClearField(self, field_name: typing.Literal["hash_str", b"hash_str", "node", b"node", "run_id", b"run_id"]) -> None: ...
95
+
52
96
  global___GetFabRequest = GetFabRequest
53
97
 
98
+ @typing.final
54
99
  class GetFabResponse(google.protobuf.message.Message):
55
100
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
101
+
56
102
  FAB_FIELD_NUMBER: builtins.int
57
103
  @property
58
104
  def fab(self) -> global___Fab: ...
59
- def __init__(self,
105
+ def __init__(
106
+ self,
60
107
  *,
61
- fab: typing.Optional[global___Fab] = ...,
62
- ) -> None: ...
63
- def HasField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> builtins.bool: ...
64
- def ClearField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> None: ...
108
+ fab: global___Fab | None = ...,
109
+ ) -> None: ...
110
+ def HasField(self, field_name: typing.Literal["fab", b"fab"]) -> builtins.bool: ...
111
+ def ClearField(self, field_name: typing.Literal["fab", b"fab"]) -> None: ...
112
+
65
113
  global___GetFabResponse = GetFabResponse
@@ -1,4 +1,24 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
+ import warnings
4
5
 
6
+
7
+ GRPC_GENERATED_VERSION = '1.70.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in flwr/proto/fab_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )