flwr-nightly 1.8.0.dev20240314__py3-none-any.whl → 1.11.0.dev20240813__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.
Potentially problematic release.
This version of flwr-nightly might be problematic. Click here for more details.
- flwr/cli/app.py +7 -0
- flwr/cli/build.py +150 -0
- flwr/cli/config_utils.py +219 -0
- flwr/cli/example.py +3 -1
- flwr/cli/install.py +227 -0
- flwr/cli/new/new.py +179 -48
- flwr/cli/new/templates/app/.gitignore.tpl +160 -0
- flwr/cli/new/templates/app/README.flowertune.md.tpl +56 -0
- flwr/cli/new/templates/app/README.md.tpl +1 -5
- flwr/cli/new/templates/app/code/__init__.py.tpl +1 -1
- flwr/cli/new/templates/app/code/client.huggingface.py.tpl +65 -0
- flwr/cli/new/templates/app/code/client.jax.py.tpl +56 -0
- flwr/cli/new/templates/app/code/client.mlx.py.tpl +93 -0
- flwr/cli/new/templates/app/code/client.numpy.py.tpl +3 -2
- flwr/cli/new/templates/app/code/client.pytorch.py.tpl +23 -11
- flwr/cli/new/templates/app/code/client.sklearn.py.tpl +97 -0
- flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +60 -1
- flwr/cli/new/templates/app/code/flwr_tune/__init__.py +15 -0
- flwr/cli/new/templates/app/code/flwr_tune/app.py.tpl +89 -0
- flwr/cli/new/templates/app/code/flwr_tune/client.py.tpl +126 -0
- flwr/cli/new/templates/app/code/flwr_tune/config.yaml.tpl +34 -0
- flwr/cli/new/templates/app/code/flwr_tune/dataset.py.tpl +57 -0
- flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +59 -0
- flwr/cli/new/templates/app/code/flwr_tune/server.py.tpl +48 -0
- flwr/cli/new/templates/app/code/flwr_tune/static_config.yaml.tpl +11 -0
- flwr/cli/new/templates/app/code/server.huggingface.py.tpl +23 -0
- flwr/cli/new/templates/app/code/server.jax.py.tpl +20 -0
- flwr/cli/new/templates/app/code/server.mlx.py.tpl +20 -0
- flwr/cli/new/templates/app/code/server.numpy.py.tpl +17 -9
- flwr/cli/new/templates/app/code/server.pytorch.py.tpl +21 -18
- flwr/cli/new/templates/app/code/server.sklearn.py.tpl +24 -0
- flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +29 -1
- flwr/cli/new/templates/app/code/task.huggingface.py.tpl +99 -0
- flwr/cli/new/templates/app/code/task.jax.py.tpl +57 -0
- flwr/cli/new/templates/app/code/task.mlx.py.tpl +102 -0
- flwr/cli/new/templates/app/code/task.pytorch.py.tpl +28 -23
- flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +53 -0
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +39 -0
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +38 -0
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +34 -0
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +39 -0
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +25 -12
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +29 -14
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +33 -0
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +29 -14
- flwr/cli/run/run.py +168 -17
- flwr/cli/utils.py +75 -4
- flwr/client/__init__.py +6 -1
- flwr/client/app.py +239 -248
- flwr/client/client_app.py +70 -9
- flwr/client/dpfedavg_numpy_client.py +1 -1
- flwr/client/grpc_adapter_client/__init__.py +15 -0
- flwr/client/grpc_adapter_client/connection.py +97 -0
- flwr/client/grpc_client/connection.py +18 -5
- flwr/client/grpc_rere_client/__init__.py +1 -1
- flwr/client/grpc_rere_client/client_interceptor.py +158 -0
- flwr/client/grpc_rere_client/connection.py +127 -33
- flwr/client/grpc_rere_client/grpc_adapter.py +140 -0
- flwr/client/heartbeat.py +74 -0
- flwr/client/message_handler/__init__.py +1 -1
- flwr/client/message_handler/message_handler.py +7 -7
- flwr/client/mod/__init__.py +5 -5
- flwr/client/mod/centraldp_mods.py +4 -2
- flwr/client/mod/comms_mods.py +4 -4
- flwr/client/mod/localdp_mod.py +9 -4
- flwr/client/mod/secure_aggregation/__init__.py +1 -1
- flwr/client/mod/secure_aggregation/secaggplus_mod.py +1 -1
- flwr/client/mod/utils.py +1 -1
- flwr/client/node_state.py +60 -10
- flwr/client/node_state_tests.py +4 -3
- flwr/client/rest_client/__init__.py +1 -1
- flwr/client/rest_client/connection.py +177 -157
- flwr/client/supernode/__init__.py +26 -0
- flwr/client/supernode/app.py +464 -0
- flwr/client/typing.py +1 -0
- flwr/common/__init__.py +13 -11
- flwr/common/address.py +1 -1
- flwr/common/config.py +193 -0
- flwr/common/constant.py +42 -1
- flwr/common/context.py +26 -1
- flwr/common/date.py +1 -1
- flwr/common/dp.py +1 -1
- flwr/common/grpc.py +6 -2
- flwr/common/logger.py +79 -8
- flwr/common/message.py +167 -105
- flwr/common/object_ref.py +126 -25
- flwr/common/record/__init__.py +1 -1
- flwr/common/record/parametersrecord.py +0 -1
- flwr/common/record/recordset.py +78 -27
- flwr/common/recordset_compat.py +8 -1
- flwr/common/retry_invoker.py +25 -13
- flwr/common/secure_aggregation/__init__.py +1 -1
- flwr/common/secure_aggregation/crypto/__init__.py +1 -1
- flwr/common/secure_aggregation/crypto/shamir.py +1 -1
- flwr/common/secure_aggregation/crypto/symmetric_encryption.py +21 -2
- flwr/common/secure_aggregation/ndarrays_arithmetic.py +1 -1
- flwr/common/secure_aggregation/quantization.py +1 -1
- flwr/common/secure_aggregation/secaggplus_constants.py +1 -1
- flwr/common/secure_aggregation/secaggplus_utils.py +1 -1
- flwr/common/serde.py +209 -3
- flwr/common/telemetry.py +25 -0
- flwr/common/typing.py +38 -0
- flwr/common/version.py +14 -0
- flwr/proto/clientappio_pb2.py +41 -0
- flwr/proto/clientappio_pb2.pyi +110 -0
- flwr/proto/clientappio_pb2_grpc.py +101 -0
- flwr/proto/clientappio_pb2_grpc.pyi +40 -0
- flwr/proto/common_pb2.py +36 -0
- flwr/proto/common_pb2.pyi +121 -0
- flwr/proto/common_pb2_grpc.py +4 -0
- flwr/proto/common_pb2_grpc.pyi +4 -0
- flwr/proto/driver_pb2.py +26 -19
- flwr/proto/driver_pb2.pyi +34 -0
- flwr/proto/driver_pb2_grpc.py +70 -0
- flwr/proto/driver_pb2_grpc.pyi +28 -0
- flwr/proto/exec_pb2.py +43 -0
- flwr/proto/exec_pb2.pyi +95 -0
- flwr/proto/exec_pb2_grpc.py +101 -0
- flwr/proto/exec_pb2_grpc.pyi +41 -0
- flwr/proto/fab_pb2.py +30 -0
- flwr/proto/fab_pb2.pyi +56 -0
- flwr/proto/fab_pb2_grpc.py +4 -0
- flwr/proto/fab_pb2_grpc.pyi +4 -0
- flwr/proto/fleet_pb2.py +29 -23
- flwr/proto/fleet_pb2.pyi +33 -0
- flwr/proto/fleet_pb2_grpc.py +102 -0
- flwr/proto/fleet_pb2_grpc.pyi +35 -0
- flwr/proto/grpcadapter_pb2.py +32 -0
- flwr/proto/grpcadapter_pb2.pyi +43 -0
- flwr/proto/grpcadapter_pb2_grpc.py +66 -0
- flwr/proto/grpcadapter_pb2_grpc.pyi +24 -0
- flwr/proto/message_pb2.py +41 -0
- flwr/proto/message_pb2.pyi +122 -0
- flwr/proto/message_pb2_grpc.py +4 -0
- flwr/proto/message_pb2_grpc.pyi +4 -0
- flwr/proto/run_pb2.py +35 -0
- flwr/proto/run_pb2.pyi +76 -0
- flwr/proto/run_pb2_grpc.py +4 -0
- flwr/proto/run_pb2_grpc.pyi +4 -0
- flwr/proto/task_pb2.py +7 -8
- flwr/proto/task_pb2.pyi +8 -5
- flwr/server/__init__.py +4 -8
- flwr/server/app.py +298 -350
- flwr/server/compat/app.py +6 -57
- flwr/server/compat/app_utils.py +5 -4
- flwr/server/compat/driver_client_proxy.py +29 -48
- flwr/server/compat/legacy_context.py +5 -4
- flwr/server/driver/__init__.py +2 -0
- flwr/server/driver/driver.py +22 -132
- flwr/server/driver/grpc_driver.py +224 -74
- flwr/server/driver/inmemory_driver.py +183 -0
- flwr/server/history.py +20 -20
- flwr/server/run_serverapp.py +121 -34
- flwr/server/server.py +11 -7
- flwr/server/server_app.py +59 -10
- flwr/server/serverapp_components.py +52 -0
- flwr/server/strategy/__init__.py +2 -2
- flwr/server/strategy/bulyan.py +1 -1
- flwr/server/strategy/dp_adaptive_clipping.py +3 -3
- flwr/server/strategy/dp_fixed_clipping.py +4 -3
- flwr/server/strategy/dpfedavg_adaptive.py +1 -1
- flwr/server/strategy/dpfedavg_fixed.py +1 -1
- flwr/server/strategy/fedadagrad.py +1 -1
- flwr/server/strategy/fedadam.py +1 -1
- flwr/server/strategy/fedavg_android.py +1 -1
- flwr/server/strategy/fedavgm.py +1 -1
- flwr/server/strategy/fedmedian.py +1 -1
- flwr/server/strategy/fedopt.py +1 -1
- flwr/server/strategy/fedprox.py +1 -1
- flwr/server/strategy/fedxgb_bagging.py +1 -1
- flwr/server/strategy/fedxgb_cyclic.py +1 -1
- flwr/server/strategy/fedxgb_nn_avg.py +1 -1
- flwr/server/strategy/fedyogi.py +1 -1
- flwr/server/strategy/krum.py +1 -1
- flwr/server/strategy/qfedavg.py +1 -1
- flwr/server/superlink/driver/__init__.py +1 -1
- flwr/server/superlink/driver/driver_grpc.py +1 -1
- flwr/server/superlink/driver/driver_servicer.py +51 -4
- flwr/server/superlink/ffs/__init__.py +24 -0
- flwr/server/superlink/ffs/disk_ffs.py +104 -0
- flwr/server/superlink/ffs/ffs.py +79 -0
- flwr/server/superlink/fleet/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_adapter/__init__.py +15 -0
- flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +131 -0
- flwr/server/superlink/fleet/grpc_bidi/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +8 -2
- flwr/server/superlink/fleet/grpc_rere/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +30 -2
- flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +214 -0
- flwr/server/superlink/fleet/message_handler/__init__.py +1 -1
- flwr/server/superlink/fleet/message_handler/message_handler.py +42 -2
- flwr/server/superlink/fleet/rest_rere/__init__.py +1 -1
- flwr/server/superlink/fleet/rest_rere/rest_api.py +59 -1
- flwr/server/superlink/fleet/vce/backend/__init__.py +1 -1
- flwr/server/superlink/fleet/vce/backend/backend.py +5 -5
- flwr/server/superlink/fleet/vce/backend/raybackend.py +53 -56
- flwr/server/superlink/fleet/vce/vce_api.py +190 -127
- flwr/server/superlink/state/__init__.py +1 -1
- flwr/server/superlink/state/in_memory_state.py +159 -42
- flwr/server/superlink/state/sqlite_state.py +243 -39
- flwr/server/superlink/state/state.py +81 -6
- flwr/server/superlink/state/state_factory.py +11 -2
- flwr/server/superlink/state/utils.py +62 -0
- flwr/server/typing.py +2 -0
- flwr/server/utils/__init__.py +1 -1
- flwr/server/utils/tensorboard.py +1 -1
- flwr/server/utils/validator.py +23 -9
- flwr/server/workflow/default_workflows.py +67 -25
- flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +18 -6
- flwr/simulation/__init__.py +7 -4
- flwr/simulation/app.py +67 -36
- flwr/simulation/ray_transport/__init__.py +1 -1
- flwr/simulation/ray_transport/ray_actor.py +20 -46
- flwr/simulation/ray_transport/ray_client_proxy.py +36 -16
- flwr/simulation/run_simulation.py +308 -92
- flwr/superexec/__init__.py +21 -0
- flwr/superexec/app.py +184 -0
- flwr/superexec/deployment.py +185 -0
- flwr/superexec/exec_grpc.py +55 -0
- flwr/superexec/exec_servicer.py +70 -0
- flwr/superexec/executor.py +75 -0
- flwr/superexec/simulation.py +193 -0
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.11.0.dev20240813.dist-info}/METADATA +10 -6
- flwr_nightly-1.11.0.dev20240813.dist-info/RECORD +288 -0
- flwr_nightly-1.11.0.dev20240813.dist-info/entry_points.txt +10 -0
- flwr/cli/flower_toml.py +0 -140
- flwr/cli/new/templates/app/flower.toml.tpl +0 -13
- flwr/cli/new/templates/app/requirements.numpy.txt.tpl +0 -2
- flwr/cli/new/templates/app/requirements.pytorch.txt.tpl +0 -4
- flwr/cli/new/templates/app/requirements.tensorflow.txt.tpl +0 -4
- flwr_nightly-1.8.0.dev20240314.dist-info/RECORD +0 -211
- flwr_nightly-1.8.0.dev20240314.dist-info/entry_points.txt +0 -9
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.11.0.dev20240813.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.11.0.dev20240813.dist-info}/WHEEL +0 -0
flwr/proto/fleet_pb2.pyi
CHANGED
|
@@ -16,8 +16,13 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
|
16
16
|
class CreateNodeRequest(google.protobuf.message.Message):
|
|
17
17
|
"""CreateNode messages"""
|
|
18
18
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
19
|
+
PING_INTERVAL_FIELD_NUMBER: builtins.int
|
|
20
|
+
ping_interval: builtins.float
|
|
19
21
|
def __init__(self,
|
|
22
|
+
*,
|
|
23
|
+
ping_interval: builtins.float = ...,
|
|
20
24
|
) -> None: ...
|
|
25
|
+
def ClearField(self, field_name: typing_extensions.Literal["ping_interval",b"ping_interval"]) -> None: ...
|
|
21
26
|
global___CreateNodeRequest = CreateNodeRequest
|
|
22
27
|
|
|
23
28
|
class CreateNodeResponse(google.protobuf.message.Message):
|
|
@@ -53,6 +58,34 @@ class DeleteNodeResponse(google.protobuf.message.Message):
|
|
|
53
58
|
) -> None: ...
|
|
54
59
|
global___DeleteNodeResponse = DeleteNodeResponse
|
|
55
60
|
|
|
61
|
+
class PingRequest(google.protobuf.message.Message):
|
|
62
|
+
"""Ping messages"""
|
|
63
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
64
|
+
NODE_FIELD_NUMBER: builtins.int
|
|
65
|
+
PING_INTERVAL_FIELD_NUMBER: builtins.int
|
|
66
|
+
@property
|
|
67
|
+
def node(self) -> flwr.proto.node_pb2.Node: ...
|
|
68
|
+
ping_interval: builtins.float
|
|
69
|
+
def __init__(self,
|
|
70
|
+
*,
|
|
71
|
+
node: typing.Optional[flwr.proto.node_pb2.Node] = ...,
|
|
72
|
+
ping_interval: builtins.float = ...,
|
|
73
|
+
) -> None: ...
|
|
74
|
+
def HasField(self, field_name: typing_extensions.Literal["node",b"node"]) -> builtins.bool: ...
|
|
75
|
+
def ClearField(self, field_name: typing_extensions.Literal["node",b"node","ping_interval",b"ping_interval"]) -> None: ...
|
|
76
|
+
global___PingRequest = PingRequest
|
|
77
|
+
|
|
78
|
+
class PingResponse(google.protobuf.message.Message):
|
|
79
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
80
|
+
SUCCESS_FIELD_NUMBER: builtins.int
|
|
81
|
+
success: builtins.bool
|
|
82
|
+
def __init__(self,
|
|
83
|
+
*,
|
|
84
|
+
success: builtins.bool = ...,
|
|
85
|
+
) -> None: ...
|
|
86
|
+
def ClearField(self, field_name: typing_extensions.Literal["success",b"success"]) -> None: ...
|
|
87
|
+
global___PingResponse = PingResponse
|
|
88
|
+
|
|
56
89
|
class PullTaskInsRequest(google.protobuf.message.Message):
|
|
57
90
|
"""PullTaskIns messages"""
|
|
58
91
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
flwr/proto/fleet_pb2_grpc.py
CHANGED
|
@@ -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,6 +26,11 @@ 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,
|
|
@@ -34,6 +41,16 @@ class FleetStub(object):
|
|
|
34
41
|
request_serializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResRequest.SerializeToString,
|
|
35
42
|
response_deserializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResResponse.FromString,
|
|
36
43
|
)
|
|
44
|
+
self.GetRun = channel.unary_unary(
|
|
45
|
+
'/flwr.proto.Fleet/GetRun',
|
|
46
|
+
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
47
|
+
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
48
|
+
)
|
|
49
|
+
self.GetFab = channel.unary_unary(
|
|
50
|
+
'/flwr.proto.Fleet/GetFab',
|
|
51
|
+
request_serializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
|
|
52
|
+
response_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
|
|
53
|
+
)
|
|
37
54
|
|
|
38
55
|
|
|
39
56
|
class FleetServicer(object):
|
|
@@ -51,6 +68,12 @@ class FleetServicer(object):
|
|
|
51
68
|
context.set_details('Method not implemented!')
|
|
52
69
|
raise NotImplementedError('Method not implemented!')
|
|
53
70
|
|
|
71
|
+
def Ping(self, request, context):
|
|
72
|
+
"""Missing associated documentation comment in .proto file."""
|
|
73
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
74
|
+
context.set_details('Method not implemented!')
|
|
75
|
+
raise NotImplementedError('Method not implemented!')
|
|
76
|
+
|
|
54
77
|
def PullTaskIns(self, request, context):
|
|
55
78
|
"""Retrieve one or more tasks, if possible
|
|
56
79
|
|
|
@@ -69,6 +92,19 @@ class FleetServicer(object):
|
|
|
69
92
|
context.set_details('Method not implemented!')
|
|
70
93
|
raise NotImplementedError('Method not implemented!')
|
|
71
94
|
|
|
95
|
+
def GetRun(self, request, context):
|
|
96
|
+
"""Missing associated documentation comment in .proto file."""
|
|
97
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
98
|
+
context.set_details('Method not implemented!')
|
|
99
|
+
raise NotImplementedError('Method not implemented!')
|
|
100
|
+
|
|
101
|
+
def GetFab(self, request, context):
|
|
102
|
+
"""Get FAB
|
|
103
|
+
"""
|
|
104
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
105
|
+
context.set_details('Method not implemented!')
|
|
106
|
+
raise NotImplementedError('Method not implemented!')
|
|
107
|
+
|
|
72
108
|
|
|
73
109
|
def add_FleetServicer_to_server(servicer, server):
|
|
74
110
|
rpc_method_handlers = {
|
|
@@ -82,6 +118,11 @@ def add_FleetServicer_to_server(servicer, server):
|
|
|
82
118
|
request_deserializer=flwr_dot_proto_dot_fleet__pb2.DeleteNodeRequest.FromString,
|
|
83
119
|
response_serializer=flwr_dot_proto_dot_fleet__pb2.DeleteNodeResponse.SerializeToString,
|
|
84
120
|
),
|
|
121
|
+
'Ping': grpc.unary_unary_rpc_method_handler(
|
|
122
|
+
servicer.Ping,
|
|
123
|
+
request_deserializer=flwr_dot_proto_dot_fleet__pb2.PingRequest.FromString,
|
|
124
|
+
response_serializer=flwr_dot_proto_dot_fleet__pb2.PingResponse.SerializeToString,
|
|
125
|
+
),
|
|
85
126
|
'PullTaskIns': grpc.unary_unary_rpc_method_handler(
|
|
86
127
|
servicer.PullTaskIns,
|
|
87
128
|
request_deserializer=flwr_dot_proto_dot_fleet__pb2.PullTaskInsRequest.FromString,
|
|
@@ -92,6 +133,16 @@ def add_FleetServicer_to_server(servicer, server):
|
|
|
92
133
|
request_deserializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResRequest.FromString,
|
|
93
134
|
response_serializer=flwr_dot_proto_dot_fleet__pb2.PushTaskResResponse.SerializeToString,
|
|
94
135
|
),
|
|
136
|
+
'GetRun': grpc.unary_unary_rpc_method_handler(
|
|
137
|
+
servicer.GetRun,
|
|
138
|
+
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.FromString,
|
|
139
|
+
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.SerializeToString,
|
|
140
|
+
),
|
|
141
|
+
'GetFab': grpc.unary_unary_rpc_method_handler(
|
|
142
|
+
servicer.GetFab,
|
|
143
|
+
request_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.FromString,
|
|
144
|
+
response_serializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.SerializeToString,
|
|
145
|
+
),
|
|
95
146
|
}
|
|
96
147
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
97
148
|
'flwr.proto.Fleet', rpc_method_handlers)
|
|
@@ -136,6 +187,23 @@ class Fleet(object):
|
|
|
136
187
|
options, channel_credentials,
|
|
137
188
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
138
189
|
|
|
190
|
+
@staticmethod
|
|
191
|
+
def Ping(request,
|
|
192
|
+
target,
|
|
193
|
+
options=(),
|
|
194
|
+
channel_credentials=None,
|
|
195
|
+
call_credentials=None,
|
|
196
|
+
insecure=False,
|
|
197
|
+
compression=None,
|
|
198
|
+
wait_for_ready=None,
|
|
199
|
+
timeout=None,
|
|
200
|
+
metadata=None):
|
|
201
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/Ping',
|
|
202
|
+
flwr_dot_proto_dot_fleet__pb2.PingRequest.SerializeToString,
|
|
203
|
+
flwr_dot_proto_dot_fleet__pb2.PingResponse.FromString,
|
|
204
|
+
options, channel_credentials,
|
|
205
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
206
|
+
|
|
139
207
|
@staticmethod
|
|
140
208
|
def PullTaskIns(request,
|
|
141
209
|
target,
|
|
@@ -169,3 +237,37 @@ class Fleet(object):
|
|
|
169
237
|
flwr_dot_proto_dot_fleet__pb2.PushTaskResResponse.FromString,
|
|
170
238
|
options, channel_credentials,
|
|
171
239
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
240
|
+
|
|
241
|
+
@staticmethod
|
|
242
|
+
def GetRun(request,
|
|
243
|
+
target,
|
|
244
|
+
options=(),
|
|
245
|
+
channel_credentials=None,
|
|
246
|
+
call_credentials=None,
|
|
247
|
+
insecure=False,
|
|
248
|
+
compression=None,
|
|
249
|
+
wait_for_ready=None,
|
|
250
|
+
timeout=None,
|
|
251
|
+
metadata=None):
|
|
252
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Fleet/GetRun',
|
|
253
|
+
flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
254
|
+
flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
255
|
+
options, channel_credentials,
|
|
256
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
257
|
+
|
|
258
|
+
@staticmethod
|
|
259
|
+
def GetFab(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/GetFab',
|
|
270
|
+
flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
|
|
271
|
+
flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
|
|
272
|
+
options, channel_credentials,
|
|
273
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
flwr/proto/fleet_pb2_grpc.pyi
CHANGED
|
@@ -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]
|
|
@@ -32,6 +38,15 @@ class FleetStub:
|
|
|
32
38
|
HTTP API path: /api/v1/fleet/push-task-res
|
|
33
39
|
"""
|
|
34
40
|
|
|
41
|
+
GetRun: grpc.UnaryUnaryMultiCallable[
|
|
42
|
+
flwr.proto.run_pb2.GetRunRequest,
|
|
43
|
+
flwr.proto.run_pb2.GetRunResponse]
|
|
44
|
+
|
|
45
|
+
GetFab: grpc.UnaryUnaryMultiCallable[
|
|
46
|
+
flwr.proto.fab_pb2.GetFabRequest,
|
|
47
|
+
flwr.proto.fab_pb2.GetFabResponse]
|
|
48
|
+
"""Get FAB"""
|
|
49
|
+
|
|
35
50
|
|
|
36
51
|
class FleetServicer(metaclass=abc.ABCMeta):
|
|
37
52
|
@abc.abstractmethod
|
|
@@ -46,6 +61,12 @@ class FleetServicer(metaclass=abc.ABCMeta):
|
|
|
46
61
|
context: grpc.ServicerContext,
|
|
47
62
|
) -> flwr.proto.fleet_pb2.DeleteNodeResponse: ...
|
|
48
63
|
|
|
64
|
+
@abc.abstractmethod
|
|
65
|
+
def Ping(self,
|
|
66
|
+
request: flwr.proto.fleet_pb2.PingRequest,
|
|
67
|
+
context: grpc.ServicerContext,
|
|
68
|
+
) -> flwr.proto.fleet_pb2.PingResponse: ...
|
|
69
|
+
|
|
49
70
|
@abc.abstractmethod
|
|
50
71
|
def PullTaskIns(self,
|
|
51
72
|
request: flwr.proto.fleet_pb2.PullTaskInsRequest,
|
|
@@ -68,5 +89,19 @@ class FleetServicer(metaclass=abc.ABCMeta):
|
|
|
68
89
|
"""
|
|
69
90
|
pass
|
|
70
91
|
|
|
92
|
+
@abc.abstractmethod
|
|
93
|
+
def GetRun(self,
|
|
94
|
+
request: flwr.proto.run_pb2.GetRunRequest,
|
|
95
|
+
context: grpc.ServicerContext,
|
|
96
|
+
) -> flwr.proto.run_pb2.GetRunResponse: ...
|
|
97
|
+
|
|
98
|
+
@abc.abstractmethod
|
|
99
|
+
def GetFab(self,
|
|
100
|
+
request: flwr.proto.fab_pb2.GetFabRequest,
|
|
101
|
+
context: grpc.ServicerContext,
|
|
102
|
+
) -> flwr.proto.fab_pb2.GetFabResponse:
|
|
103
|
+
"""Get FAB"""
|
|
104
|
+
pass
|
|
105
|
+
|
|
71
106
|
|
|
72
107
|
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)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import builtins
|
|
6
|
+
import google.protobuf.descriptor
|
|
7
|
+
import google.protobuf.internal.containers
|
|
8
|
+
import google.protobuf.message
|
|
9
|
+
import typing
|
|
10
|
+
import typing_extensions
|
|
11
|
+
|
|
12
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
13
|
+
|
|
14
|
+
class MessageContainer(google.protobuf.message.Message):
|
|
15
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
+
class MetadataEntry(google.protobuf.message.Message):
|
|
17
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
18
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
19
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
20
|
+
key: typing.Text
|
|
21
|
+
value: typing.Text
|
|
22
|
+
def __init__(self,
|
|
23
|
+
*,
|
|
24
|
+
key: typing.Text = ...,
|
|
25
|
+
value: typing.Text = ...,
|
|
26
|
+
) -> None: ...
|
|
27
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
28
|
+
|
|
29
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
30
|
+
GRPC_MESSAGE_NAME_FIELD_NUMBER: builtins.int
|
|
31
|
+
GRPC_MESSAGE_CONTENT_FIELD_NUMBER: builtins.int
|
|
32
|
+
@property
|
|
33
|
+
def metadata(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
34
|
+
grpc_message_name: typing.Text
|
|
35
|
+
grpc_message_content: builtins.bytes
|
|
36
|
+
def __init__(self,
|
|
37
|
+
*,
|
|
38
|
+
metadata: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
39
|
+
grpc_message_name: typing.Text = ...,
|
|
40
|
+
grpc_message_content: builtins.bytes = ...,
|
|
41
|
+
) -> None: ...
|
|
42
|
+
def ClearField(self, field_name: typing_extensions.Literal["grpc_message_content",b"grpc_message_content","grpc_message_name",b"grpc_message_name","metadata",b"metadata"]) -> None: ...
|
|
43
|
+
global___MessageContainer = MessageContainer
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
|
|
5
|
+
from flwr.proto import grpcadapter_pb2 as flwr_dot_proto_dot_grpcadapter__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class GrpcAdapterStub(object):
|
|
9
|
+
"""Missing associated documentation comment in .proto file."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.SendReceive = channel.unary_unary(
|
|
18
|
+
'/flwr.proto.GrpcAdapter/SendReceive',
|
|
19
|
+
request_serializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.SerializeToString,
|
|
20
|
+
response_deserializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.FromString,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class GrpcAdapterServicer(object):
|
|
25
|
+
"""Missing associated documentation comment in .proto file."""
|
|
26
|
+
|
|
27
|
+
def SendReceive(self, request, context):
|
|
28
|
+
"""Missing associated documentation comment in .proto file."""
|
|
29
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
30
|
+
context.set_details('Method not implemented!')
|
|
31
|
+
raise NotImplementedError('Method not implemented!')
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def add_GrpcAdapterServicer_to_server(servicer, server):
|
|
35
|
+
rpc_method_handlers = {
|
|
36
|
+
'SendReceive': grpc.unary_unary_rpc_method_handler(
|
|
37
|
+
servicer.SendReceive,
|
|
38
|
+
request_deserializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.FromString,
|
|
39
|
+
response_serializer=flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.SerializeToString,
|
|
40
|
+
),
|
|
41
|
+
}
|
|
42
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
43
|
+
'flwr.proto.GrpcAdapter', rpc_method_handlers)
|
|
44
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# This class is part of an EXPERIMENTAL API.
|
|
48
|
+
class GrpcAdapter(object):
|
|
49
|
+
"""Missing associated documentation comment in .proto file."""
|
|
50
|
+
|
|
51
|
+
@staticmethod
|
|
52
|
+
def SendReceive(request,
|
|
53
|
+
target,
|
|
54
|
+
options=(),
|
|
55
|
+
channel_credentials=None,
|
|
56
|
+
call_credentials=None,
|
|
57
|
+
insecure=False,
|
|
58
|
+
compression=None,
|
|
59
|
+
wait_for_ready=None,
|
|
60
|
+
timeout=None,
|
|
61
|
+
metadata=None):
|
|
62
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.GrpcAdapter/SendReceive',
|
|
63
|
+
flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.SerializeToString,
|
|
64
|
+
flwr_dot_proto_dot_grpcadapter__pb2.MessageContainer.FromString,
|
|
65
|
+
options, channel_credentials,
|
|
66
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import abc
|
|
6
|
+
import flwr.proto.grpcadapter_pb2
|
|
7
|
+
import grpc
|
|
8
|
+
|
|
9
|
+
class GrpcAdapterStub:
|
|
10
|
+
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
11
|
+
SendReceive: grpc.UnaryUnaryMultiCallable[
|
|
12
|
+
flwr.proto.grpcadapter_pb2.MessageContainer,
|
|
13
|
+
flwr.proto.grpcadapter_pb2.MessageContainer]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class GrpcAdapterServicer(metaclass=abc.ABCMeta):
|
|
17
|
+
@abc.abstractmethod
|
|
18
|
+
def SendReceive(self,
|
|
19
|
+
request: flwr.proto.grpcadapter_pb2.MessageContainer,
|
|
20
|
+
context: grpc.ServicerContext,
|
|
21
|
+
) -> flwr.proto.grpcadapter_pb2.MessageContainer: ...
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def add_GrpcAdapterServicer_to_server(servicer: GrpcAdapterServicer, server: grpc.Server) -> None: ...
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/message.proto
|
|
4
|
+
# Protobuf Python Version: 4.25.0
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from flwr.proto import error_pb2 as flwr_dot_proto_dot_error__pb2
|
|
16
|
+
from flwr.proto import recordset_pb2 as flwr_dot_proto_dot_recordset__pb2
|
|
17
|
+
from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/message.proto\x12\nflwr.proto\x1a\x16\x66lwr/proto/error.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x1a\x66lwr/proto/transport.proto\"{\n\x07Message\x12&\n\x08metadata\x18\x01 \x01(\x0b\x32\x14.flwr.proto.Metadata\x12&\n\x07\x63ontent\x18\x02 \x01(\x0b\x32\x15.flwr.proto.RecordSet\x12 \n\x05\x65rror\x18\x03 \x01(\x0b\x32\x11.flwr.proto.Error\"\xbf\x02\n\x07\x43ontext\x12\x0f\n\x07node_id\x18\x01 \x01(\x12\x12\x38\n\x0bnode_config\x18\x02 \x03(\x0b\x32#.flwr.proto.Context.NodeConfigEntry\x12$\n\x05state\x18\x03 \x01(\x0b\x32\x15.flwr.proto.RecordSet\x12\x36\n\nrun_config\x18\x04 \x03(\x0b\x32\".flwr.proto.Context.RunConfigEntry\x1a\x45\n\x0fNodeConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\x1a\x44\n\x0eRunConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"\xa7\x01\n\x08Metadata\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\x12\x12\n\nmessage_id\x18\x02 \x01(\t\x12\x13\n\x0bsrc_node_id\x18\x03 \x01(\x12\x12\x13\n\x0b\x64st_node_id\x18\x04 \x01(\x12\x12\x18\n\x10reply_to_message\x18\x05 \x01(\t\x12\x10\n\x08group_id\x18\x06 \x01(\t\x12\x0b\n\x03ttl\x18\x07 \x01(\x01\x12\x14\n\x0cmessage_type\x18\x08 \x01(\tb\x06proto3')
|
|
21
|
+
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.message_pb2', _globals)
|
|
25
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
|
+
DESCRIPTOR._options = None
|
|
27
|
+
_globals['_CONTEXT_NODECONFIGENTRY']._options = None
|
|
28
|
+
_globals['_CONTEXT_NODECONFIGENTRY']._serialized_options = b'8\001'
|
|
29
|
+
_globals['_CONTEXT_RUNCONFIGENTRY']._options = None
|
|
30
|
+
_globals['_CONTEXT_RUNCONFIGENTRY']._serialized_options = b'8\001'
|
|
31
|
+
_globals['_MESSAGE']._serialized_start=120
|
|
32
|
+
_globals['_MESSAGE']._serialized_end=243
|
|
33
|
+
_globals['_CONTEXT']._serialized_start=246
|
|
34
|
+
_globals['_CONTEXT']._serialized_end=565
|
|
35
|
+
_globals['_CONTEXT_NODECONFIGENTRY']._serialized_start=426
|
|
36
|
+
_globals['_CONTEXT_NODECONFIGENTRY']._serialized_end=495
|
|
37
|
+
_globals['_CONTEXT_RUNCONFIGENTRY']._serialized_start=497
|
|
38
|
+
_globals['_CONTEXT_RUNCONFIGENTRY']._serialized_end=565
|
|
39
|
+
_globals['_METADATA']._serialized_start=568
|
|
40
|
+
_globals['_METADATA']._serialized_end=735
|
|
41
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import builtins
|
|
6
|
+
import flwr.proto.error_pb2
|
|
7
|
+
import flwr.proto.recordset_pb2
|
|
8
|
+
import flwr.proto.transport_pb2
|
|
9
|
+
import google.protobuf.descriptor
|
|
10
|
+
import google.protobuf.internal.containers
|
|
11
|
+
import google.protobuf.message
|
|
12
|
+
import typing
|
|
13
|
+
import typing_extensions
|
|
14
|
+
|
|
15
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
16
|
+
|
|
17
|
+
class Message(google.protobuf.message.Message):
|
|
18
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
19
|
+
METADATA_FIELD_NUMBER: builtins.int
|
|
20
|
+
CONTENT_FIELD_NUMBER: builtins.int
|
|
21
|
+
ERROR_FIELD_NUMBER: builtins.int
|
|
22
|
+
@property
|
|
23
|
+
def metadata(self) -> global___Metadata: ...
|
|
24
|
+
@property
|
|
25
|
+
def content(self) -> flwr.proto.recordset_pb2.RecordSet: ...
|
|
26
|
+
@property
|
|
27
|
+
def error(self) -> flwr.proto.error_pb2.Error: ...
|
|
28
|
+
def __init__(self,
|
|
29
|
+
*,
|
|
30
|
+
metadata: typing.Optional[global___Metadata] = ...,
|
|
31
|
+
content: typing.Optional[flwr.proto.recordset_pb2.RecordSet] = ...,
|
|
32
|
+
error: typing.Optional[flwr.proto.error_pb2.Error] = ...,
|
|
33
|
+
) -> None: ...
|
|
34
|
+
def HasField(self, field_name: typing_extensions.Literal["content",b"content","error",b"error","metadata",b"metadata"]) -> builtins.bool: ...
|
|
35
|
+
def ClearField(self, field_name: typing_extensions.Literal["content",b"content","error",b"error","metadata",b"metadata"]) -> None: ...
|
|
36
|
+
global___Message = Message
|
|
37
|
+
|
|
38
|
+
class Context(google.protobuf.message.Message):
|
|
39
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
40
|
+
class NodeConfigEntry(google.protobuf.message.Message):
|
|
41
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
42
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
43
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
44
|
+
key: typing.Text
|
|
45
|
+
@property
|
|
46
|
+
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
|
47
|
+
def __init__(self,
|
|
48
|
+
*,
|
|
49
|
+
key: typing.Text = ...,
|
|
50
|
+
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
|
51
|
+
) -> None: ...
|
|
52
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
53
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
54
|
+
|
|
55
|
+
class RunConfigEntry(google.protobuf.message.Message):
|
|
56
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
57
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
58
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
59
|
+
key: typing.Text
|
|
60
|
+
@property
|
|
61
|
+
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
|
62
|
+
def __init__(self,
|
|
63
|
+
*,
|
|
64
|
+
key: typing.Text = ...,
|
|
65
|
+
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
|
66
|
+
) -> None: ...
|
|
67
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
68
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
69
|
+
|
|
70
|
+
NODE_ID_FIELD_NUMBER: builtins.int
|
|
71
|
+
NODE_CONFIG_FIELD_NUMBER: builtins.int
|
|
72
|
+
STATE_FIELD_NUMBER: builtins.int
|
|
73
|
+
RUN_CONFIG_FIELD_NUMBER: builtins.int
|
|
74
|
+
node_id: builtins.int
|
|
75
|
+
@property
|
|
76
|
+
def node_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
|
77
|
+
@property
|
|
78
|
+
def state(self) -> flwr.proto.recordset_pb2.RecordSet: ...
|
|
79
|
+
@property
|
|
80
|
+
def run_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
|
81
|
+
def __init__(self,
|
|
82
|
+
*,
|
|
83
|
+
node_id: builtins.int = ...,
|
|
84
|
+
node_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
|
85
|
+
state: typing.Optional[flwr.proto.recordset_pb2.RecordSet] = ...,
|
|
86
|
+
run_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
|
87
|
+
) -> None: ...
|
|
88
|
+
def HasField(self, field_name: typing_extensions.Literal["state",b"state"]) -> builtins.bool: ...
|
|
89
|
+
def ClearField(self, field_name: typing_extensions.Literal["node_config",b"node_config","node_id",b"node_id","run_config",b"run_config","state",b"state"]) -> None: ...
|
|
90
|
+
global___Context = Context
|
|
91
|
+
|
|
92
|
+
class Metadata(google.protobuf.message.Message):
|
|
93
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
94
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
|
95
|
+
MESSAGE_ID_FIELD_NUMBER: builtins.int
|
|
96
|
+
SRC_NODE_ID_FIELD_NUMBER: builtins.int
|
|
97
|
+
DST_NODE_ID_FIELD_NUMBER: builtins.int
|
|
98
|
+
REPLY_TO_MESSAGE_FIELD_NUMBER: builtins.int
|
|
99
|
+
GROUP_ID_FIELD_NUMBER: builtins.int
|
|
100
|
+
TTL_FIELD_NUMBER: builtins.int
|
|
101
|
+
MESSAGE_TYPE_FIELD_NUMBER: builtins.int
|
|
102
|
+
run_id: builtins.int
|
|
103
|
+
message_id: typing.Text
|
|
104
|
+
src_node_id: builtins.int
|
|
105
|
+
dst_node_id: builtins.int
|
|
106
|
+
reply_to_message: typing.Text
|
|
107
|
+
group_id: typing.Text
|
|
108
|
+
ttl: builtins.float
|
|
109
|
+
message_type: typing.Text
|
|
110
|
+
def __init__(self,
|
|
111
|
+
*,
|
|
112
|
+
run_id: builtins.int = ...,
|
|
113
|
+
message_id: typing.Text = ...,
|
|
114
|
+
src_node_id: builtins.int = ...,
|
|
115
|
+
dst_node_id: builtins.int = ...,
|
|
116
|
+
reply_to_message: typing.Text = ...,
|
|
117
|
+
group_id: typing.Text = ...,
|
|
118
|
+
ttl: builtins.float = ...,
|
|
119
|
+
message_type: typing.Text = ...,
|
|
120
|
+
) -> None: ...
|
|
121
|
+
def ClearField(self, field_name: typing_extensions.Literal["dst_node_id",b"dst_node_id","group_id",b"group_id","message_id",b"message_id","message_type",b"message_type","reply_to_message",b"reply_to_message","run_id",b"run_id","src_node_id",b"src_node_id","ttl",b"ttl"]) -> None: ...
|
|
122
|
+
global___Metadata = Metadata
|
flwr/proto/run_pb2.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/run.proto
|
|
4
|
+
# Protobuf Python Version: 4.25.0
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xd5\x01\n\x03Run\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\x12\x0e\n\x06\x66\x61\x62_id\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x03 \x01(\t\x12<\n\x0foverride_config\x18\x04 \x03(\x0b\x32#.flwr.proto.Run.OverrideConfigEntry\x12\x10\n\x08\x66\x61\x62_hash\x18\x05 \x01(\t\x1aI\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"\x1f\n\rGetRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\".\n\x0eGetRunResponse\x12\x1c\n\x03run\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Runb\x06proto3')
|
|
19
|
+
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.run_pb2', _globals)
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
DESCRIPTOR._options = None
|
|
25
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._options = None
|
|
26
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
27
|
+
_globals['_RUN']._serialized_start=65
|
|
28
|
+
_globals['_RUN']._serialized_end=278
|
|
29
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_start=205
|
|
30
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_end=278
|
|
31
|
+
_globals['_GETRUNREQUEST']._serialized_start=280
|
|
32
|
+
_globals['_GETRUNREQUEST']._serialized_end=311
|
|
33
|
+
_globals['_GETRUNRESPONSE']._serialized_start=313
|
|
34
|
+
_globals['_GETRUNRESPONSE']._serialized_end=359
|
|
35
|
+
# @@protoc_insertion_point(module_scope)
|