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/common/telemetry.py
CHANGED
|
@@ -64,6 +64,18 @@ def _get_home() -> Path:
|
|
|
64
64
|
return Path().home()
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
def _get_partner_id() -> str:
|
|
68
|
+
"""Get partner ID."""
|
|
69
|
+
partner_id = os.getenv("FLWR_TELEMETRY_PARTNER_ID")
|
|
70
|
+
if not partner_id:
|
|
71
|
+
return "unavailable"
|
|
72
|
+
try:
|
|
73
|
+
uuid.UUID(partner_id)
|
|
74
|
+
except ValueError:
|
|
75
|
+
partner_id = "invalid"
|
|
76
|
+
return partner_id
|
|
77
|
+
|
|
78
|
+
|
|
67
79
|
def _get_source_id() -> str:
|
|
68
80
|
"""Get existing or new source ID."""
|
|
69
81
|
source_id = "unavailable"
|
|
@@ -160,6 +172,14 @@ class EventType(str, Enum):
|
|
|
160
172
|
RUN_SERVER_APP_ENTER = auto()
|
|
161
173
|
RUN_SERVER_APP_LEAVE = auto()
|
|
162
174
|
|
|
175
|
+
# SuperNode
|
|
176
|
+
RUN_SUPERNODE_ENTER = auto()
|
|
177
|
+
RUN_SUPERNODE_LEAVE = auto()
|
|
178
|
+
|
|
179
|
+
# SuperExec
|
|
180
|
+
RUN_SUPEREXEC_ENTER = auto()
|
|
181
|
+
RUN_SUPEREXEC_LEAVE = auto()
|
|
182
|
+
|
|
163
183
|
|
|
164
184
|
# Use the ThreadPoolExecutor with max_workers=1 to have a queue
|
|
165
185
|
# and also ensure that telemetry calls are not blocking.
|
|
@@ -169,6 +189,7 @@ state: Dict[str, Union[Optional[str], Optional[ThreadPoolExecutor]]] = {
|
|
|
169
189
|
"executor": None,
|
|
170
190
|
"source": None,
|
|
171
191
|
"cluster": None,
|
|
192
|
+
"partner": None,
|
|
172
193
|
}
|
|
173
194
|
|
|
174
195
|
|
|
@@ -194,11 +215,15 @@ def create_event(event_type: EventType, event_details: Optional[Dict[str, Any]])
|
|
|
194
215
|
if state["cluster"] is None:
|
|
195
216
|
state["cluster"] = str(uuid.uuid4())
|
|
196
217
|
|
|
218
|
+
if state["partner"] is None:
|
|
219
|
+
state["partner"] = _get_partner_id()
|
|
220
|
+
|
|
197
221
|
if event_details is None:
|
|
198
222
|
event_details = {}
|
|
199
223
|
|
|
200
224
|
date = datetime.datetime.now(tz=datetime.timezone.utc).isoformat()
|
|
201
225
|
context = {
|
|
226
|
+
"partner": state["partner"],
|
|
202
227
|
"source": state["source"],
|
|
203
228
|
"cluster": state["cluster"],
|
|
204
229
|
"date": date,
|
flwr/common/typing.py
CHANGED
|
@@ -60,6 +60,10 @@ MetricsAggregationFn = Callable[[List[Tuple[int, Metrics]]], Metrics]
|
|
|
60
60
|
Config = Dict[str, Scalar]
|
|
61
61
|
Properties = Dict[str, Scalar]
|
|
62
62
|
|
|
63
|
+
# Value type for user configs
|
|
64
|
+
UserConfigValue = Union[bool, float, int, str]
|
|
65
|
+
UserConfig = Dict[str, UserConfigValue]
|
|
66
|
+
|
|
63
67
|
|
|
64
68
|
class Code(Enum):
|
|
65
69
|
"""Client status codes."""
|
|
@@ -79,6 +83,22 @@ class Status:
|
|
|
79
83
|
message: str
|
|
80
84
|
|
|
81
85
|
|
|
86
|
+
class ClientAppOutputCode(Enum):
|
|
87
|
+
"""ClientAppIO status codes."""
|
|
88
|
+
|
|
89
|
+
SUCCESS = 0
|
|
90
|
+
DEADLINE_EXCEEDED = 1
|
|
91
|
+
UNKNOWN_ERROR = 2
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@dataclass
|
|
95
|
+
class ClientAppOutputStatus:
|
|
96
|
+
"""ClientAppIO status."""
|
|
97
|
+
|
|
98
|
+
code: ClientAppOutputCode
|
|
99
|
+
message: str
|
|
100
|
+
|
|
101
|
+
|
|
82
102
|
@dataclass
|
|
83
103
|
class Parameters:
|
|
84
104
|
"""Model parameters."""
|
|
@@ -185,3 +205,21 @@ class ClientMessage:
|
|
|
185
205
|
get_parameters_res: Optional[GetParametersRes] = None
|
|
186
206
|
fit_res: Optional[FitRes] = None
|
|
187
207
|
evaluate_res: Optional[EvaluateRes] = None
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
@dataclass
|
|
211
|
+
class Run:
|
|
212
|
+
"""Run details."""
|
|
213
|
+
|
|
214
|
+
run_id: int
|
|
215
|
+
fab_id: str
|
|
216
|
+
fab_version: str
|
|
217
|
+
override_config: UserConfig
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
@dataclass
|
|
221
|
+
class Fab:
|
|
222
|
+
"""Fab file representation."""
|
|
223
|
+
|
|
224
|
+
hash_str: str
|
|
225
|
+
content: bytes
|
flwr/common/version.py
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright 2023 Flower Labs GmbH. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# ==============================================================================
|
|
1
15
|
"""Flower package version helper."""
|
|
2
16
|
|
|
3
17
|
import importlib.metadata as importlib_metadata
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/clientappio.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 fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
16
|
+
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
17
|
+
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/clientappio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x18\x66lwr/proto/message.proto\"W\n\x15\x43lientAppOutputStatus\x12-\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x1f.flwr.proto.ClientAppOutputCode\x12\x0f\n\x07message\x18\x02 \x01(\t\"+\n\x1aPullClientAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\x12\"\x87\x01\n\x1bPullClientAppInputsResponse\x12$\n\x07message\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Message\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Run\"x\n\x1bPushClientAppOutputsRequest\x12\r\n\x05token\x18\x01 \x01(\x12\x12$\n\x07message\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Message\x12$\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x13.flwr.proto.Context\"Q\n\x1cPushClientAppOutputsResponse\x12\x31\n\x06status\x18\x01 \x01(\x0b\x32!.flwr.proto.ClientAppOutputStatus*L\n\x13\x43lientAppOutputCode\x12\x0b\n\x07SUCCESS\x10\x00\x12\x15\n\x11\x44\x45\x41\x44LINE_EXCEEDED\x10\x01\x12\x11\n\rUNKNOWN_ERROR\x10\x02\x32\xe4\x01\n\x0b\x43lientAppIo\x12h\n\x13PullClientAppInputs\x12&.flwr.proto.PullClientAppInputsRequest\x1a\'.flwr.proto.PullClientAppInputsResponse\"\x00\x12k\n\x14PushClientAppOutputs\x12\'.flwr.proto.PushClientAppOutputsRequest\x1a(.flwr.proto.PushClientAppOutputsResponse\"\x00\x62\x06proto3')
|
|
21
|
+
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.clientappio_pb2', _globals)
|
|
25
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
|
+
DESCRIPTOR._options = None
|
|
27
|
+
_globals['_CLIENTAPPOUTPUTCODE']._serialized_start=591
|
|
28
|
+
_globals['_CLIENTAPPOUTPUTCODE']._serialized_end=667
|
|
29
|
+
_globals['_CLIENTAPPOUTPUTSTATUS']._serialized_start=114
|
|
30
|
+
_globals['_CLIENTAPPOUTPUTSTATUS']._serialized_end=201
|
|
31
|
+
_globals['_PULLCLIENTAPPINPUTSREQUEST']._serialized_start=203
|
|
32
|
+
_globals['_PULLCLIENTAPPINPUTSREQUEST']._serialized_end=246
|
|
33
|
+
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_start=249
|
|
34
|
+
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_end=384
|
|
35
|
+
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_start=386
|
|
36
|
+
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_end=506
|
|
37
|
+
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_start=508
|
|
38
|
+
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_end=589
|
|
39
|
+
_globals['_CLIENTAPPIO']._serialized_start=670
|
|
40
|
+
_globals['_CLIENTAPPIO']._serialized_end=898
|
|
41
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import builtins
|
|
6
|
+
import flwr.proto.message_pb2
|
|
7
|
+
import flwr.proto.run_pb2
|
|
8
|
+
import google.protobuf.descriptor
|
|
9
|
+
import google.protobuf.internal.enum_type_wrapper
|
|
10
|
+
import google.protobuf.message
|
|
11
|
+
import typing
|
|
12
|
+
import typing_extensions
|
|
13
|
+
|
|
14
|
+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
15
|
+
|
|
16
|
+
class _ClientAppOutputCode:
|
|
17
|
+
ValueType = typing.NewType('ValueType', builtins.int)
|
|
18
|
+
V: typing_extensions.TypeAlias = ValueType
|
|
19
|
+
class _ClientAppOutputCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ClientAppOutputCode.ValueType], builtins.type):
|
|
20
|
+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
|
|
21
|
+
SUCCESS: _ClientAppOutputCode.ValueType # 0
|
|
22
|
+
DEADLINE_EXCEEDED: _ClientAppOutputCode.ValueType # 1
|
|
23
|
+
UNKNOWN_ERROR: _ClientAppOutputCode.ValueType # 2
|
|
24
|
+
class ClientAppOutputCode(_ClientAppOutputCode, metaclass=_ClientAppOutputCodeEnumTypeWrapper):
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
SUCCESS: ClientAppOutputCode.ValueType # 0
|
|
28
|
+
DEADLINE_EXCEEDED: ClientAppOutputCode.ValueType # 1
|
|
29
|
+
UNKNOWN_ERROR: ClientAppOutputCode.ValueType # 2
|
|
30
|
+
global___ClientAppOutputCode = ClientAppOutputCode
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ClientAppOutputStatus(google.protobuf.message.Message):
|
|
34
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
35
|
+
CODE_FIELD_NUMBER: builtins.int
|
|
36
|
+
MESSAGE_FIELD_NUMBER: builtins.int
|
|
37
|
+
code: global___ClientAppOutputCode.ValueType
|
|
38
|
+
message: typing.Text
|
|
39
|
+
def __init__(self,
|
|
40
|
+
*,
|
|
41
|
+
code: global___ClientAppOutputCode.ValueType = ...,
|
|
42
|
+
message: typing.Text = ...,
|
|
43
|
+
) -> None: ...
|
|
44
|
+
def ClearField(self, field_name: typing_extensions.Literal["code",b"code","message",b"message"]) -> None: ...
|
|
45
|
+
global___ClientAppOutputStatus = ClientAppOutputStatus
|
|
46
|
+
|
|
47
|
+
class PullClientAppInputsRequest(google.protobuf.message.Message):
|
|
48
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
49
|
+
TOKEN_FIELD_NUMBER: builtins.int
|
|
50
|
+
token: builtins.int
|
|
51
|
+
def __init__(self,
|
|
52
|
+
*,
|
|
53
|
+
token: builtins.int = ...,
|
|
54
|
+
) -> None: ...
|
|
55
|
+
def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
|
|
56
|
+
global___PullClientAppInputsRequest = PullClientAppInputsRequest
|
|
57
|
+
|
|
58
|
+
class PullClientAppInputsResponse(google.protobuf.message.Message):
|
|
59
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
60
|
+
MESSAGE_FIELD_NUMBER: builtins.int
|
|
61
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
62
|
+
RUN_FIELD_NUMBER: builtins.int
|
|
63
|
+
@property
|
|
64
|
+
def message(self) -> flwr.proto.message_pb2.Message: ...
|
|
65
|
+
@property
|
|
66
|
+
def context(self) -> flwr.proto.message_pb2.Context: ...
|
|
67
|
+
@property
|
|
68
|
+
def run(self) -> flwr.proto.run_pb2.Run: ...
|
|
69
|
+
def __init__(self,
|
|
70
|
+
*,
|
|
71
|
+
message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
|
|
72
|
+
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
|
73
|
+
run: typing.Optional[flwr.proto.run_pb2.Run] = ...,
|
|
74
|
+
) -> None: ...
|
|
75
|
+
def HasField(self, field_name: typing_extensions.Literal["context",b"context","message",b"message","run",b"run"]) -> builtins.bool: ...
|
|
76
|
+
def ClearField(self, field_name: typing_extensions.Literal["context",b"context","message",b"message","run",b"run"]) -> None: ...
|
|
77
|
+
global___PullClientAppInputsResponse = PullClientAppInputsResponse
|
|
78
|
+
|
|
79
|
+
class PushClientAppOutputsRequest(google.protobuf.message.Message):
|
|
80
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
81
|
+
TOKEN_FIELD_NUMBER: builtins.int
|
|
82
|
+
MESSAGE_FIELD_NUMBER: builtins.int
|
|
83
|
+
CONTEXT_FIELD_NUMBER: builtins.int
|
|
84
|
+
token: builtins.int
|
|
85
|
+
@property
|
|
86
|
+
def message(self) -> flwr.proto.message_pb2.Message: ...
|
|
87
|
+
@property
|
|
88
|
+
def context(self) -> flwr.proto.message_pb2.Context: ...
|
|
89
|
+
def __init__(self,
|
|
90
|
+
*,
|
|
91
|
+
token: builtins.int = ...,
|
|
92
|
+
message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
|
|
93
|
+
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
|
94
|
+
) -> None: ...
|
|
95
|
+
def HasField(self, field_name: typing_extensions.Literal["context",b"context","message",b"message"]) -> builtins.bool: ...
|
|
96
|
+
def ClearField(self, field_name: typing_extensions.Literal["context",b"context","message",b"message","token",b"token"]) -> None: ...
|
|
97
|
+
global___PushClientAppOutputsRequest = PushClientAppOutputsRequest
|
|
98
|
+
|
|
99
|
+
class PushClientAppOutputsResponse(google.protobuf.message.Message):
|
|
100
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
101
|
+
STATUS_FIELD_NUMBER: builtins.int
|
|
102
|
+
@property
|
|
103
|
+
def status(self) -> global___ClientAppOutputStatus: ...
|
|
104
|
+
def __init__(self,
|
|
105
|
+
*,
|
|
106
|
+
status: typing.Optional[global___ClientAppOutputStatus] = ...,
|
|
107
|
+
) -> None: ...
|
|
108
|
+
def HasField(self, field_name: typing_extensions.Literal["status",b"status"]) -> builtins.bool: ...
|
|
109
|
+
def ClearField(self, field_name: typing_extensions.Literal["status",b"status"]) -> None: ...
|
|
110
|
+
global___PushClientAppOutputsResponse = PushClientAppOutputsResponse
|
|
@@ -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 clientappio_pb2 as flwr_dot_proto_dot_clientappio__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ClientAppIoStub(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.PullClientAppInputs = channel.unary_unary(
|
|
18
|
+
'/flwr.proto.ClientAppIo/PullClientAppInputs',
|
|
19
|
+
request_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
|
|
20
|
+
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
self.PushClientAppOutputs = channel.unary_unary(
|
|
23
|
+
'/flwr.proto.ClientAppIo/PushClientAppOutputs',
|
|
24
|
+
request_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
|
|
25
|
+
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ClientAppIoServicer(object):
|
|
30
|
+
"""Missing associated documentation comment in .proto file."""
|
|
31
|
+
|
|
32
|
+
def PullClientAppInputs(self, request, context):
|
|
33
|
+
"""Get Message, Context, and Run
|
|
34
|
+
"""
|
|
35
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
36
|
+
context.set_details('Method not implemented!')
|
|
37
|
+
raise NotImplementedError('Method not implemented!')
|
|
38
|
+
|
|
39
|
+
def PushClientAppOutputs(self, request, context):
|
|
40
|
+
"""Send updated Message and Context
|
|
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_ClientAppIoServicer_to_server(servicer, server):
|
|
48
|
+
rpc_method_handlers = {
|
|
49
|
+
'PullClientAppInputs': grpc.unary_unary_rpc_method_handler(
|
|
50
|
+
servicer.PullClientAppInputs,
|
|
51
|
+
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.FromString,
|
|
52
|
+
response_serializer=flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.SerializeToString,
|
|
53
|
+
),
|
|
54
|
+
'PushClientAppOutputs': grpc.unary_unary_rpc_method_handler(
|
|
55
|
+
servicer.PushClientAppOutputs,
|
|
56
|
+
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.FromString,
|
|
57
|
+
response_serializer=flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.SerializeToString,
|
|
58
|
+
),
|
|
59
|
+
}
|
|
60
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
61
|
+
'flwr.proto.ClientAppIo', rpc_method_handlers)
|
|
62
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# This class is part of an EXPERIMENTAL API.
|
|
66
|
+
class ClientAppIo(object):
|
|
67
|
+
"""Missing associated documentation comment in .proto file."""
|
|
68
|
+
|
|
69
|
+
@staticmethod
|
|
70
|
+
def PullClientAppInputs(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.ClientAppIo/PullClientAppInputs',
|
|
81
|
+
flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsRequest.SerializeToString,
|
|
82
|
+
flwr_dot_proto_dot_clientappio__pb2.PullClientAppInputsResponse.FromString,
|
|
83
|
+
options, channel_credentials,
|
|
84
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
85
|
+
|
|
86
|
+
@staticmethod
|
|
87
|
+
def PushClientAppOutputs(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_unary(request, target, '/flwr.proto.ClientAppIo/PushClientAppOutputs',
|
|
98
|
+
flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsRequest.SerializeToString,
|
|
99
|
+
flwr_dot_proto_dot_clientappio__pb2.PushClientAppOutputsResponse.FromString,
|
|
100
|
+
options, channel_credentials,
|
|
101
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
+
isort:skip_file
|
|
4
|
+
"""
|
|
5
|
+
import abc
|
|
6
|
+
import flwr.proto.clientappio_pb2
|
|
7
|
+
import grpc
|
|
8
|
+
|
|
9
|
+
class ClientAppIoStub:
|
|
10
|
+
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
11
|
+
PullClientAppInputs: grpc.UnaryUnaryMultiCallable[
|
|
12
|
+
flwr.proto.clientappio_pb2.PullClientAppInputsRequest,
|
|
13
|
+
flwr.proto.clientappio_pb2.PullClientAppInputsResponse]
|
|
14
|
+
"""Get Message, Context, and Run"""
|
|
15
|
+
|
|
16
|
+
PushClientAppOutputs: grpc.UnaryUnaryMultiCallable[
|
|
17
|
+
flwr.proto.clientappio_pb2.PushClientAppOutputsRequest,
|
|
18
|
+
flwr.proto.clientappio_pb2.PushClientAppOutputsResponse]
|
|
19
|
+
"""Send updated Message and Context"""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
|
23
|
+
@abc.abstractmethod
|
|
24
|
+
def PullClientAppInputs(self,
|
|
25
|
+
request: flwr.proto.clientappio_pb2.PullClientAppInputsRequest,
|
|
26
|
+
context: grpc.ServicerContext,
|
|
27
|
+
) -> flwr.proto.clientappio_pb2.PullClientAppInputsResponse:
|
|
28
|
+
"""Get Message, Context, and Run"""
|
|
29
|
+
pass
|
|
30
|
+
|
|
31
|
+
@abc.abstractmethod
|
|
32
|
+
def PushClientAppOutputs(self,
|
|
33
|
+
request: flwr.proto.clientappio_pb2.PushClientAppOutputsRequest,
|
|
34
|
+
context: grpc.ServicerContext,
|
|
35
|
+
) -> flwr.proto.clientappio_pb2.PushClientAppOutputsResponse:
|
|
36
|
+
"""Send updated Message and Context"""
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def add_ClientAppIoServicer_to_server(servicer: ClientAppIoServicer, server: grpc.Server) -> None: ...
|
flwr/proto/common_pb2.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/common.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\x17\x66lwr/proto/common.proto\x12\nflwr.proto\"\x1a\n\nDoubleList\x12\x0c\n\x04vals\x18\x01 \x03(\x01\"\x1a\n\nSint64List\x12\x0c\n\x04vals\x18\x01 \x03(\x12\"\x18\n\x08\x42oolList\x12\x0c\n\x04vals\x18\x01 \x03(\x08\"\x1a\n\nStringList\x12\x0c\n\x04vals\x18\x01 \x03(\t\"\x19\n\tBytesList\x12\x0c\n\x04vals\x18\x01 \x03(\x0c\"\xd9\x02\n\x12\x43onfigsRecordValue\x12\x10\n\x06\x64ouble\x18\x01 \x01(\x01H\x00\x12\x10\n\x06sint64\x18\x02 \x01(\x12H\x00\x12\x0e\n\x04\x62ool\x18\x03 \x01(\x08H\x00\x12\x10\n\x06string\x18\x04 \x01(\tH\x00\x12\x0f\n\x05\x62ytes\x18\x05 \x01(\x0cH\x00\x12-\n\x0b\x64ouble_list\x18\x15 \x01(\x0b\x32\x16.flwr.proto.DoubleListH\x00\x12-\n\x0bsint64_list\x18\x16 \x01(\x0b\x32\x16.flwr.proto.Sint64ListH\x00\x12)\n\tbool_list\x18\x17 \x01(\x0b\x32\x14.flwr.proto.BoolListH\x00\x12-\n\x0bstring_list\x18\x18 \x01(\x0b\x32\x16.flwr.proto.StringListH\x00\x12+\n\nbytes_list\x18\x19 \x01(\x0b\x32\x15.flwr.proto.BytesListH\x00\x42\x07\n\x05valueb\x06proto3')
|
|
18
|
+
|
|
19
|
+
_globals = globals()
|
|
20
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.common_pb2', _globals)
|
|
22
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
+
DESCRIPTOR._options = None
|
|
24
|
+
_globals['_DOUBLELIST']._serialized_start=39
|
|
25
|
+
_globals['_DOUBLELIST']._serialized_end=65
|
|
26
|
+
_globals['_SINT64LIST']._serialized_start=67
|
|
27
|
+
_globals['_SINT64LIST']._serialized_end=93
|
|
28
|
+
_globals['_BOOLLIST']._serialized_start=95
|
|
29
|
+
_globals['_BOOLLIST']._serialized_end=119
|
|
30
|
+
_globals['_STRINGLIST']._serialized_start=121
|
|
31
|
+
_globals['_STRINGLIST']._serialized_end=147
|
|
32
|
+
_globals['_BYTESLIST']._serialized_start=149
|
|
33
|
+
_globals['_BYTESLIST']._serialized_end=174
|
|
34
|
+
_globals['_CONFIGSRECORDVALUE']._serialized_start=177
|
|
35
|
+
_globals['_CONFIGSRECORDVALUE']._serialized_end=522
|
|
36
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,121 @@
|
|
|
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 DoubleList(google.protobuf.message.Message):
|
|
15
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
+
VALS_FIELD_NUMBER: builtins.int
|
|
17
|
+
@property
|
|
18
|
+
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ...
|
|
19
|
+
def __init__(self,
|
|
20
|
+
*,
|
|
21
|
+
vals: typing.Optional[typing.Iterable[builtins.float]] = ...,
|
|
22
|
+
) -> None: ...
|
|
23
|
+
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
24
|
+
global___DoubleList = DoubleList
|
|
25
|
+
|
|
26
|
+
class Sint64List(google.protobuf.message.Message):
|
|
27
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
28
|
+
VALS_FIELD_NUMBER: builtins.int
|
|
29
|
+
@property
|
|
30
|
+
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
|
|
31
|
+
def __init__(self,
|
|
32
|
+
*,
|
|
33
|
+
vals: typing.Optional[typing.Iterable[builtins.int]] = ...,
|
|
34
|
+
) -> None: ...
|
|
35
|
+
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
36
|
+
global___Sint64List = Sint64List
|
|
37
|
+
|
|
38
|
+
class BoolList(google.protobuf.message.Message):
|
|
39
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
40
|
+
VALS_FIELD_NUMBER: builtins.int
|
|
41
|
+
@property
|
|
42
|
+
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bool]: ...
|
|
43
|
+
def __init__(self,
|
|
44
|
+
*,
|
|
45
|
+
vals: typing.Optional[typing.Iterable[builtins.bool]] = ...,
|
|
46
|
+
) -> None: ...
|
|
47
|
+
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
48
|
+
global___BoolList = BoolList
|
|
49
|
+
|
|
50
|
+
class StringList(google.protobuf.message.Message):
|
|
51
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
52
|
+
VALS_FIELD_NUMBER: builtins.int
|
|
53
|
+
@property
|
|
54
|
+
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
|
|
55
|
+
def __init__(self,
|
|
56
|
+
*,
|
|
57
|
+
vals: typing.Optional[typing.Iterable[typing.Text]] = ...,
|
|
58
|
+
) -> None: ...
|
|
59
|
+
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
60
|
+
global___StringList = StringList
|
|
61
|
+
|
|
62
|
+
class BytesList(google.protobuf.message.Message):
|
|
63
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
64
|
+
VALS_FIELD_NUMBER: builtins.int
|
|
65
|
+
@property
|
|
66
|
+
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
|
|
67
|
+
def __init__(self,
|
|
68
|
+
*,
|
|
69
|
+
vals: typing.Optional[typing.Iterable[builtins.bytes]] = ...,
|
|
70
|
+
) -> None: ...
|
|
71
|
+
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
72
|
+
global___BytesList = BytesList
|
|
73
|
+
|
|
74
|
+
class ConfigsRecordValue(google.protobuf.message.Message):
|
|
75
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
76
|
+
DOUBLE_FIELD_NUMBER: builtins.int
|
|
77
|
+
SINT64_FIELD_NUMBER: builtins.int
|
|
78
|
+
BOOL_FIELD_NUMBER: builtins.int
|
|
79
|
+
STRING_FIELD_NUMBER: builtins.int
|
|
80
|
+
BYTES_FIELD_NUMBER: builtins.int
|
|
81
|
+
DOUBLE_LIST_FIELD_NUMBER: builtins.int
|
|
82
|
+
SINT64_LIST_FIELD_NUMBER: builtins.int
|
|
83
|
+
BOOL_LIST_FIELD_NUMBER: builtins.int
|
|
84
|
+
STRING_LIST_FIELD_NUMBER: builtins.int
|
|
85
|
+
BYTES_LIST_FIELD_NUMBER: builtins.int
|
|
86
|
+
double: builtins.float
|
|
87
|
+
"""Single element"""
|
|
88
|
+
|
|
89
|
+
sint64: builtins.int
|
|
90
|
+
bool: builtins.bool
|
|
91
|
+
string: typing.Text
|
|
92
|
+
bytes: builtins.bytes
|
|
93
|
+
@property
|
|
94
|
+
def double_list(self) -> global___DoubleList:
|
|
95
|
+
"""List types"""
|
|
96
|
+
pass
|
|
97
|
+
@property
|
|
98
|
+
def sint64_list(self) -> global___Sint64List: ...
|
|
99
|
+
@property
|
|
100
|
+
def bool_list(self) -> global___BoolList: ...
|
|
101
|
+
@property
|
|
102
|
+
def string_list(self) -> global___StringList: ...
|
|
103
|
+
@property
|
|
104
|
+
def bytes_list(self) -> global___BytesList: ...
|
|
105
|
+
def __init__(self,
|
|
106
|
+
*,
|
|
107
|
+
double: builtins.float = ...,
|
|
108
|
+
sint64: builtins.int = ...,
|
|
109
|
+
bool: builtins.bool = ...,
|
|
110
|
+
string: typing.Text = ...,
|
|
111
|
+
bytes: builtins.bytes = ...,
|
|
112
|
+
double_list: typing.Optional[global___DoubleList] = ...,
|
|
113
|
+
sint64_list: typing.Optional[global___Sint64List] = ...,
|
|
114
|
+
bool_list: typing.Optional[global___BoolList] = ...,
|
|
115
|
+
string_list: typing.Optional[global___StringList] = ...,
|
|
116
|
+
bytes_list: typing.Optional[global___BytesList] = ...,
|
|
117
|
+
) -> None: ...
|
|
118
|
+
def HasField(self, field_name: typing_extensions.Literal["bool",b"bool","bool_list",b"bool_list","bytes",b"bytes","bytes_list",b"bytes_list","double",b"double","double_list",b"double_list","sint64",b"sint64","sint64_list",b"sint64_list","string",b"string","string_list",b"string_list","value",b"value"]) -> builtins.bool: ...
|
|
119
|
+
def ClearField(self, field_name: typing_extensions.Literal["bool",b"bool","bool_list",b"bool_list","bytes",b"bytes","bytes_list",b"bytes_list","double",b"double","double_list",b"double_list","sint64",b"sint64","sint64_list",b"sint64_list","string",b"string","string_list",b"string_list","value",b"value"]) -> None: ...
|
|
120
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["value",b"value"]) -> typing.Optional[typing_extensions.Literal["double","sint64","bool","string","bytes","double_list","sint64_list","bool_list","string_list","bytes_list"]]: ...
|
|
121
|
+
global___ConfigsRecordValue = ConfigsRecordValue
|
flwr/proto/driver_pb2.py
CHANGED
|
@@ -14,31 +14,38 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
|
|
15
15
|
from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2
|
|
16
16
|
from flwr.proto import task_pb2 as flwr_dot_proto_dot_task__pb2
|
|
17
|
+
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
18
|
+
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
19
|
+
from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
|
|
17
20
|
|
|
18
21
|
|
|
19
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66lwr/proto/driver.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\"\
|
|
22
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66lwr/proto/driver.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xeb\x01\n\x10\x43reateRunRequest\x12\x0e\n\x06\x66\x61\x62_id\x18\x01 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x02 \x01(\t\x12I\n\x0foverride_config\x18\x03 \x03(\x0b\x32\x30.flwr.proto.CreateRunRequest.OverrideConfigEntry\x12\x1c\n\x03\x66\x61\x62\x18\x04 \x01(\x0b\x32\x0f.flwr.proto.Fab\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\"#\n\x11\x43reateRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"@\n\x12PushTaskInsRequest\x12*\n\rtask_ins_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"\'\n\x13PushTaskInsResponse\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"F\n\x12PullTaskResRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"A\n\x13PullTaskResResponse\x12*\n\rtask_res_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskRes2\xc7\x03\n\x06\x44river\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\x12G\n\x08GetNodes\x12\x1b.flwr.proto.GetNodesRequest\x1a\x1c.flwr.proto.GetNodesResponse\"\x00\x12P\n\x0bPushTaskIns\x12\x1e.flwr.proto.PushTaskInsRequest\x1a\x1f.flwr.proto.PushTaskInsResponse\"\x00\x12P\n\x0bPullTaskRes\x12\x1e.flwr.proto.PullTaskResRequest\x1a\x1f.flwr.proto.PullTaskResResponse\"\x00\x12\x41\n\x06GetRun\x12\x19.flwr.proto.GetRunRequest\x1a\x1a.flwr.proto.GetRunResponse\"\x00\x12\x41\n\x06GetFab\x12\x19.flwr.proto.GetFabRequest\x1a\x1a.flwr.proto.GetFabResponse\"\x00\x62\x06proto3')
|
|
20
23
|
|
|
21
24
|
_globals = globals()
|
|
22
25
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
23
26
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.driver_pb2', _globals)
|
|
24
27
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
25
28
|
DESCRIPTOR._options = None
|
|
26
|
-
_globals['
|
|
27
|
-
_globals['
|
|
28
|
-
_globals['
|
|
29
|
-
_globals['
|
|
30
|
-
_globals['
|
|
31
|
-
_globals['
|
|
32
|
-
_globals['
|
|
33
|
-
_globals['
|
|
34
|
-
_globals['
|
|
35
|
-
_globals['
|
|
36
|
-
_globals['
|
|
37
|
-
_globals['
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
29
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._options = None
|
|
30
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
31
|
+
_globals['_CREATERUNREQUEST']._serialized_start=158
|
|
32
|
+
_globals['_CREATERUNREQUEST']._serialized_end=393
|
|
33
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=320
|
|
34
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=393
|
|
35
|
+
_globals['_CREATERUNRESPONSE']._serialized_start=395
|
|
36
|
+
_globals['_CREATERUNRESPONSE']._serialized_end=430
|
|
37
|
+
_globals['_GETNODESREQUEST']._serialized_start=432
|
|
38
|
+
_globals['_GETNODESREQUEST']._serialized_end=465
|
|
39
|
+
_globals['_GETNODESRESPONSE']._serialized_start=467
|
|
40
|
+
_globals['_GETNODESRESPONSE']._serialized_end=518
|
|
41
|
+
_globals['_PUSHTASKINSREQUEST']._serialized_start=520
|
|
42
|
+
_globals['_PUSHTASKINSREQUEST']._serialized_end=584
|
|
43
|
+
_globals['_PUSHTASKINSRESPONSE']._serialized_start=586
|
|
44
|
+
_globals['_PUSHTASKINSRESPONSE']._serialized_end=625
|
|
45
|
+
_globals['_PULLTASKRESREQUEST']._serialized_start=627
|
|
46
|
+
_globals['_PULLTASKRESREQUEST']._serialized_end=697
|
|
47
|
+
_globals['_PULLTASKRESRESPONSE']._serialized_start=699
|
|
48
|
+
_globals['_PULLTASKRESRESPONSE']._serialized_end=764
|
|
49
|
+
_globals['_DRIVER']._serialized_start=767
|
|
50
|
+
_globals['_DRIVER']._serialized_end=1222
|
|
44
51
|
# @@protoc_insertion_point(module_scope)
|