flwr 1.20.0__py3-none-any.whl → 1.22.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flwr/__init__.py +4 -1
- flwr/app/__init__.py +28 -0
- flwr/app/exception.py +31 -0
- flwr/cli/app.py +2 -0
- flwr/cli/auth_plugin/oidc_cli_plugin.py +4 -4
- flwr/cli/cli_user_auth_interceptor.py +1 -1
- flwr/cli/config_utils.py +3 -3
- flwr/cli/constant.py +25 -8
- flwr/cli/log.py +9 -9
- flwr/cli/login/login.py +3 -3
- flwr/cli/ls.py +5 -5
- flwr/cli/new/new.py +15 -2
- flwr/cli/new/templates/app/README.flowertune.md.tpl +1 -1
- flwr/cli/new/templates/app/code/__init__.pytorch_legacy_api.py.tpl +1 -0
- flwr/cli/new/templates/app/code/client.baseline.py.tpl +64 -47
- flwr/cli/new/templates/app/code/client.huggingface.py.tpl +68 -30
- flwr/cli/new/templates/app/code/client.jax.py.tpl +63 -42
- flwr/cli/new/templates/app/code/client.mlx.py.tpl +80 -51
- flwr/cli/new/templates/app/code/client.numpy.py.tpl +36 -13
- flwr/cli/new/templates/app/code/client.pytorch.py.tpl +71 -46
- flwr/cli/new/templates/app/code/client.pytorch_legacy_api.py.tpl +55 -0
- flwr/cli/new/templates/app/code/client.sklearn.py.tpl +75 -30
- flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +69 -44
- flwr/cli/new/templates/app/code/client.xgboost.py.tpl +110 -0
- flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +56 -90
- flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +1 -23
- flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +37 -58
- flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +39 -44
- flwr/cli/new/templates/app/code/model.baseline.py.tpl +0 -14
- flwr/cli/new/templates/app/code/server.baseline.py.tpl +27 -29
- flwr/cli/new/templates/app/code/server.huggingface.py.tpl +23 -19
- flwr/cli/new/templates/app/code/server.jax.py.tpl +27 -14
- flwr/cli/new/templates/app/code/server.mlx.py.tpl +29 -19
- flwr/cli/new/templates/app/code/server.numpy.py.tpl +30 -17
- flwr/cli/new/templates/app/code/server.pytorch.py.tpl +36 -26
- flwr/cli/new/templates/app/code/server.pytorch_legacy_api.py.tpl +31 -0
- flwr/cli/new/templates/app/code/server.sklearn.py.tpl +29 -21
- flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +28 -19
- flwr/cli/new/templates/app/code/server.xgboost.py.tpl +56 -0
- flwr/cli/new/templates/app/code/task.huggingface.py.tpl +16 -20
- flwr/cli/new/templates/app/code/task.jax.py.tpl +1 -1
- flwr/cli/new/templates/app/code/task.numpy.py.tpl +1 -1
- flwr/cli/new/templates/app/code/task.pytorch.py.tpl +14 -27
- flwr/cli/new/templates/app/code/task.pytorch_legacy_api.py.tpl +111 -0
- flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +1 -2
- flwr/cli/new/templates/app/code/task.xgboost.py.tpl +67 -0
- flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +4 -4
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +2 -2
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +4 -4
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +2 -2
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +3 -3
- flwr/cli/new/templates/app/pyproject.pytorch_legacy_api.toml.tpl +53 -0
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.xgboost.toml.tpl +61 -0
- flwr/cli/pull.py +100 -0
- flwr/cli/run/run.py +9 -13
- flwr/cli/stop.py +7 -4
- flwr/cli/utils.py +36 -8
- flwr/client/grpc_rere_client/connection.py +1 -12
- flwr/client/rest_client/connection.py +3 -0
- flwr/clientapp/__init__.py +10 -0
- flwr/clientapp/mod/__init__.py +29 -0
- flwr/clientapp/mod/centraldp_mods.py +248 -0
- flwr/clientapp/mod/localdp_mod.py +169 -0
- flwr/clientapp/typing.py +22 -0
- flwr/common/args.py +20 -6
- flwr/common/auth_plugin/__init__.py +4 -4
- flwr/common/auth_plugin/auth_plugin.py +7 -7
- flwr/common/constant.py +26 -4
- flwr/common/event_log_plugin/event_log_plugin.py +1 -1
- flwr/common/exit/__init__.py +4 -0
- flwr/common/exit/exit.py +8 -1
- flwr/common/exit/exit_code.py +30 -7
- flwr/common/exit/exit_handler.py +62 -0
- flwr/common/{exit_handlers.py → exit/signal_handler.py} +20 -37
- flwr/common/grpc.py +0 -11
- flwr/common/inflatable_utils.py +1 -1
- flwr/common/logger.py +1 -1
- flwr/common/record/typeddict.py +12 -0
- flwr/common/retry_invoker.py +30 -11
- flwr/common/telemetry.py +4 -0
- flwr/compat/server/app.py +2 -2
- flwr/proto/appio_pb2.py +25 -17
- flwr/proto/appio_pb2.pyi +46 -2
- flwr/proto/clientappio_pb2.py +3 -11
- flwr/proto/clientappio_pb2.pyi +0 -47
- flwr/proto/clientappio_pb2_grpc.py +19 -20
- flwr/proto/clientappio_pb2_grpc.pyi +10 -11
- flwr/proto/control_pb2.py +66 -0
- flwr/proto/{exec_pb2.pyi → control_pb2.pyi} +24 -0
- flwr/proto/{exec_pb2_grpc.py → control_pb2_grpc.py} +88 -54
- flwr/proto/control_pb2_grpc.pyi +106 -0
- flwr/proto/serverappio_pb2.py +2 -2
- flwr/proto/serverappio_pb2_grpc.py +68 -0
- flwr/proto/serverappio_pb2_grpc.pyi +26 -0
- flwr/proto/simulationio_pb2.py +4 -11
- flwr/proto/simulationio_pb2.pyi +0 -58
- flwr/proto/simulationio_pb2_grpc.py +129 -27
- flwr/proto/simulationio_pb2_grpc.pyi +52 -13
- flwr/server/app.py +142 -152
- flwr/server/grid/grpc_grid.py +3 -0
- flwr/server/grid/inmemory_grid.py +1 -0
- flwr/server/serverapp/app.py +157 -146
- flwr/server/superlink/fleet/vce/backend/raybackend.py +3 -1
- flwr/server/superlink/fleet/vce/vce_api.py +6 -6
- flwr/server/superlink/linkstate/in_memory_linkstate.py +34 -0
- flwr/server/superlink/linkstate/linkstate.py +2 -1
- flwr/server/superlink/linkstate/sqlite_linkstate.py +45 -0
- flwr/server/superlink/serverappio/serverappio_grpc.py +1 -1
- flwr/server/superlink/serverappio/serverappio_servicer.py +61 -6
- flwr/server/superlink/simulation/simulationio_servicer.py +97 -21
- flwr/serverapp/__init__.py +12 -0
- flwr/serverapp/exception.py +38 -0
- flwr/serverapp/strategy/__init__.py +64 -0
- flwr/serverapp/strategy/bulyan.py +238 -0
- flwr/serverapp/strategy/dp_adaptive_clipping.py +335 -0
- flwr/serverapp/strategy/dp_fixed_clipping.py +374 -0
- flwr/serverapp/strategy/fedadagrad.py +159 -0
- flwr/serverapp/strategy/fedadam.py +178 -0
- flwr/serverapp/strategy/fedavg.py +320 -0
- flwr/serverapp/strategy/fedavgm.py +198 -0
- flwr/serverapp/strategy/fedmedian.py +105 -0
- flwr/serverapp/strategy/fedopt.py +218 -0
- flwr/serverapp/strategy/fedprox.py +174 -0
- flwr/serverapp/strategy/fedtrimmedavg.py +176 -0
- flwr/serverapp/strategy/fedxgb_bagging.py +117 -0
- flwr/serverapp/strategy/fedxgb_cyclic.py +220 -0
- flwr/serverapp/strategy/fedyogi.py +170 -0
- flwr/serverapp/strategy/krum.py +112 -0
- flwr/serverapp/strategy/multikrum.py +247 -0
- flwr/serverapp/strategy/qfedavg.py +252 -0
- flwr/serverapp/strategy/result.py +105 -0
- flwr/serverapp/strategy/strategy.py +285 -0
- flwr/serverapp/strategy/strategy_utils.py +299 -0
- flwr/simulation/app.py +161 -164
- flwr/simulation/run_simulation.py +25 -30
- flwr/supercore/app_utils.py +58 -0
- flwr/{supernode/scheduler → supercore/cli}/__init__.py +3 -3
- flwr/supercore/cli/flower_superexec.py +166 -0
- flwr/supercore/constant.py +19 -0
- flwr/supercore/{scheduler → corestate}/__init__.py +3 -3
- flwr/supercore/corestate/corestate.py +81 -0
- flwr/supercore/grpc_health/__init__.py +3 -0
- flwr/supercore/grpc_health/health_server.py +53 -0
- flwr/supercore/grpc_health/simple_health_servicer.py +2 -2
- flwr/{superexec → supercore/superexec}/__init__.py +1 -1
- flwr/supercore/superexec/plugin/__init__.py +28 -0
- flwr/{supernode/scheduler/simple_clientapp_scheduler_plugin.py → supercore/superexec/plugin/base_exec_plugin.py} +10 -6
- flwr/supercore/superexec/plugin/clientapp_exec_plugin.py +28 -0
- flwr/supercore/{scheduler/plugin.py → superexec/plugin/exec_plugin.py} +15 -5
- flwr/supercore/superexec/plugin/serverapp_exec_plugin.py +28 -0
- flwr/supercore/superexec/plugin/simulation_exec_plugin.py +28 -0
- flwr/supercore/superexec/run_superexec.py +199 -0
- flwr/superlink/artifact_provider/__init__.py +22 -0
- flwr/superlink/artifact_provider/artifact_provider.py +37 -0
- flwr/superlink/servicer/__init__.py +15 -0
- flwr/superlink/servicer/control/__init__.py +22 -0
- flwr/{superexec/exec_event_log_interceptor.py → superlink/servicer/control/control_event_log_interceptor.py} +7 -7
- flwr/{superexec/exec_grpc.py → superlink/servicer/control/control_grpc.py} +27 -29
- flwr/{superexec/exec_license_interceptor.py → superlink/servicer/control/control_license_interceptor.py} +6 -6
- flwr/{superexec/exec_servicer.py → superlink/servicer/control/control_servicer.py} +127 -31
- flwr/{superexec/exec_user_auth_interceptor.py → superlink/servicer/control/control_user_auth_interceptor.py} +10 -10
- flwr/supernode/cli/flower_supernode.py +3 -0
- flwr/supernode/cli/flwr_clientapp.py +18 -21
- flwr/supernode/nodestate/in_memory_nodestate.py +2 -2
- flwr/supernode/nodestate/nodestate.py +3 -59
- flwr/supernode/runtime/run_clientapp.py +39 -102
- flwr/supernode/servicer/clientappio/clientappio_servicer.py +10 -17
- flwr/supernode/start_client_internal.py +35 -76
- {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/METADATA +9 -18
- {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/RECORD +176 -128
- {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/entry_points.txt +1 -0
- flwr/proto/exec_pb2.py +0 -62
- flwr/proto/exec_pb2_grpc.pyi +0 -93
- flwr/superexec/app.py +0 -45
- flwr/superexec/deployment.py +0 -191
- flwr/superexec/executor.py +0 -100
- flwr/superexec/simulation.py +0 -129
- {flwr-1.20.0.dist-info → flwr-1.22.0.dist-info}/WHEEL +0 -0
flwr/common/grpc.py
CHANGED
|
@@ -23,9 +23,6 @@ from logging import DEBUG, ERROR
|
|
|
23
23
|
from typing import Any, Callable, Optional
|
|
24
24
|
|
|
25
25
|
import grpc
|
|
26
|
-
from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server
|
|
27
|
-
|
|
28
|
-
from flwr.supercore.grpc_health import SimpleHealthServicer
|
|
29
26
|
|
|
30
27
|
from .address import is_port_in_use
|
|
31
28
|
from .logger import log
|
|
@@ -109,7 +106,6 @@ def generic_create_grpc_server( # pylint: disable=too-many-arguments, R0914, R0
|
|
|
109
106
|
keepalive_time_ms: int = 210000,
|
|
110
107
|
certificates: Optional[tuple[bytes, bytes, bytes]] = None,
|
|
111
108
|
interceptors: Optional[Sequence[grpc.ServerInterceptor]] = None,
|
|
112
|
-
health_servicer: Optional[Any] = None,
|
|
113
109
|
) -> grpc.Server:
|
|
114
110
|
"""Create a gRPC server with a single servicer.
|
|
115
111
|
|
|
@@ -157,10 +153,6 @@ def generic_create_grpc_server( # pylint: disable=too-many-arguments, R0914, R0
|
|
|
157
153
|
* server private key.
|
|
158
154
|
interceptors : Optional[Sequence[grpc.ServerInterceptor]] (default: None)
|
|
159
155
|
A list of gRPC interceptors.
|
|
160
|
-
health_servicer : Optional[Any] (default: None)
|
|
161
|
-
An optional health servicer to add to the server. If provided, it should be an
|
|
162
|
-
instance of a class that inherits the `HealthServicer` class.
|
|
163
|
-
If None is provided, `SimpleHealthServicer` will be used by default.
|
|
164
156
|
|
|
165
157
|
Returns
|
|
166
158
|
-------
|
|
@@ -211,9 +203,6 @@ def generic_create_grpc_server( # pylint: disable=too-many-arguments, R0914, R0
|
|
|
211
203
|
)
|
|
212
204
|
add_servicer_to_server_fn(servicer, server)
|
|
213
205
|
|
|
214
|
-
# Enable health service
|
|
215
|
-
add_HealthServicer_to_server(health_servicer or SimpleHealthServicer(), server)
|
|
216
|
-
|
|
217
206
|
if certificates is not None:
|
|
218
207
|
if not valid_certificates(certificates):
|
|
219
208
|
sys.exit(1)
|
flwr/common/inflatable_utils.py
CHANGED
flwr/common/logger.py
CHANGED
|
@@ -132,13 +132,13 @@ if log_level := os.getenv("FLWR_LOG_LEVEL"):
|
|
|
132
132
|
log_level = log_level.upper()
|
|
133
133
|
try:
|
|
134
134
|
is_debug = log_level == "DEBUG"
|
|
135
|
+
update_console_handler(level=log_level, timestamps=is_debug, colored=True)
|
|
135
136
|
if is_debug:
|
|
136
137
|
log(
|
|
137
138
|
WARN,
|
|
138
139
|
"DEBUG logs enabled. Do not use this in production, as it may expose "
|
|
139
140
|
"sensitive details.",
|
|
140
141
|
)
|
|
141
|
-
update_console_handler(level=log_level, timestamps=is_debug, colored=True)
|
|
142
142
|
except Exception: # pylint: disable=broad-exception-caught
|
|
143
143
|
# Alert user but don't raise exception
|
|
144
144
|
log(
|
flwr/common/record/typeddict.py
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
from collections.abc import ItemsView, Iterator, KeysView, MutableMapping, ValuesView
|
|
19
19
|
from typing import Callable, Generic, TypeVar, cast
|
|
20
20
|
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
21
23
|
K = TypeVar("K") # Key type
|
|
22
24
|
V = TypeVar("V") # Value type
|
|
23
25
|
|
|
@@ -86,3 +88,13 @@ class TypedDict(MutableMapping[K, V], Generic[K, V]):
|
|
|
86
88
|
def items(self) -> ItemsView[K, V]:
|
|
87
89
|
"""D.items() -> a set-like object providing a view on D's items."""
|
|
88
90
|
return cast(dict[K, V], self.__dict__["_data"]).items()
|
|
91
|
+
|
|
92
|
+
def copy(self) -> Self:
|
|
93
|
+
"""Return a shallow copy of the dictionary."""
|
|
94
|
+
# Allocate instance without going through __init__
|
|
95
|
+
new = self.__class__.__new__(type(self))
|
|
96
|
+
# Copy internal state
|
|
97
|
+
new.__dict__["_check_key_fn"] = self.__dict__["_check_key_fn"]
|
|
98
|
+
new.__dict__["_check_value_fn"] = self.__dict__["_check_value_fn"]
|
|
99
|
+
new.__dict__["_data"] = cast(dict[K, V], self.__dict__["_data"]).copy()
|
|
100
|
+
return new
|
flwr/common/retry_invoker.py
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import itertools
|
|
19
19
|
import random
|
|
20
|
+
import threading
|
|
20
21
|
import time
|
|
21
22
|
from collections.abc import Generator, Iterable
|
|
22
23
|
from dataclasses import dataclass
|
|
@@ -319,8 +320,12 @@ class RetryInvoker:
|
|
|
319
320
|
|
|
320
321
|
def _make_simple_grpc_retry_invoker() -> RetryInvoker:
|
|
321
322
|
"""Create a simple gRPC retry invoker."""
|
|
323
|
+
lock = threading.Lock()
|
|
324
|
+
system_healthy = threading.Event()
|
|
325
|
+
system_healthy.set() # Initially, the connection is healthy
|
|
322
326
|
|
|
323
|
-
def
|
|
327
|
+
def _on_success(retry_state: RetryState) -> None:
|
|
328
|
+
system_healthy.set()
|
|
324
329
|
if retry_state.tries > 1:
|
|
325
330
|
log(
|
|
326
331
|
INFO,
|
|
@@ -329,17 +334,11 @@ def _make_simple_grpc_retry_invoker() -> RetryInvoker:
|
|
|
329
334
|
retry_state.tries,
|
|
330
335
|
)
|
|
331
336
|
|
|
332
|
-
def _on_backoff(
|
|
333
|
-
|
|
334
|
-
log(WARN, "Connection attempt failed, retrying...")
|
|
335
|
-
else:
|
|
336
|
-
log(
|
|
337
|
-
WARN,
|
|
338
|
-
"Connection attempt failed, retrying in %.2f seconds",
|
|
339
|
-
retry_state.actual_wait,
|
|
340
|
-
)
|
|
337
|
+
def _on_backoff(_: RetryState) -> None:
|
|
338
|
+
system_healthy.clear()
|
|
341
339
|
|
|
342
340
|
def _on_giveup(retry_state: RetryState) -> None:
|
|
341
|
+
system_healthy.clear()
|
|
343
342
|
if retry_state.tries > 1:
|
|
344
343
|
log(
|
|
345
344
|
WARN,
|
|
@@ -355,15 +354,35 @@ def _make_simple_grpc_retry_invoker() -> RetryInvoker:
|
|
|
355
354
|
return False
|
|
356
355
|
return True
|
|
357
356
|
|
|
357
|
+
def _wait(wait_time: float) -> None:
|
|
358
|
+
# Use a lock to prevent multiple gRPC calls from retrying concurrently,
|
|
359
|
+
# which is unnecessary since they are all likely to fail.
|
|
360
|
+
with lock:
|
|
361
|
+
# Log the wait time
|
|
362
|
+
log(
|
|
363
|
+
WARN,
|
|
364
|
+
"Connection attempt failed, retrying in %.2f seconds",
|
|
365
|
+
wait_time,
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
start = time.monotonic()
|
|
369
|
+
# Avoid sequential waits if the system is healthy
|
|
370
|
+
system_healthy.wait(wait_time)
|
|
371
|
+
|
|
372
|
+
remaining_time = wait_time - (time.monotonic() - start)
|
|
373
|
+
if remaining_time > 0:
|
|
374
|
+
time.sleep(remaining_time)
|
|
375
|
+
|
|
358
376
|
return RetryInvoker(
|
|
359
377
|
wait_gen_factory=lambda: exponential(max_delay=MAX_RETRY_DELAY),
|
|
360
378
|
recoverable_exceptions=grpc.RpcError,
|
|
361
379
|
max_tries=None,
|
|
362
380
|
max_time=None,
|
|
363
|
-
on_success=
|
|
381
|
+
on_success=_on_success,
|
|
364
382
|
on_backoff=_on_backoff,
|
|
365
383
|
on_giveup=_on_giveup,
|
|
366
384
|
should_giveup=_should_giveup_fn,
|
|
385
|
+
wait_function=_wait,
|
|
367
386
|
)
|
|
368
387
|
|
|
369
388
|
|
flwr/common/telemetry.py
CHANGED
|
@@ -181,6 +181,10 @@ class EventType(str, Enum):
|
|
|
181
181
|
RUN_SUPERNODE_ENTER = auto()
|
|
182
182
|
RUN_SUPERNODE_LEAVE = auto()
|
|
183
183
|
|
|
184
|
+
# CLI: `flower-superexec`
|
|
185
|
+
RUN_SUPEREXEC_ENTER = auto()
|
|
186
|
+
RUN_SUPEREXEC_LEAVE = auto()
|
|
187
|
+
|
|
184
188
|
|
|
185
189
|
# Use the ThreadPoolExecutor with max_workers=1 to have a queue
|
|
186
190
|
# and also ensure that telemetry calls are not blocking.
|
flwr/compat/server/app.py
CHANGED
|
@@ -22,7 +22,7 @@ from typing import Optional
|
|
|
22
22
|
from flwr.common import GRPC_MAX_MESSAGE_LENGTH, EventType, event
|
|
23
23
|
from flwr.common.address import parse_address
|
|
24
24
|
from flwr.common.constant import FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS
|
|
25
|
-
from flwr.common.
|
|
25
|
+
from flwr.common.exit import register_signal_handlers
|
|
26
26
|
from flwr.common.logger import log, warn_deprecated_feature
|
|
27
27
|
from flwr.server.client_manager import ClientManager
|
|
28
28
|
from flwr.server.history import History
|
|
@@ -154,7 +154,7 @@ def start_server( # pylint: disable=too-many-arguments,too-many-locals
|
|
|
154
154
|
)
|
|
155
155
|
|
|
156
156
|
# Graceful shutdown
|
|
157
|
-
|
|
157
|
+
register_signal_handlers(
|
|
158
158
|
event_type=EventType.START_SERVER_LEAVE,
|
|
159
159
|
exit_message="Flower server terminated gracefully.",
|
|
160
160
|
grpc_servers=[grpc_server],
|
flwr/proto/appio_pb2.py
CHANGED
|
@@ -17,27 +17,35 @@ from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
|
17
17
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/appio.proto\x12\nflwr.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\"\x99\x01\n\x16PushAppMessagesRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x34\n\x14message_object_trees\x18\x04 \x03(\x0b\x32\x16.flwr.proto.ObjectTree\"G\n\x17PushAppMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x17\n\x0fobjects_to_push\x18\x02 \x03(\t\"L\n\x16PullAppMessagesRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12\x13\n\x0bmessage_ids\x18\x02 \x03(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\"{\n\x17PullAppMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x34\n\x14message_object_trees\x18\x02 \x03(\x0b\x32\x16.flwr.proto.ObjectTree\"%\n\x14PullAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\"y\n\x15PullAppInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"\\\n\x15PushAppOutputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\x12$\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x13.flwr.proto.Context\"\x18\n\x16PushAppOutputsResponseb\x06proto3')
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/appio.proto\x12\nflwr.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\"\x19\n\x17ListAppsToLaunchRequest\"+\n\x18ListAppsToLaunchResponse\x12\x0f\n\x07run_ids\x18\x01 \x03(\x04\"%\n\x13RequestTokenRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"%\n\x14RequestTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\"\x99\x01\n\x16PushAppMessagesRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x34\n\x14message_object_trees\x18\x04 \x03(\x0b\x32\x16.flwr.proto.ObjectTree\"G\n\x17PushAppMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x17\n\x0fobjects_to_push\x18\x02 \x03(\t\"L\n\x16PullAppMessagesRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12\x13\n\x0bmessage_ids\x18\x02 \x03(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\"{\n\x17PullAppMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x34\n\x14message_object_trees\x18\x02 \x03(\x0b\x32\x16.flwr.proto.ObjectTree\"%\n\x14PullAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\"y\n\x15PullAppInputsResponse\x12$\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Fab\"\\\n\x15PushAppOutputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\x12$\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x13.flwr.proto.Context\"\x18\n\x16PushAppOutputsResponseb\x06proto3')
|
|
21
21
|
|
|
22
22
|
_globals = globals()
|
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
24
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.appio_pb2', _globals)
|
|
25
25
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
26
|
DESCRIPTOR._options = None
|
|
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['
|
|
27
|
+
_globals['_LISTAPPSTOLAUNCHREQUEST']._serialized_start=108
|
|
28
|
+
_globals['_LISTAPPSTOLAUNCHREQUEST']._serialized_end=133
|
|
29
|
+
_globals['_LISTAPPSTOLAUNCHRESPONSE']._serialized_start=135
|
|
30
|
+
_globals['_LISTAPPSTOLAUNCHRESPONSE']._serialized_end=178
|
|
31
|
+
_globals['_REQUESTTOKENREQUEST']._serialized_start=180
|
|
32
|
+
_globals['_REQUESTTOKENREQUEST']._serialized_end=217
|
|
33
|
+
_globals['_REQUESTTOKENRESPONSE']._serialized_start=219
|
|
34
|
+
_globals['_REQUESTTOKENRESPONSE']._serialized_end=256
|
|
35
|
+
_globals['_PUSHAPPMESSAGESREQUEST']._serialized_start=259
|
|
36
|
+
_globals['_PUSHAPPMESSAGESREQUEST']._serialized_end=412
|
|
37
|
+
_globals['_PUSHAPPMESSAGESRESPONSE']._serialized_start=414
|
|
38
|
+
_globals['_PUSHAPPMESSAGESRESPONSE']._serialized_end=485
|
|
39
|
+
_globals['_PULLAPPMESSAGESREQUEST']._serialized_start=487
|
|
40
|
+
_globals['_PULLAPPMESSAGESREQUEST']._serialized_end=563
|
|
41
|
+
_globals['_PULLAPPMESSAGESRESPONSE']._serialized_start=565
|
|
42
|
+
_globals['_PULLAPPMESSAGESRESPONSE']._serialized_end=688
|
|
43
|
+
_globals['_PULLAPPINPUTSREQUEST']._serialized_start=690
|
|
44
|
+
_globals['_PULLAPPINPUTSREQUEST']._serialized_end=727
|
|
45
|
+
_globals['_PULLAPPINPUTSRESPONSE']._serialized_start=729
|
|
46
|
+
_globals['_PULLAPPINPUTSRESPONSE']._serialized_end=850
|
|
47
|
+
_globals['_PUSHAPPOUTPUTSREQUEST']._serialized_start=852
|
|
48
|
+
_globals['_PUSHAPPOUTPUTSREQUEST']._serialized_end=944
|
|
49
|
+
_globals['_PUSHAPPOUTPUTSRESPONSE']._serialized_start=946
|
|
50
|
+
_globals['_PUSHAPPOUTPUTSRESPONSE']._serialized_end=970
|
|
43
51
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/appio_pb2.pyi
CHANGED
|
@@ -14,12 +14,56 @@ import typing_extensions
|
|
|
14
14
|
|
|
15
15
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class ListAppsToLaunchRequest(google.protobuf.message.Message):
|
|
18
18
|
"""These messages are used by both ServerAppIo and ClientAppIo services
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
ListAppsToLaunch messages
|
|
21
21
|
"""
|
|
22
22
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
23
|
+
def __init__(self,
|
|
24
|
+
) -> None: ...
|
|
25
|
+
global___ListAppsToLaunchRequest = ListAppsToLaunchRequest
|
|
26
|
+
|
|
27
|
+
class ListAppsToLaunchResponse(google.protobuf.message.Message):
|
|
28
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
29
|
+
RUN_IDS_FIELD_NUMBER: builtins.int
|
|
30
|
+
@property
|
|
31
|
+
def run_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
32
|
+
"""List of run IDs of the apps to launch"""
|
|
33
|
+
pass
|
|
34
|
+
def __init__(self,
|
|
35
|
+
*,
|
|
36
|
+
run_ids: typing.Optional[typing.Iterable[builtins.int]] = ...,
|
|
37
|
+
) -> None: ...
|
|
38
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_ids",b"run_ids"]) -> None: ...
|
|
39
|
+
global___ListAppsToLaunchResponse = ListAppsToLaunchResponse
|
|
40
|
+
|
|
41
|
+
class RequestTokenRequest(google.protobuf.message.Message):
|
|
42
|
+
"""RequestToken messages"""
|
|
43
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
44
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
|
45
|
+
run_id: builtins.int
|
|
46
|
+
def __init__(self,
|
|
47
|
+
*,
|
|
48
|
+
run_id: builtins.int = ...,
|
|
49
|
+
) -> None: ...
|
|
50
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
|
51
|
+
global___RequestTokenRequest = RequestTokenRequest
|
|
52
|
+
|
|
53
|
+
class RequestTokenResponse(google.protobuf.message.Message):
|
|
54
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
55
|
+
TOKEN_FIELD_NUMBER: builtins.int
|
|
56
|
+
token: typing.Text
|
|
57
|
+
def __init__(self,
|
|
58
|
+
*,
|
|
59
|
+
token: typing.Text = ...,
|
|
60
|
+
) -> None: ...
|
|
61
|
+
def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
|
|
62
|
+
global___RequestTokenResponse = RequestTokenResponse
|
|
63
|
+
|
|
64
|
+
class PushAppMessagesRequest(google.protobuf.message.Message):
|
|
65
|
+
"""PushAppMessages messages"""
|
|
66
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
23
67
|
TOKEN_FIELD_NUMBER: builtins.int
|
|
24
68
|
MESSAGES_LIST_FIELD_NUMBER: builtins.int
|
|
25
69
|
RUN_ID_FIELD_NUMBER: builtins.int
|
flwr/proto/clientappio_pb2.py
CHANGED
|
@@ -18,21 +18,13 @@ from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
|
|
18
18
|
from flwr.proto import appio_pb2 as flwr_dot_proto_dot_appio__pb2
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
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\x1a\x16\x66lwr/proto/appio.
|
|
21
|
+
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\x1a\x16\x66lwr/proto/appio.proto2\x8a\x07\n\x0b\x43lientAppIo\x12_\n\x10ListAppsToLaunch\x12#.flwr.proto.ListAppsToLaunchRequest\x1a$.flwr.proto.ListAppsToLaunchResponse\"\x00\x12S\n\x0cRequestToken\x12\x1f.flwr.proto.RequestTokenRequest\x1a .flwr.proto.RequestTokenResponse\"\x00\x12\x41\n\x06GetRun\x12\x19.flwr.proto.GetRunRequest\x1a\x1a.flwr.proto.GetRunResponse\"\x00\x12\\\n\x13PullClientAppInputs\x12 .flwr.proto.PullAppInputsRequest\x1a!.flwr.proto.PullAppInputsResponse\"\x00\x12_\n\x14PushClientAppOutputs\x12!.flwr.proto.PushAppOutputsRequest\x1a\".flwr.proto.PushAppOutputsResponse\"\x00\x12X\n\x0bPushMessage\x12\".flwr.proto.PushAppMessagesRequest\x1a#.flwr.proto.PushAppMessagesResponse\"\x00\x12X\n\x0bPullMessage\x12\".flwr.proto.PullAppMessagesRequest\x1a#.flwr.proto.PullAppMessagesResponse\"\x00\x12M\n\nPushObject\x12\x1d.flwr.proto.PushObjectRequest\x1a\x1e.flwr.proto.PushObjectResponse\"\x00\x12M\n\nPullObject\x12\x1d.flwr.proto.PullObjectRequest\x1a\x1e.flwr.proto.PullObjectResponse\"\x00\x12q\n\x16\x43onfirmMessageReceived\x12).flwr.proto.ConfirmMessageReceivedRequest\x1a*.flwr.proto.ConfirmMessageReceivedResponse\"\x00\x62\x06proto3')
|
|
22
22
|
|
|
23
23
|
_globals = globals()
|
|
24
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
25
25
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.clientappio_pb2', _globals)
|
|
26
26
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
27
|
DESCRIPTOR._options = None
|
|
28
|
-
_globals['
|
|
29
|
-
_globals['
|
|
30
|
-
_globals['_GETRUNIDSWITHPENDINGMESSAGESRESPONSE']._serialized_start=177
|
|
31
|
-
_globals['_GETRUNIDSWITHPENDINGMESSAGESRESPONSE']._serialized_end=232
|
|
32
|
-
_globals['_REQUESTTOKENREQUEST']._serialized_start=234
|
|
33
|
-
_globals['_REQUESTTOKENREQUEST']._serialized_end=271
|
|
34
|
-
_globals['_REQUESTTOKENRESPONSE']._serialized_start=273
|
|
35
|
-
_globals['_REQUESTTOKENRESPONSE']._serialized_end=310
|
|
36
|
-
_globals['_CLIENTAPPIO']._serialized_start=313
|
|
37
|
-
_globals['_CLIENTAPPIO']._serialized_end=1256
|
|
28
|
+
_globals['_CLIENTAPPIO']._serialized_start=139
|
|
29
|
+
_globals['_CLIENTAPPIO']._serialized_end=1045
|
|
38
30
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/clientappio_pb2.pyi
CHANGED
|
@@ -2,53 +2,6 @@
|
|
|
2
2
|
@generated by mypy-protobuf. Do not edit manually!
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
|
-
import builtins
|
|
6
5
|
import google.protobuf.descriptor
|
|
7
|
-
import google.protobuf.internal.containers
|
|
8
|
-
import google.protobuf.message
|
|
9
|
-
import typing
|
|
10
|
-
import typing_extensions
|
|
11
6
|
|
|
12
7
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
13
|
-
|
|
14
|
-
class GetRunIdsWithPendingMessagesRequest(google.protobuf.message.Message):
|
|
15
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
-
def __init__(self,
|
|
17
|
-
) -> None: ...
|
|
18
|
-
global___GetRunIdsWithPendingMessagesRequest = GetRunIdsWithPendingMessagesRequest
|
|
19
|
-
|
|
20
|
-
class GetRunIdsWithPendingMessagesResponse(google.protobuf.message.Message):
|
|
21
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
22
|
-
RUN_IDS_FIELD_NUMBER: builtins.int
|
|
23
|
-
@property
|
|
24
|
-
def run_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
|
25
|
-
"""List of run IDs"""
|
|
26
|
-
pass
|
|
27
|
-
def __init__(self,
|
|
28
|
-
*,
|
|
29
|
-
run_ids: typing.Optional[typing.Iterable[builtins.int]] = ...,
|
|
30
|
-
) -> None: ...
|
|
31
|
-
def ClearField(self, field_name: typing_extensions.Literal["run_ids",b"run_ids"]) -> None: ...
|
|
32
|
-
global___GetRunIdsWithPendingMessagesResponse = GetRunIdsWithPendingMessagesResponse
|
|
33
|
-
|
|
34
|
-
class RequestTokenRequest(google.protobuf.message.Message):
|
|
35
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
36
|
-
RUN_ID_FIELD_NUMBER: builtins.int
|
|
37
|
-
run_id: builtins.int
|
|
38
|
-
def __init__(self,
|
|
39
|
-
*,
|
|
40
|
-
run_id: builtins.int = ...,
|
|
41
|
-
) -> None: ...
|
|
42
|
-
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
|
43
|
-
global___RequestTokenRequest = RequestTokenRequest
|
|
44
|
-
|
|
45
|
-
class RequestTokenResponse(google.protobuf.message.Message):
|
|
46
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
47
|
-
TOKEN_FIELD_NUMBER: builtins.int
|
|
48
|
-
token: typing.Text
|
|
49
|
-
def __init__(self,
|
|
50
|
-
*,
|
|
51
|
-
token: typing.Text = ...,
|
|
52
|
-
) -> None: ...
|
|
53
|
-
def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
|
|
54
|
-
global___RequestTokenResponse = RequestTokenResponse
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import grpc
|
|
4
4
|
|
|
5
5
|
from flwr.proto import appio_pb2 as flwr_dot_proto_dot_appio__pb2
|
|
6
|
-
from flwr.proto import clientappio_pb2 as flwr_dot_proto_dot_clientappio__pb2
|
|
7
6
|
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
|
8
7
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
9
8
|
|
|
@@ -17,15 +16,15 @@ class ClientAppIoStub(object):
|
|
|
17
16
|
Args:
|
|
18
17
|
channel: A grpc.Channel.
|
|
19
18
|
"""
|
|
20
|
-
self.
|
|
21
|
-
'/flwr.proto.ClientAppIo/
|
|
22
|
-
request_serializer=
|
|
23
|
-
response_deserializer=
|
|
19
|
+
self.ListAppsToLaunch = channel.unary_unary(
|
|
20
|
+
'/flwr.proto.ClientAppIo/ListAppsToLaunch',
|
|
21
|
+
request_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
|
|
22
|
+
response_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
|
|
24
23
|
)
|
|
25
24
|
self.RequestToken = channel.unary_unary(
|
|
26
25
|
'/flwr.proto.ClientAppIo/RequestToken',
|
|
27
|
-
request_serializer=
|
|
28
|
-
response_deserializer=
|
|
26
|
+
request_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
|
|
27
|
+
response_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
|
|
29
28
|
)
|
|
30
29
|
self.GetRun = channel.unary_unary(
|
|
31
30
|
'/flwr.proto.ClientAppIo/GetRun',
|
|
@@ -72,7 +71,7 @@ class ClientAppIoStub(object):
|
|
|
72
71
|
class ClientAppIoServicer(object):
|
|
73
72
|
"""Missing associated documentation comment in .proto file."""
|
|
74
73
|
|
|
75
|
-
def
|
|
74
|
+
def ListAppsToLaunch(self, request, context):
|
|
76
75
|
"""Get run IDs with pending messages
|
|
77
76
|
"""
|
|
78
77
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
@@ -145,15 +144,15 @@ class ClientAppIoServicer(object):
|
|
|
145
144
|
|
|
146
145
|
def add_ClientAppIoServicer_to_server(servicer, server):
|
|
147
146
|
rpc_method_handlers = {
|
|
148
|
-
'
|
|
149
|
-
servicer.
|
|
150
|
-
request_deserializer=
|
|
151
|
-
response_serializer=
|
|
147
|
+
'ListAppsToLaunch': grpc.unary_unary_rpc_method_handler(
|
|
148
|
+
servicer.ListAppsToLaunch,
|
|
149
|
+
request_deserializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.FromString,
|
|
150
|
+
response_serializer=flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.SerializeToString,
|
|
152
151
|
),
|
|
153
152
|
'RequestToken': grpc.unary_unary_rpc_method_handler(
|
|
154
153
|
servicer.RequestToken,
|
|
155
|
-
request_deserializer=
|
|
156
|
-
response_serializer=
|
|
154
|
+
request_deserializer=flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.FromString,
|
|
155
|
+
response_serializer=flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.SerializeToString,
|
|
157
156
|
),
|
|
158
157
|
'GetRun': grpc.unary_unary_rpc_method_handler(
|
|
159
158
|
servicer.GetRun,
|
|
@@ -206,7 +205,7 @@ class ClientAppIo(object):
|
|
|
206
205
|
"""Missing associated documentation comment in .proto file."""
|
|
207
206
|
|
|
208
207
|
@staticmethod
|
|
209
|
-
def
|
|
208
|
+
def ListAppsToLaunch(request,
|
|
210
209
|
target,
|
|
211
210
|
options=(),
|
|
212
211
|
channel_credentials=None,
|
|
@@ -216,9 +215,9 @@ class ClientAppIo(object):
|
|
|
216
215
|
wait_for_ready=None,
|
|
217
216
|
timeout=None,
|
|
218
217
|
metadata=None):
|
|
219
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/ListAppsToLaunch',
|
|
219
|
+
flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchRequest.SerializeToString,
|
|
220
|
+
flwr_dot_proto_dot_appio__pb2.ListAppsToLaunchResponse.FromString,
|
|
222
221
|
options, channel_credentials,
|
|
223
222
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
224
223
|
|
|
@@ -234,8 +233,8 @@ class ClientAppIo(object):
|
|
|
234
233
|
timeout=None,
|
|
235
234
|
metadata=None):
|
|
236
235
|
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/RequestToken',
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
flwr_dot_proto_dot_appio__pb2.RequestTokenRequest.SerializeToString,
|
|
237
|
+
flwr_dot_proto_dot_appio__pb2.RequestTokenResponse.FromString,
|
|
239
238
|
options, channel_credentials,
|
|
240
239
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
241
240
|
|
|
@@ -4,21 +4,20 @@ isort:skip_file
|
|
|
4
4
|
"""
|
|
5
5
|
import abc
|
|
6
6
|
import flwr.proto.appio_pb2
|
|
7
|
-
import flwr.proto.clientappio_pb2
|
|
8
7
|
import flwr.proto.message_pb2
|
|
9
8
|
import flwr.proto.run_pb2
|
|
10
9
|
import grpc
|
|
11
10
|
|
|
12
11
|
class ClientAppIoStub:
|
|
13
12
|
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
14
|
-
|
|
15
|
-
flwr.proto.
|
|
16
|
-
flwr.proto.
|
|
13
|
+
ListAppsToLaunch: grpc.UnaryUnaryMultiCallable[
|
|
14
|
+
flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
15
|
+
flwr.proto.appio_pb2.ListAppsToLaunchResponse]
|
|
17
16
|
"""Get run IDs with pending messages"""
|
|
18
17
|
|
|
19
18
|
RequestToken: grpc.UnaryUnaryMultiCallable[
|
|
20
|
-
flwr.proto.
|
|
21
|
-
flwr.proto.
|
|
19
|
+
flwr.proto.appio_pb2.RequestTokenRequest,
|
|
20
|
+
flwr.proto.appio_pb2.RequestTokenResponse]
|
|
22
21
|
"""Request token"""
|
|
23
22
|
|
|
24
23
|
GetRun: grpc.UnaryUnaryMultiCallable[
|
|
@@ -64,18 +63,18 @@ class ClientAppIoStub:
|
|
|
64
63
|
|
|
65
64
|
class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
|
66
65
|
@abc.abstractmethod
|
|
67
|
-
def
|
|
68
|
-
request: flwr.proto.
|
|
66
|
+
def ListAppsToLaunch(self,
|
|
67
|
+
request: flwr.proto.appio_pb2.ListAppsToLaunchRequest,
|
|
69
68
|
context: grpc.ServicerContext,
|
|
70
|
-
) -> flwr.proto.
|
|
69
|
+
) -> flwr.proto.appio_pb2.ListAppsToLaunchResponse:
|
|
71
70
|
"""Get run IDs with pending messages"""
|
|
72
71
|
pass
|
|
73
72
|
|
|
74
73
|
@abc.abstractmethod
|
|
75
74
|
def RequestToken(self,
|
|
76
|
-
request: flwr.proto.
|
|
75
|
+
request: flwr.proto.appio_pb2.RequestTokenRequest,
|
|
77
76
|
context: grpc.ServicerContext,
|
|
78
|
-
) -> flwr.proto.
|
|
77
|
+
) -> flwr.proto.appio_pb2.RequestTokenResponse:
|
|
79
78
|
"""Request token"""
|
|
80
79
|
pass
|
|
81
80
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: flwr/proto/control.proto
|
|
4
|
+
# Protobuf Python Version: 4.25.1
|
|
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 transport_pb2 as flwr_dot_proto_dot_transport__pb2
|
|
17
|
+
from flwr.proto import recorddict_pb2 as flwr_dot_proto_dot_recorddict__pb2
|
|
18
|
+
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/control.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x1a\x66lwr/proto/transport.proto\x1a\x1b\x66lwr/proto/recorddict.proto\x1a\x14\x66lwr/proto/run.proto\"\xfa\x01\n\x0fStartRunRequest\x12\x1c\n\x03\x66\x61\x62\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Fab\x12H\n\x0foverride_config\x18\x02 \x03(\x0b\x32/.flwr.proto.StartRunRequest.OverrideConfigEntry\x12\x34\n\x12\x66\x65\x64\x65ration_options\x18\x03 \x01(\x0b\x32\x18.flwr.proto.ConfigRecord\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\"2\n\x10StartRunResponse\x12\x13\n\x06run_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\t\n\x07_run_id\"<\n\x11StreamLogsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x17\n\x0f\x61\x66ter_timestamp\x18\x02 \x01(\x01\"B\n\x12StreamLogsResponse\x12\x12\n\nlog_output\x18\x01 \x01(\t\x12\x18\n\x10latest_timestamp\x18\x02 \x01(\x01\"1\n\x0fListRunsRequest\x12\x13\n\x06run_id\x18\x01 \x01(\x04H\x00\x88\x01\x01\x42\t\n\x07_run_id\"\x9d\x01\n\x10ListRunsResponse\x12;\n\x08run_dict\x18\x01 \x03(\x0b\x32).flwr.proto.ListRunsResponse.RunDictEntry\x12\x0b\n\x03now\x18\x02 \x01(\t\x1a?\n\x0cRunDictEntry\x12\x0b\n\x03key\x18\x01 \x01(\x04\x12\x1e\n\x05value\x18\x02 \x01(\x0b\x32\x0f.flwr.proto.Run:\x02\x38\x01\"\x18\n\x16GetLoginDetailsRequest\"\x8a\x01\n\x17GetLoginDetailsResponse\x12\x11\n\tauth_type\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65vice_code\x18\x02 \x01(\t\x12!\n\x19verification_uri_complete\x18\x03 \x01(\t\x12\x12\n\nexpires_in\x18\x04 \x01(\x03\x12\x10\n\x08interval\x18\x05 \x01(\x03\"+\n\x14GetAuthTokensRequest\x12\x13\n\x0b\x64\x65vice_code\x18\x01 \x01(\t\"D\n\x15GetAuthTokensResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12\x15\n\rrefresh_token\x18\x02 \x01(\t\" \n\x0eStopRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"\"\n\x0fStopRunResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"&\n\x14PullArtifactsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"1\n\x15PullArtifactsResponse\x12\x10\n\x03url\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x06\n\x04_url2\xc0\x04\n\x07\x43ontrol\x12G\n\x08StartRun\x12\x1b.flwr.proto.StartRunRequest\x1a\x1c.flwr.proto.StartRunResponse\"\x00\x12\x44\n\x07StopRun\x12\x1a.flwr.proto.StopRunRequest\x1a\x1b.flwr.proto.StopRunResponse\"\x00\x12O\n\nStreamLogs\x12\x1d.flwr.proto.StreamLogsRequest\x1a\x1e.flwr.proto.StreamLogsResponse\"\x00\x30\x01\x12G\n\x08ListRuns\x12\x1b.flwr.proto.ListRunsRequest\x1a\x1c.flwr.proto.ListRunsResponse\"\x00\x12\\\n\x0fGetLoginDetails\x12\".flwr.proto.GetLoginDetailsRequest\x1a#.flwr.proto.GetLoginDetailsResponse\"\x00\x12V\n\rGetAuthTokens\x12 .flwr.proto.GetAuthTokensRequest\x1a!.flwr.proto.GetAuthTokensResponse\"\x00\x12V\n\rPullArtifacts\x12 .flwr.proto.PullArtifactsRequest\x1a!.flwr.proto.PullArtifactsResponse\"\x00\x62\x06proto3')
|
|
22
|
+
|
|
23
|
+
_globals = globals()
|
|
24
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
25
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.control_pb2', _globals)
|
|
26
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
|
+
DESCRIPTOR._options = None
|
|
28
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._options = None
|
|
29
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
30
|
+
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._options = None
|
|
31
|
+
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_options = b'8\001'
|
|
32
|
+
_globals['_STARTRUNREQUEST']._serialized_start=142
|
|
33
|
+
_globals['_STARTRUNREQUEST']._serialized_end=392
|
|
34
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=319
|
|
35
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=392
|
|
36
|
+
_globals['_STARTRUNRESPONSE']._serialized_start=394
|
|
37
|
+
_globals['_STARTRUNRESPONSE']._serialized_end=444
|
|
38
|
+
_globals['_STREAMLOGSREQUEST']._serialized_start=446
|
|
39
|
+
_globals['_STREAMLOGSREQUEST']._serialized_end=506
|
|
40
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_start=508
|
|
41
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_end=574
|
|
42
|
+
_globals['_LISTRUNSREQUEST']._serialized_start=576
|
|
43
|
+
_globals['_LISTRUNSREQUEST']._serialized_end=625
|
|
44
|
+
_globals['_LISTRUNSRESPONSE']._serialized_start=628
|
|
45
|
+
_globals['_LISTRUNSRESPONSE']._serialized_end=785
|
|
46
|
+
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_start=722
|
|
47
|
+
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_end=785
|
|
48
|
+
_globals['_GETLOGINDETAILSREQUEST']._serialized_start=787
|
|
49
|
+
_globals['_GETLOGINDETAILSREQUEST']._serialized_end=811
|
|
50
|
+
_globals['_GETLOGINDETAILSRESPONSE']._serialized_start=814
|
|
51
|
+
_globals['_GETLOGINDETAILSRESPONSE']._serialized_end=952
|
|
52
|
+
_globals['_GETAUTHTOKENSREQUEST']._serialized_start=954
|
|
53
|
+
_globals['_GETAUTHTOKENSREQUEST']._serialized_end=997
|
|
54
|
+
_globals['_GETAUTHTOKENSRESPONSE']._serialized_start=999
|
|
55
|
+
_globals['_GETAUTHTOKENSRESPONSE']._serialized_end=1067
|
|
56
|
+
_globals['_STOPRUNREQUEST']._serialized_start=1069
|
|
57
|
+
_globals['_STOPRUNREQUEST']._serialized_end=1101
|
|
58
|
+
_globals['_STOPRUNRESPONSE']._serialized_start=1103
|
|
59
|
+
_globals['_STOPRUNRESPONSE']._serialized_end=1137
|
|
60
|
+
_globals['_PULLARTIFACTSREQUEST']._serialized_start=1139
|
|
61
|
+
_globals['_PULLARTIFACTSREQUEST']._serialized_end=1177
|
|
62
|
+
_globals['_PULLARTIFACTSRESPONSE']._serialized_start=1179
|
|
63
|
+
_globals['_PULLARTIFACTSRESPONSE']._serialized_end=1228
|
|
64
|
+
_globals['_CONTROL']._serialized_start=1231
|
|
65
|
+
_globals['_CONTROL']._serialized_end=1807
|
|
66
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -210,3 +210,27 @@ class StopRunResponse(google.protobuf.message.Message):
|
|
|
210
210
|
) -> None: ...
|
|
211
211
|
def ClearField(self, field_name: typing_extensions.Literal["success",b"success"]) -> None: ...
|
|
212
212
|
global___StopRunResponse = StopRunResponse
|
|
213
|
+
|
|
214
|
+
class PullArtifactsRequest(google.protobuf.message.Message):
|
|
215
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
216
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
|
217
|
+
run_id: builtins.int
|
|
218
|
+
def __init__(self,
|
|
219
|
+
*,
|
|
220
|
+
run_id: builtins.int = ...,
|
|
221
|
+
) -> None: ...
|
|
222
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
|
223
|
+
global___PullArtifactsRequest = PullArtifactsRequest
|
|
224
|
+
|
|
225
|
+
class PullArtifactsResponse(google.protobuf.message.Message):
|
|
226
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
227
|
+
URL_FIELD_NUMBER: builtins.int
|
|
228
|
+
url: typing.Text
|
|
229
|
+
def __init__(self,
|
|
230
|
+
*,
|
|
231
|
+
url: typing.Optional[typing.Text] = ...,
|
|
232
|
+
) -> None: ...
|
|
233
|
+
def HasField(self, field_name: typing_extensions.Literal["_url",b"_url","url",b"url"]) -> builtins.bool: ...
|
|
234
|
+
def ClearField(self, field_name: typing_extensions.Literal["_url",b"_url","url",b"url"]) -> None: ...
|
|
235
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_url",b"_url"]) -> typing.Optional[typing_extensions.Literal["url"]]: ...
|
|
236
|
+
global___PullArtifactsResponse = PullArtifactsResponse
|