flwr-nightly 1.8.0.dev20240315__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.dev20240315.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.dev20240315.dist-info/RECORD +0 -211
- flwr_nightly-1.8.0.dev20240315.dist-info/entry_points.txt +0 -9
- {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.11.0.dev20240813.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.11.0.dev20240813.dist-info}/WHEEL +0 -0
flwr/proto/driver_pb2.pyi
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
5
|
import builtins
|
|
6
|
+
import flwr.proto.fab_pb2
|
|
6
7
|
import flwr.proto.node_pb2
|
|
7
8
|
import flwr.proto.task_pb2
|
|
9
|
+
import flwr.proto.transport_pb2
|
|
8
10
|
import google.protobuf.descriptor
|
|
9
11
|
import google.protobuf.internal.containers
|
|
10
12
|
import google.protobuf.message
|
|
@@ -16,8 +18,40 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
|
16
18
|
class CreateRunRequest(google.protobuf.message.Message):
|
|
17
19
|
"""CreateRun"""
|
|
18
20
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
21
|
+
class OverrideConfigEntry(google.protobuf.message.Message):
|
|
22
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
23
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
24
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
25
|
+
key: typing.Text
|
|
26
|
+
@property
|
|
27
|
+
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
|
28
|
+
def __init__(self,
|
|
29
|
+
*,
|
|
30
|
+
key: typing.Text = ...,
|
|
31
|
+
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
|
32
|
+
) -> None: ...
|
|
33
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
34
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
35
|
+
|
|
36
|
+
FAB_ID_FIELD_NUMBER: builtins.int
|
|
37
|
+
FAB_VERSION_FIELD_NUMBER: builtins.int
|
|
38
|
+
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
|
39
|
+
FAB_FIELD_NUMBER: builtins.int
|
|
40
|
+
fab_id: typing.Text
|
|
41
|
+
fab_version: typing.Text
|
|
42
|
+
@property
|
|
43
|
+
def override_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
|
44
|
+
@property
|
|
45
|
+
def fab(self) -> flwr.proto.fab_pb2.Fab: ...
|
|
19
46
|
def __init__(self,
|
|
47
|
+
*,
|
|
48
|
+
fab_id: typing.Text = ...,
|
|
49
|
+
fab_version: typing.Text = ...,
|
|
50
|
+
override_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
|
51
|
+
fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
|
|
20
52
|
) -> None: ...
|
|
53
|
+
def HasField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> builtins.bool: ...
|
|
54
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab",b"fab","fab_id",b"fab_id","fab_version",b"fab_version","override_config",b"override_config"]) -> None: ...
|
|
21
55
|
global___CreateRunRequest = CreateRunRequest
|
|
22
56
|
|
|
23
57
|
class CreateRunResponse(google.protobuf.message.Message):
|
flwr/proto/driver_pb2_grpc.py
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import grpc
|
|
4
4
|
|
|
5
5
|
from flwr.proto import driver_pb2 as flwr_dot_proto_dot_driver__pb2
|
|
6
|
+
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
7
|
+
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
class DriverStub(object):
|
|
@@ -34,6 +36,16 @@ class DriverStub(object):
|
|
|
34
36
|
request_serializer=flwr_dot_proto_dot_driver__pb2.PullTaskResRequest.SerializeToString,
|
|
35
37
|
response_deserializer=flwr_dot_proto_dot_driver__pb2.PullTaskResResponse.FromString,
|
|
36
38
|
)
|
|
39
|
+
self.GetRun = channel.unary_unary(
|
|
40
|
+
'/flwr.proto.Driver/GetRun',
|
|
41
|
+
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
42
|
+
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
43
|
+
)
|
|
44
|
+
self.GetFab = channel.unary_unary(
|
|
45
|
+
'/flwr.proto.Driver/GetFab',
|
|
46
|
+
request_serializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
|
|
47
|
+
response_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
|
|
48
|
+
)
|
|
37
49
|
|
|
38
50
|
|
|
39
51
|
class DriverServicer(object):
|
|
@@ -67,6 +79,20 @@ class DriverServicer(object):
|
|
|
67
79
|
context.set_details('Method not implemented!')
|
|
68
80
|
raise NotImplementedError('Method not implemented!')
|
|
69
81
|
|
|
82
|
+
def GetRun(self, request, context):
|
|
83
|
+
"""Get run details
|
|
84
|
+
"""
|
|
85
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
86
|
+
context.set_details('Method not implemented!')
|
|
87
|
+
raise NotImplementedError('Method not implemented!')
|
|
88
|
+
|
|
89
|
+
def GetFab(self, request, context):
|
|
90
|
+
"""Get FAB
|
|
91
|
+
"""
|
|
92
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
93
|
+
context.set_details('Method not implemented!')
|
|
94
|
+
raise NotImplementedError('Method not implemented!')
|
|
95
|
+
|
|
70
96
|
|
|
71
97
|
def add_DriverServicer_to_server(servicer, server):
|
|
72
98
|
rpc_method_handlers = {
|
|
@@ -90,6 +116,16 @@ def add_DriverServicer_to_server(servicer, server):
|
|
|
90
116
|
request_deserializer=flwr_dot_proto_dot_driver__pb2.PullTaskResRequest.FromString,
|
|
91
117
|
response_serializer=flwr_dot_proto_dot_driver__pb2.PullTaskResResponse.SerializeToString,
|
|
92
118
|
),
|
|
119
|
+
'GetRun': grpc.unary_unary_rpc_method_handler(
|
|
120
|
+
servicer.GetRun,
|
|
121
|
+
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunRequest.FromString,
|
|
122
|
+
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunResponse.SerializeToString,
|
|
123
|
+
),
|
|
124
|
+
'GetFab': grpc.unary_unary_rpc_method_handler(
|
|
125
|
+
servicer.GetFab,
|
|
126
|
+
request_deserializer=flwr_dot_proto_dot_fab__pb2.GetFabRequest.FromString,
|
|
127
|
+
response_serializer=flwr_dot_proto_dot_fab__pb2.GetFabResponse.SerializeToString,
|
|
128
|
+
),
|
|
93
129
|
}
|
|
94
130
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
95
131
|
'flwr.proto.Driver', rpc_method_handlers)
|
|
@@ -167,3 +203,37 @@ class Driver(object):
|
|
|
167
203
|
flwr_dot_proto_dot_driver__pb2.PullTaskResResponse.FromString,
|
|
168
204
|
options, channel_credentials,
|
|
169
205
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
206
|
+
|
|
207
|
+
@staticmethod
|
|
208
|
+
def GetRun(request,
|
|
209
|
+
target,
|
|
210
|
+
options=(),
|
|
211
|
+
channel_credentials=None,
|
|
212
|
+
call_credentials=None,
|
|
213
|
+
insecure=False,
|
|
214
|
+
compression=None,
|
|
215
|
+
wait_for_ready=None,
|
|
216
|
+
timeout=None,
|
|
217
|
+
metadata=None):
|
|
218
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Driver/GetRun',
|
|
219
|
+
flwr_dot_proto_dot_run__pb2.GetRunRequest.SerializeToString,
|
|
220
|
+
flwr_dot_proto_dot_run__pb2.GetRunResponse.FromString,
|
|
221
|
+
options, channel_credentials,
|
|
222
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
223
|
+
|
|
224
|
+
@staticmethod
|
|
225
|
+
def GetFab(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.Driver/GetFab',
|
|
236
|
+
flwr_dot_proto_dot_fab__pb2.GetFabRequest.SerializeToString,
|
|
237
|
+
flwr_dot_proto_dot_fab__pb2.GetFabResponse.FromString,
|
|
238
|
+
options, channel_credentials,
|
|
239
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
flwr/proto/driver_pb2_grpc.pyi
CHANGED
|
@@ -4,6 +4,8 @@ isort:skip_file
|
|
|
4
4
|
"""
|
|
5
5
|
import abc
|
|
6
6
|
import flwr.proto.driver_pb2
|
|
7
|
+
import flwr.proto.fab_pb2
|
|
8
|
+
import flwr.proto.run_pb2
|
|
7
9
|
import grpc
|
|
8
10
|
|
|
9
11
|
class DriverStub:
|
|
@@ -28,6 +30,16 @@ class DriverStub:
|
|
|
28
30
|
flwr.proto.driver_pb2.PullTaskResResponse]
|
|
29
31
|
"""Get task results"""
|
|
30
32
|
|
|
33
|
+
GetRun: grpc.UnaryUnaryMultiCallable[
|
|
34
|
+
flwr.proto.run_pb2.GetRunRequest,
|
|
35
|
+
flwr.proto.run_pb2.GetRunResponse]
|
|
36
|
+
"""Get run details"""
|
|
37
|
+
|
|
38
|
+
GetFab: grpc.UnaryUnaryMultiCallable[
|
|
39
|
+
flwr.proto.fab_pb2.GetFabRequest,
|
|
40
|
+
flwr.proto.fab_pb2.GetFabResponse]
|
|
41
|
+
"""Get FAB"""
|
|
42
|
+
|
|
31
43
|
|
|
32
44
|
class DriverServicer(metaclass=abc.ABCMeta):
|
|
33
45
|
@abc.abstractmethod
|
|
@@ -62,5 +74,21 @@ class DriverServicer(metaclass=abc.ABCMeta):
|
|
|
62
74
|
"""Get task results"""
|
|
63
75
|
pass
|
|
64
76
|
|
|
77
|
+
@abc.abstractmethod
|
|
78
|
+
def GetRun(self,
|
|
79
|
+
request: flwr.proto.run_pb2.GetRunRequest,
|
|
80
|
+
context: grpc.ServicerContext,
|
|
81
|
+
) -> flwr.proto.run_pb2.GetRunResponse:
|
|
82
|
+
"""Get run details"""
|
|
83
|
+
pass
|
|
84
|
+
|
|
85
|
+
@abc.abstractmethod
|
|
86
|
+
def GetFab(self,
|
|
87
|
+
request: flwr.proto.fab_pb2.GetFabRequest,
|
|
88
|
+
context: grpc.ServicerContext,
|
|
89
|
+
) -> flwr.proto.fab_pb2.GetFabResponse:
|
|
90
|
+
"""Get FAB"""
|
|
91
|
+
pass
|
|
92
|
+
|
|
65
93
|
|
|
66
94
|
def add_DriverServicer_to_server(servicer: DriverServicer, server: grpc.Server) -> None: ...
|
flwr/proto/exec_pb2.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/exec.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\x15\x66lwr/proto/exec.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xd3\x02\n\x0fStartRunRequest\x12\x10\n\x08\x66\x61\x62_file\x18\x01 \x01(\x0c\x12H\n\x0foverride_config\x18\x02 \x03(\x0b\x32/.flwr.proto.StartRunRequest.OverrideConfigEntry\x12L\n\x11\x66\x65\x64\x65ration_config\x18\x03 \x03(\x0b\x32\x31.flwr.proto.StartRunRequest.FederationConfigEntry\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\x1aK\n\x15\x46\x65\x64\x65rationConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.flwr.proto.Scalar:\x02\x38\x01\"\"\n\x10StartRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"#\n\x11StreamLogsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"(\n\x12StreamLogsResponse\x12\x12\n\nlog_output\x18\x01 \x01(\t2\xa0\x01\n\x04\x45xec\x12G\n\x08StartRun\x12\x1b.flwr.proto.StartRunRequest\x1a\x1c.flwr.proto.StartRunResponse\"\x00\x12O\n\nStreamLogs\x12\x1d.flwr.proto.StreamLogsRequest\x1a\x1e.flwr.proto.StreamLogsResponse\"\x00\x30\x01\x62\x06proto3')
|
|
19
|
+
|
|
20
|
+
_globals = globals()
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.exec_pb2', _globals)
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
DESCRIPTOR._options = None
|
|
25
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._options = None
|
|
26
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
27
|
+
_globals['_STARTRUNREQUEST_FEDERATIONCONFIGENTRY']._options = None
|
|
28
|
+
_globals['_STARTRUNREQUEST_FEDERATIONCONFIGENTRY']._serialized_options = b'8\001'
|
|
29
|
+
_globals['_STARTRUNREQUEST']._serialized_start=66
|
|
30
|
+
_globals['_STARTRUNREQUEST']._serialized_end=405
|
|
31
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=255
|
|
32
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=328
|
|
33
|
+
_globals['_STARTRUNREQUEST_FEDERATIONCONFIGENTRY']._serialized_start=330
|
|
34
|
+
_globals['_STARTRUNREQUEST_FEDERATIONCONFIGENTRY']._serialized_end=405
|
|
35
|
+
_globals['_STARTRUNRESPONSE']._serialized_start=407
|
|
36
|
+
_globals['_STARTRUNRESPONSE']._serialized_end=441
|
|
37
|
+
_globals['_STREAMLOGSREQUEST']._serialized_start=443
|
|
38
|
+
_globals['_STREAMLOGSREQUEST']._serialized_end=478
|
|
39
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_start=480
|
|
40
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_end=520
|
|
41
|
+
_globals['_EXEC']._serialized_start=523
|
|
42
|
+
_globals['_EXEC']._serialized_end=683
|
|
43
|
+
# @@protoc_insertion_point(module_scope)
|
flwr/proto/exec_pb2.pyi
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import builtins
|
|
6
|
+
import flwr.proto.transport_pb2
|
|
7
|
+
import google.protobuf.descriptor
|
|
8
|
+
import google.protobuf.internal.containers
|
|
9
|
+
import google.protobuf.message
|
|
10
|
+
import typing
|
|
11
|
+
import typing_extensions
|
|
12
|
+
|
|
13
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
14
|
+
|
|
15
|
+
class StartRunRequest(google.protobuf.message.Message):
|
|
16
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
17
|
+
class OverrideConfigEntry(google.protobuf.message.Message):
|
|
18
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
19
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
20
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
21
|
+
key: typing.Text
|
|
22
|
+
@property
|
|
23
|
+
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
|
24
|
+
def __init__(self,
|
|
25
|
+
*,
|
|
26
|
+
key: typing.Text = ...,
|
|
27
|
+
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
|
28
|
+
) -> None: ...
|
|
29
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
30
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
31
|
+
|
|
32
|
+
class FederationConfigEntry(google.protobuf.message.Message):
|
|
33
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
34
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
35
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
36
|
+
key: typing.Text
|
|
37
|
+
@property
|
|
38
|
+
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
|
39
|
+
def __init__(self,
|
|
40
|
+
*,
|
|
41
|
+
key: typing.Text = ...,
|
|
42
|
+
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
|
43
|
+
) -> None: ...
|
|
44
|
+
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
|
45
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
46
|
+
|
|
47
|
+
FAB_FILE_FIELD_NUMBER: builtins.int
|
|
48
|
+
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
|
49
|
+
FEDERATION_CONFIG_FIELD_NUMBER: builtins.int
|
|
50
|
+
fab_file: builtins.bytes
|
|
51
|
+
@property
|
|
52
|
+
def override_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
|
53
|
+
@property
|
|
54
|
+
def federation_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
|
55
|
+
def __init__(self,
|
|
56
|
+
*,
|
|
57
|
+
fab_file: builtins.bytes = ...,
|
|
58
|
+
override_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
|
59
|
+
federation_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
|
60
|
+
) -> None: ...
|
|
61
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab_file",b"fab_file","federation_config",b"federation_config","override_config",b"override_config"]) -> None: ...
|
|
62
|
+
global___StartRunRequest = StartRunRequest
|
|
63
|
+
|
|
64
|
+
class StartRunResponse(google.protobuf.message.Message):
|
|
65
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
66
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
|
67
|
+
run_id: builtins.int
|
|
68
|
+
def __init__(self,
|
|
69
|
+
*,
|
|
70
|
+
run_id: builtins.int = ...,
|
|
71
|
+
) -> None: ...
|
|
72
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
|
73
|
+
global___StartRunResponse = StartRunResponse
|
|
74
|
+
|
|
75
|
+
class StreamLogsRequest(google.protobuf.message.Message):
|
|
76
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
77
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
|
78
|
+
run_id: builtins.int
|
|
79
|
+
def __init__(self,
|
|
80
|
+
*,
|
|
81
|
+
run_id: builtins.int = ...,
|
|
82
|
+
) -> None: ...
|
|
83
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
|
84
|
+
global___StreamLogsRequest = StreamLogsRequest
|
|
85
|
+
|
|
86
|
+
class StreamLogsResponse(google.protobuf.message.Message):
|
|
87
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
88
|
+
LOG_OUTPUT_FIELD_NUMBER: builtins.int
|
|
89
|
+
log_output: typing.Text
|
|
90
|
+
def __init__(self,
|
|
91
|
+
*,
|
|
92
|
+
log_output: typing.Text = ...,
|
|
93
|
+
) -> None: ...
|
|
94
|
+
def ClearField(self, field_name: typing_extensions.Literal["log_output",b"log_output"]) -> None: ...
|
|
95
|
+
global___StreamLogsResponse = StreamLogsResponse
|
|
@@ -0,0 +1,101 @@
|
|
|
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 exec_pb2 as flwr_dot_proto_dot_exec__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ExecStub(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.StartRun = channel.unary_unary(
|
|
18
|
+
'/flwr.proto.Exec/StartRun',
|
|
19
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.StartRunRequest.SerializeToString,
|
|
20
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.StartRunResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
self.StreamLogs = channel.unary_stream(
|
|
23
|
+
'/flwr.proto.Exec/StreamLogs',
|
|
24
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.StreamLogsRequest.SerializeToString,
|
|
25
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.StreamLogsResponse.FromString,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ExecServicer(object):
|
|
30
|
+
"""Missing associated documentation comment in .proto file."""
|
|
31
|
+
|
|
32
|
+
def StartRun(self, request, context):
|
|
33
|
+
"""Start run upon request
|
|
34
|
+
"""
|
|
35
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
36
|
+
context.set_details('Method not implemented!')
|
|
37
|
+
raise NotImplementedError('Method not implemented!')
|
|
38
|
+
|
|
39
|
+
def StreamLogs(self, request, context):
|
|
40
|
+
"""Start log stream upon request
|
|
41
|
+
"""
|
|
42
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
43
|
+
context.set_details('Method not implemented!')
|
|
44
|
+
raise NotImplementedError('Method not implemented!')
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def add_ExecServicer_to_server(servicer, server):
|
|
48
|
+
rpc_method_handlers = {
|
|
49
|
+
'StartRun': grpc.unary_unary_rpc_method_handler(
|
|
50
|
+
servicer.StartRun,
|
|
51
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.StartRunRequest.FromString,
|
|
52
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.StartRunResponse.SerializeToString,
|
|
53
|
+
),
|
|
54
|
+
'StreamLogs': grpc.unary_stream_rpc_method_handler(
|
|
55
|
+
servicer.StreamLogs,
|
|
56
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.StreamLogsRequest.FromString,
|
|
57
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.StreamLogsResponse.SerializeToString,
|
|
58
|
+
),
|
|
59
|
+
}
|
|
60
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
61
|
+
'flwr.proto.Exec', rpc_method_handlers)
|
|
62
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# This class is part of an EXPERIMENTAL API.
|
|
66
|
+
class Exec(object):
|
|
67
|
+
"""Missing associated documentation comment in .proto file."""
|
|
68
|
+
|
|
69
|
+
@staticmethod
|
|
70
|
+
def StartRun(request,
|
|
71
|
+
target,
|
|
72
|
+
options=(),
|
|
73
|
+
channel_credentials=None,
|
|
74
|
+
call_credentials=None,
|
|
75
|
+
insecure=False,
|
|
76
|
+
compression=None,
|
|
77
|
+
wait_for_ready=None,
|
|
78
|
+
timeout=None,
|
|
79
|
+
metadata=None):
|
|
80
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Exec/StartRun',
|
|
81
|
+
flwr_dot_proto_dot_exec__pb2.StartRunRequest.SerializeToString,
|
|
82
|
+
flwr_dot_proto_dot_exec__pb2.StartRunResponse.FromString,
|
|
83
|
+
options, channel_credentials,
|
|
84
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
85
|
+
|
|
86
|
+
@staticmethod
|
|
87
|
+
def StreamLogs(request,
|
|
88
|
+
target,
|
|
89
|
+
options=(),
|
|
90
|
+
channel_credentials=None,
|
|
91
|
+
call_credentials=None,
|
|
92
|
+
insecure=False,
|
|
93
|
+
compression=None,
|
|
94
|
+
wait_for_ready=None,
|
|
95
|
+
timeout=None,
|
|
96
|
+
metadata=None):
|
|
97
|
+
return grpc.experimental.unary_stream(request, target, '/flwr.proto.Exec/StreamLogs',
|
|
98
|
+
flwr_dot_proto_dot_exec__pb2.StreamLogsRequest.SerializeToString,
|
|
99
|
+
flwr_dot_proto_dot_exec__pb2.StreamLogsResponse.FromString,
|
|
100
|
+
options, channel_credentials,
|
|
101
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import abc
|
|
6
|
+
import flwr.proto.exec_pb2
|
|
7
|
+
import grpc
|
|
8
|
+
import typing
|
|
9
|
+
|
|
10
|
+
class ExecStub:
|
|
11
|
+
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
12
|
+
StartRun: grpc.UnaryUnaryMultiCallable[
|
|
13
|
+
flwr.proto.exec_pb2.StartRunRequest,
|
|
14
|
+
flwr.proto.exec_pb2.StartRunResponse]
|
|
15
|
+
"""Start run upon request"""
|
|
16
|
+
|
|
17
|
+
StreamLogs: grpc.UnaryStreamMultiCallable[
|
|
18
|
+
flwr.proto.exec_pb2.StreamLogsRequest,
|
|
19
|
+
flwr.proto.exec_pb2.StreamLogsResponse]
|
|
20
|
+
"""Start log stream upon request"""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ExecServicer(metaclass=abc.ABCMeta):
|
|
24
|
+
@abc.abstractmethod
|
|
25
|
+
def StartRun(self,
|
|
26
|
+
request: flwr.proto.exec_pb2.StartRunRequest,
|
|
27
|
+
context: grpc.ServicerContext,
|
|
28
|
+
) -> flwr.proto.exec_pb2.StartRunResponse:
|
|
29
|
+
"""Start run upon request"""
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
@abc.abstractmethod
|
|
33
|
+
def StreamLogs(self,
|
|
34
|
+
request: flwr.proto.exec_pb2.StreamLogsRequest,
|
|
35
|
+
context: grpc.ServicerContext,
|
|
36
|
+
) -> typing.Iterator[flwr.proto.exec_pb2.StreamLogsResponse]:
|
|
37
|
+
"""Start log stream upon request"""
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def add_ExecServicer_to_server(servicer: ExecServicer, server: grpc.Server) -> None: ...
|
flwr/proto/fab_pb2.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/fab.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\x14\x66lwr/proto/fab.proto\x12\nflwr.proto\"(\n\x03\x46\x61\x62\x12\x10\n\x08hash_str\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"!\n\rGetFabRequest\x12\x10\n\x08hash_str\x18\x01 \x01(\t\".\n\x0eGetFabResponse\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fabb\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.fab_pb2', _globals)
|
|
22
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
+
DESCRIPTOR._options = None
|
|
24
|
+
_globals['_FAB']._serialized_start=36
|
|
25
|
+
_globals['_FAB']._serialized_end=76
|
|
26
|
+
_globals['_GETFABREQUEST']._serialized_start=78
|
|
27
|
+
_globals['_GETFABREQUEST']._serialized_end=111
|
|
28
|
+
_globals['_GETFABRESPONSE']._serialized_start=113
|
|
29
|
+
_globals['_GETFABRESPONSE']._serialized_end=159
|
|
30
|
+
# @@protoc_insertion_point(module_scope)
|
flwr/proto/fab_pb2.pyi
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
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.message
|
|
8
|
+
import typing
|
|
9
|
+
import typing_extensions
|
|
10
|
+
|
|
11
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
12
|
+
|
|
13
|
+
class Fab(google.protobuf.message.Message):
|
|
14
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
15
|
+
HASH_STR_FIELD_NUMBER: builtins.int
|
|
16
|
+
CONTENT_FIELD_NUMBER: builtins.int
|
|
17
|
+
hash_str: typing.Text
|
|
18
|
+
"""This field is the hash of the data field. It is used to identify the data.
|
|
19
|
+
The hash is calculated using the SHA-256 algorithm and is represented as a
|
|
20
|
+
hex string (sha256hex).
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
content: builtins.bytes
|
|
24
|
+
"""This field contains the fab file contents a one bytes blob."""
|
|
25
|
+
|
|
26
|
+
def __init__(self,
|
|
27
|
+
*,
|
|
28
|
+
hash_str: typing.Text = ...,
|
|
29
|
+
content: builtins.bytes = ...,
|
|
30
|
+
) -> None: ...
|
|
31
|
+
def ClearField(self, field_name: typing_extensions.Literal["content",b"content","hash_str",b"hash_str"]) -> None: ...
|
|
32
|
+
global___Fab = Fab
|
|
33
|
+
|
|
34
|
+
class GetFabRequest(google.protobuf.message.Message):
|
|
35
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
36
|
+
HASH_STR_FIELD_NUMBER: builtins.int
|
|
37
|
+
hash_str: typing.Text
|
|
38
|
+
def __init__(self,
|
|
39
|
+
*,
|
|
40
|
+
hash_str: typing.Text = ...,
|
|
41
|
+
) -> None: ...
|
|
42
|
+
def ClearField(self, field_name: typing_extensions.Literal["hash_str",b"hash_str"]) -> None: ...
|
|
43
|
+
global___GetFabRequest = GetFabRequest
|
|
44
|
+
|
|
45
|
+
class GetFabResponse(google.protobuf.message.Message):
|
|
46
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
47
|
+
FAB_FIELD_NUMBER: builtins.int
|
|
48
|
+
@property
|
|
49
|
+
def fab(self) -> global___Fab: ...
|
|
50
|
+
def __init__(self,
|
|
51
|
+
*,
|
|
52
|
+
fab: typing.Optional[global___Fab] = ...,
|
|
53
|
+
) -> None: ...
|
|
54
|
+
def HasField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> builtins.bool: ...
|
|
55
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> None: ...
|
|
56
|
+
global___GetFabResponse = GetFabResponse
|
flwr/proto/fleet_pb2.py
CHANGED
|
@@ -14,9 +14,11 @@ _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
|
|
17
19
|
|
|
18
20
|
|
|
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\
|
|
21
|
+
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\"*\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*\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\x8c\x04\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\x12P\n\x0bPushTaskRes\x12\x1e.flwr.proto.PushTaskResRequest\x1a\x1f.flwr.proto.PushTaskResResponse\"\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
22
|
|
|
21
23
|
_globals = globals()
|
|
22
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -25,26 +27,30 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
25
27
|
DESCRIPTOR._options = None
|
|
26
28
|
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._options = None
|
|
27
29
|
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_options = b'8\001'
|
|
28
|
-
_globals['_CREATENODEREQUEST']._serialized_start=
|
|
29
|
-
_globals['_CREATENODEREQUEST']._serialized_end=
|
|
30
|
-
_globals['_CREATENODERESPONSE']._serialized_start=
|
|
31
|
-
_globals['_CREATENODERESPONSE']._serialized_end=
|
|
32
|
-
_globals['_DELETENODEREQUEST']._serialized_start=
|
|
33
|
-
_globals['_DELETENODEREQUEST']._serialized_end=
|
|
34
|
-
_globals['_DELETENODERESPONSE']._serialized_start=
|
|
35
|
-
_globals['_DELETENODERESPONSE']._serialized_end=
|
|
36
|
-
_globals['
|
|
37
|
-
_globals['
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
44
|
-
_globals['
|
|
45
|
-
_globals['
|
|
46
|
-
_globals['
|
|
47
|
-
_globals['
|
|
48
|
-
_globals['
|
|
49
|
-
_globals['
|
|
30
|
+
_globals['_CREATENODEREQUEST']._serialized_start=128
|
|
31
|
+
_globals['_CREATENODEREQUEST']._serialized_end=170
|
|
32
|
+
_globals['_CREATENODERESPONSE']._serialized_start=172
|
|
33
|
+
_globals['_CREATENODERESPONSE']._serialized_end=224
|
|
34
|
+
_globals['_DELETENODEREQUEST']._serialized_start=226
|
|
35
|
+
_globals['_DELETENODEREQUEST']._serialized_end=277
|
|
36
|
+
_globals['_DELETENODERESPONSE']._serialized_start=279
|
|
37
|
+
_globals['_DELETENODERESPONSE']._serialized_end=299
|
|
38
|
+
_globals['_PINGREQUEST']._serialized_start=301
|
|
39
|
+
_globals['_PINGREQUEST']._serialized_end=369
|
|
40
|
+
_globals['_PINGRESPONSE']._serialized_start=371
|
|
41
|
+
_globals['_PINGRESPONSE']._serialized_end=402
|
|
42
|
+
_globals['_PULLTASKINSREQUEST']._serialized_start=404
|
|
43
|
+
_globals['_PULLTASKINSREQUEST']._serialized_end=474
|
|
44
|
+
_globals['_PULLTASKINSRESPONSE']._serialized_start=476
|
|
45
|
+
_globals['_PULLTASKINSRESPONSE']._serialized_end=583
|
|
46
|
+
_globals['_PUSHTASKRESREQUEST']._serialized_start=585
|
|
47
|
+
_globals['_PUSHTASKRESREQUEST']._serialized_end=649
|
|
48
|
+
_globals['_PUSHTASKRESRESPONSE']._serialized_start=652
|
|
49
|
+
_globals['_PUSHTASKRESRESPONSE']._serialized_end=826
|
|
50
|
+
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_start=780
|
|
51
|
+
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_end=826
|
|
52
|
+
_globals['_RECONNECT']._serialized_start=828
|
|
53
|
+
_globals['_RECONNECT']._serialized_end=858
|
|
54
|
+
_globals['_FLEET']._serialized_start=861
|
|
55
|
+
_globals['_FLEET']._serialized_end=1385
|
|
50
56
|
# @@protoc_insertion_point(module_scope)
|