flwr-nightly 1.21.0.dev20250802__py3-none-any.whl → 1.21.0.dev20250804__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/cli/auth_plugin/oidc_cli_plugin.py +4 -4
- flwr/cli/cli_user_auth_interceptor.py +1 -1
- flwr/cli/config_utils.py +2 -2
- flwr/cli/log.py +9 -9
- flwr/cli/login/login.py +3 -3
- flwr/cli/ls.py +5 -5
- flwr/cli/run/run.py +7 -7
- flwr/cli/stop.py +7 -4
- flwr/cli/utils.py +1 -1
- flwr/common/auth_plugin/__init__.py +4 -4
- flwr/common/auth_plugin/auth_plugin.py +7 -7
- flwr/common/constant.py +4 -4
- flwr/common/event_log_plugin/event_log_plugin.py +1 -1
- flwr/proto/control_pb2.py +62 -0
- flwr/proto/{exec_pb2_grpc.py → control_pb2_grpc.py} +54 -54
- flwr/proto/{exec_pb2_grpc.pyi → control_pb2_grpc.pyi} +28 -28
- flwr/server/app.py +36 -36
- flwr/superlink/executor/__init__.py +1 -1
- flwr/superlink/servicer/{exec → control}/__init__.py +3 -3
- flwr/superlink/servicer/{exec/exec_event_log_interceptor.py → control/control_event_log_interceptor.py} +7 -7
- flwr/superlink/servicer/{exec/exec_grpc.py → control/control_grpc.py} +22 -22
- flwr/superlink/servicer/{exec/exec_license_interceptor.py → control/control_license_interceptor.py} +6 -6
- flwr/superlink/servicer/{exec/exec_servicer.py → control/control_servicer.py} +16 -16
- flwr/superlink/servicer/{exec/exec_user_auth_interceptor.py → control/control_user_auth_interceptor.py} +10 -10
- {flwr_nightly-1.21.0.dev20250802.dist-info → flwr_nightly-1.21.0.dev20250804.dist-info}/METADATA +1 -1
- {flwr_nightly-1.21.0.dev20250802.dist-info → flwr_nightly-1.21.0.dev20250804.dist-info}/RECORD +29 -29
- flwr/proto/exec_pb2.py +0 -62
- /flwr/proto/{exec_pb2.pyi → control_pb2.pyi} +0 -0
- {flwr_nightly-1.21.0.dev20250802.dist-info → flwr_nightly-1.21.0.dev20250804.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.21.0.dev20250802.dist-info → flwr_nightly-1.21.0.dev20250804.dist-info}/entry_points.txt +0 -0
@@ -31,11 +31,11 @@ from flwr.common.constant import (
|
|
31
31
|
AuthType,
|
32
32
|
)
|
33
33
|
from flwr.common.typing import UserAuthCredentials, UserAuthLoginDetails
|
34
|
-
from flwr.proto.
|
34
|
+
from flwr.proto.control_pb2 import ( # pylint: disable=E0611
|
35
35
|
GetAuthTokensRequest,
|
36
36
|
GetAuthTokensResponse,
|
37
37
|
)
|
38
|
-
from flwr.proto.
|
38
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
39
39
|
|
40
40
|
|
41
41
|
class OidcCliPlugin(CliAuthPlugin):
|
@@ -49,7 +49,7 @@ class OidcCliPlugin(CliAuthPlugin):
|
|
49
49
|
@staticmethod
|
50
50
|
def login(
|
51
51
|
login_details: UserAuthLoginDetails,
|
52
|
-
|
52
|
+
control_stub: ControlStub,
|
53
53
|
) -> UserAuthCredentials:
|
54
54
|
"""Authenticate the user and retrieve authentication credentials."""
|
55
55
|
typer.secho(
|
@@ -61,7 +61,7 @@ class OidcCliPlugin(CliAuthPlugin):
|
|
61
61
|
time.sleep(login_details.interval)
|
62
62
|
|
63
63
|
while (time.time() - start_time) < login_details.expires_in:
|
64
|
-
res: GetAuthTokensResponse =
|
64
|
+
res: GetAuthTokensResponse = control_stub.GetAuthTokens(
|
65
65
|
GetAuthTokensRequest(device_code=login_details.device_code)
|
66
66
|
)
|
67
67
|
|
@@ -20,7 +20,7 @@ from typing import Any, Callable, Union
|
|
20
20
|
import grpc
|
21
21
|
|
22
22
|
from flwr.common.auth_plugin import CliAuthPlugin
|
23
|
-
from flwr.proto.
|
23
|
+
from flwr.proto.control_pb2 import ( # pylint: disable=E0611
|
24
24
|
StartRunRequest,
|
25
25
|
StreamLogsRequest,
|
26
26
|
)
|
flwr/cli/config_utils.py
CHANGED
@@ -143,7 +143,7 @@ def validate_federation_in_project_config(
|
|
143
143
|
if federation is None:
|
144
144
|
typer.secho(
|
145
145
|
"❌ No federation name was provided and the project's `pyproject.toml` "
|
146
|
-
"doesn't declare a default federation (with an
|
146
|
+
"doesn't declare a default federation (with an Control API address or an "
|
147
147
|
"`options.num-supernodes` value).",
|
148
148
|
fg=typer.colors.RED,
|
149
149
|
bold=True,
|
@@ -231,7 +231,7 @@ def exit_if_no_address(federation_config: dict[str, Any], cmd: str) -> None:
|
|
231
231
|
if "address" not in federation_config:
|
232
232
|
typer.secho(
|
233
233
|
f"❌ `flwr {cmd}` currently works with a SuperLink. Ensure that the correct"
|
234
|
-
"SuperLink (
|
234
|
+
"SuperLink (Control API) address is provided in `pyproject.toml`.",
|
235
235
|
fg=typer.colors.RED,
|
236
236
|
bold=True,
|
237
237
|
)
|
flwr/cli/log.py
CHANGED
@@ -32,8 +32,8 @@ from flwr.cli.config_utils import (
|
|
32
32
|
from flwr.cli.constant import FEDERATION_CONFIG_HELP_MESSAGE
|
33
33
|
from flwr.common.constant import CONN_RECONNECT_INTERVAL, CONN_REFRESH_PERIOD
|
34
34
|
from flwr.common.logger import log as logger
|
35
|
-
from flwr.proto.
|
36
|
-
from flwr.proto.
|
35
|
+
from flwr.proto.control_pb2 import StreamLogsRequest # pylint: disable=E0611
|
36
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
37
37
|
|
38
38
|
from .utils import flwr_cli_grpc_exc_handler, init_channel, try_obtain_cli_auth_plugin
|
39
39
|
|
@@ -46,7 +46,7 @@ def start_stream(
|
|
46
46
|
run_id: int, channel: grpc.Channel, refresh_period: int = CONN_REFRESH_PERIOD
|
47
47
|
) -> None:
|
48
48
|
"""Start log streaming for a given run ID."""
|
49
|
-
stub =
|
49
|
+
stub = ControlStub(channel)
|
50
50
|
after_timestamp = 0.0
|
51
51
|
try:
|
52
52
|
logger(INFO, "Starting logstream for run_id `%s`", run_id)
|
@@ -69,7 +69,7 @@ def start_stream(
|
|
69
69
|
|
70
70
|
|
71
71
|
def stream_logs(
|
72
|
-
run_id: int, stub:
|
72
|
+
run_id: int, stub: ControlStub, duration: int, after_timestamp: float
|
73
73
|
) -> float:
|
74
74
|
"""Stream logs from the beginning of a run with connection refresh.
|
75
75
|
|
@@ -77,8 +77,8 @@ def stream_logs(
|
|
77
77
|
----------
|
78
78
|
run_id : int
|
79
79
|
The identifier of the run.
|
80
|
-
stub :
|
81
|
-
The gRPC stub to interact with the
|
80
|
+
stub : ControlStub
|
81
|
+
The gRPC stub to interact with the Control service.
|
82
82
|
duration : int
|
83
83
|
The timeout duration for each stream connection in seconds.
|
84
84
|
after_timestamp : float
|
@@ -112,7 +112,7 @@ def stream_logs(
|
|
112
112
|
|
113
113
|
def print_logs(run_id: int, channel: grpc.Channel, timeout: int) -> None:
|
114
114
|
"""Print logs from the beginning of a run."""
|
115
|
-
stub =
|
115
|
+
stub = ControlStub(channel)
|
116
116
|
req = StreamLogsRequest(run_id=run_id, after_timestamp=0.0)
|
117
117
|
|
118
118
|
try:
|
@@ -173,13 +173,13 @@ def log(
|
|
173
173
|
exit_if_no_address(federation_config, "log")
|
174
174
|
|
175
175
|
try:
|
176
|
-
|
176
|
+
_log_with_control_api(app, federation, federation_config, run_id, stream)
|
177
177
|
except Exception as err: # pylint: disable=broad-except
|
178
178
|
typer.secho(str(err), fg=typer.colors.RED, bold=True)
|
179
179
|
raise typer.Exit(code=1) from None
|
180
180
|
|
181
181
|
|
182
|
-
def
|
182
|
+
def _log_with_control_api(
|
183
183
|
app: Path,
|
184
184
|
federation: str,
|
185
185
|
federation_config: dict[str, Any],
|
flwr/cli/login/login.py
CHANGED
@@ -29,11 +29,11 @@ from flwr.cli.config_utils import (
|
|
29
29
|
)
|
30
30
|
from flwr.cli.constant import FEDERATION_CONFIG_HELP_MESSAGE
|
31
31
|
from flwr.common.typing import UserAuthLoginDetails
|
32
|
-
from flwr.proto.
|
32
|
+
from flwr.proto.control_pb2 import ( # pylint: disable=E0611
|
33
33
|
GetLoginDetailsRequest,
|
34
34
|
GetLoginDetailsResponse,
|
35
35
|
)
|
36
|
-
from flwr.proto.
|
36
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
37
37
|
|
38
38
|
from ..utils import flwr_cli_grpc_exc_handler, init_channel, try_obtain_cli_auth_plugin
|
39
39
|
|
@@ -89,7 +89,7 @@ def login( # pylint: disable=R0914
|
|
89
89
|
raise typer.Exit(code=1)
|
90
90
|
|
91
91
|
channel = init_channel(app, federation_config, None)
|
92
|
-
stub =
|
92
|
+
stub = ControlStub(channel)
|
93
93
|
|
94
94
|
login_request = GetLoginDetailsRequest()
|
95
95
|
with flwr_cli_grpc_exc_handler():
|
flwr/cli/ls.py
CHANGED
@@ -38,11 +38,11 @@ from flwr.common.date import format_timedelta, isoformat8601_utc
|
|
38
38
|
from flwr.common.logger import print_json_error, redirect_output, restore_output
|
39
39
|
from flwr.common.serde import run_from_proto
|
40
40
|
from flwr.common.typing import Run
|
41
|
-
from flwr.proto.
|
41
|
+
from flwr.proto.control_pb2 import ( # pylint: disable=E0611
|
42
42
|
ListRunsRequest,
|
43
43
|
ListRunsResponse,
|
44
44
|
)
|
45
|
-
from flwr.proto.
|
45
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
46
46
|
|
47
47
|
from .utils import flwr_cli_grpc_exc_handler, init_channel, try_obtain_cli_auth_plugin
|
48
48
|
|
@@ -125,7 +125,7 @@ def ls( # pylint: disable=too-many-locals, too-many-branches, R0913, R0917
|
|
125
125
|
)
|
126
126
|
auth_plugin = try_obtain_cli_auth_plugin(app, federation, federation_config)
|
127
127
|
channel = init_channel(app, federation_config, auth_plugin)
|
128
|
-
stub =
|
128
|
+
stub = ControlStub(channel)
|
129
129
|
|
130
130
|
# Display information about a specific run ID
|
131
131
|
if run_id is not None:
|
@@ -293,7 +293,7 @@ def _to_json(run_list: list[_RunListType]) -> str:
|
|
293
293
|
return json.dumps({"success": True, "runs": runs_list})
|
294
294
|
|
295
295
|
|
296
|
-
def _list_runs(stub:
|
296
|
+
def _list_runs(stub: ControlStub) -> list[_RunListType]:
|
297
297
|
"""List all runs."""
|
298
298
|
with flwr_cli_grpc_exc_handler():
|
299
299
|
res: ListRunsResponse = stub.ListRuns(ListRunsRequest())
|
@@ -302,7 +302,7 @@ def _list_runs(stub: ExecStub) -> list[_RunListType]:
|
|
302
302
|
return _format_runs(run_dict, res.now)
|
303
303
|
|
304
304
|
|
305
|
-
def _display_one_run(stub:
|
305
|
+
def _display_one_run(stub: ControlStub, run_id: int) -> list[_RunListType]:
|
306
306
|
"""Display information about a specific run."""
|
307
307
|
with flwr_cli_grpc_exc_handler():
|
308
308
|
res: ListRunsResponse = stub.ListRuns(ListRunsRequest(run_id=run_id))
|
flwr/cli/run/run.py
CHANGED
@@ -41,8 +41,8 @@ from flwr.common.constant import CliOutputFormat
|
|
41
41
|
from flwr.common.logger import print_json_error, redirect_output, restore_output
|
42
42
|
from flwr.common.serde import config_record_to_proto, fab_to_proto, user_config_to_proto
|
43
43
|
from flwr.common.typing import Fab
|
44
|
-
from flwr.proto.
|
45
|
-
from flwr.proto.
|
44
|
+
from flwr.proto.control_pb2 import StartRunRequest # pylint: disable=E0611
|
45
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
46
46
|
|
47
47
|
from ..log import start_stream
|
48
48
|
from ..utils import flwr_cli_grpc_exc_handler, init_channel, try_obtain_cli_auth_plugin
|
@@ -112,7 +112,7 @@ def run(
|
|
112
112
|
)
|
113
113
|
|
114
114
|
if "address" in federation_config:
|
115
|
-
|
115
|
+
_run_with_control_api(
|
116
116
|
app,
|
117
117
|
federation,
|
118
118
|
federation_config,
|
@@ -121,7 +121,7 @@ def run(
|
|
121
121
|
output_format,
|
122
122
|
)
|
123
123
|
else:
|
124
|
-
|
124
|
+
_run_without_control_api(
|
125
125
|
app, federation_config, run_config_overrides, federation
|
126
126
|
)
|
127
127
|
except (typer.Exit, Exception) as err: # pylint: disable=broad-except
|
@@ -142,7 +142,7 @@ def run(
|
|
142
142
|
|
143
143
|
|
144
144
|
# pylint: disable-next=R0913, R0914, R0917
|
145
|
-
def
|
145
|
+
def _run_with_control_api(
|
146
146
|
app: Path,
|
147
147
|
federation: str,
|
148
148
|
federation_config: dict[str, Any],
|
@@ -154,7 +154,7 @@ def _run_with_exec_api(
|
|
154
154
|
try:
|
155
155
|
auth_plugin = try_obtain_cli_auth_plugin(app, federation, federation_config)
|
156
156
|
channel = init_channel(app, federation_config, auth_plugin)
|
157
|
-
stub =
|
157
|
+
stub = ControlStub(channel)
|
158
158
|
|
159
159
|
fab_bytes, fab_hash, config = build_fab(app)
|
160
160
|
fab_id, fab_version = get_metadata_from_config(config)
|
@@ -203,7 +203,7 @@ def _run_with_exec_api(
|
|
203
203
|
channel.close()
|
204
204
|
|
205
205
|
|
206
|
-
def
|
206
|
+
def _run_without_control_api(
|
207
207
|
app: Optional[Path],
|
208
208
|
federation_config: dict[str, Any],
|
209
209
|
config_overrides: Optional[list[str]],
|
flwr/cli/stop.py
CHANGED
@@ -32,8 +32,11 @@ from flwr.cli.config_utils import (
|
|
32
32
|
from flwr.cli.constant import FEDERATION_CONFIG_HELP_MESSAGE
|
33
33
|
from flwr.common.constant import FAB_CONFIG_FILE, CliOutputFormat
|
34
34
|
from flwr.common.logger import print_json_error, redirect_output, restore_output
|
35
|
-
from flwr.proto.
|
36
|
-
|
35
|
+
from flwr.proto.control_pb2 import ( # pylint: disable=E0611
|
36
|
+
StopRunRequest,
|
37
|
+
StopRunResponse,
|
38
|
+
)
|
39
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
37
40
|
|
38
41
|
from .utils import flwr_cli_grpc_exc_handler, init_channel, try_obtain_cli_auth_plugin
|
39
42
|
|
@@ -88,7 +91,7 @@ def stop( # pylint: disable=R0914
|
|
88
91
|
try:
|
89
92
|
auth_plugin = try_obtain_cli_auth_plugin(app, federation, federation_config)
|
90
93
|
channel = init_channel(app, federation_config, auth_plugin)
|
91
|
-
stub =
|
94
|
+
stub = ControlStub(channel) # pylint: disable=unused-variable # noqa: F841
|
92
95
|
|
93
96
|
typer.secho(f"✋ Stopping run ID {run_id}...", fg=typer.colors.GREEN)
|
94
97
|
_stop_run(stub=stub, run_id=run_id, output_format=output_format)
|
@@ -120,7 +123,7 @@ def stop( # pylint: disable=R0914
|
|
120
123
|
captured_output.close()
|
121
124
|
|
122
125
|
|
123
|
-
def _stop_run(stub:
|
126
|
+
def _stop_run(stub: ControlStub, run_id: int, output_format: str) -> None:
|
124
127
|
"""Stop a run."""
|
125
128
|
with flwr_cli_grpc_exc_handler():
|
126
129
|
response: StopRunResponse = stub.StopRun(request=StopRunRequest(run_id=run_id))
|
flwr/cli/utils.py
CHANGED
@@ -259,7 +259,7 @@ def try_obtain_cli_auth_plugin(
|
|
259
259
|
def init_channel(
|
260
260
|
app: Path, federation_config: dict[str, Any], auth_plugin: Optional[CliAuthPlugin]
|
261
261
|
) -> grpc.Channel:
|
262
|
-
"""Initialize gRPC channel to the
|
262
|
+
"""Initialize gRPC channel to the Control API."""
|
263
263
|
insecure, root_certificates_bytes = validate_certificate_in_federation_config(
|
264
264
|
app, federation_config
|
265
265
|
)
|
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
from .auth_plugin import CliAuthPlugin as CliAuthPlugin
|
19
|
-
from .auth_plugin import
|
20
|
-
from .auth_plugin import
|
19
|
+
from .auth_plugin import ControlAuthPlugin as ControlAuthPlugin
|
20
|
+
from .auth_plugin import ControlAuthzPlugin as ControlAuthzPlugin
|
21
21
|
|
22
22
|
__all__ = [
|
23
23
|
"CliAuthPlugin",
|
24
|
-
"
|
25
|
-
"
|
24
|
+
"ControlAuthPlugin",
|
25
|
+
"ControlAuthzPlugin",
|
26
26
|
]
|
@@ -21,13 +21,13 @@ from pathlib import Path
|
|
21
21
|
from typing import Optional, Union
|
22
22
|
|
23
23
|
from flwr.common.typing import AccountInfo
|
24
|
-
from flwr.proto.
|
24
|
+
from flwr.proto.control_pb2_grpc import ControlStub
|
25
25
|
|
26
26
|
from ..typing import UserAuthCredentials, UserAuthLoginDetails
|
27
27
|
|
28
28
|
|
29
|
-
class
|
30
|
-
"""Abstract Flower Auth Plugin class for
|
29
|
+
class ControlAuthPlugin(ABC):
|
30
|
+
"""Abstract Flower Auth Plugin class for ControlServicer.
|
31
31
|
|
32
32
|
Parameters
|
33
33
|
----------
|
@@ -69,8 +69,8 @@ class ExecAuthPlugin(ABC):
|
|
69
69
|
"""Refresh authentication tokens in the provided metadata."""
|
70
70
|
|
71
71
|
|
72
|
-
class
|
73
|
-
"""Abstract Flower Authorization Plugin class for
|
72
|
+
class ControlAuthzPlugin(ABC): # pylint: disable=too-few-public-methods
|
73
|
+
"""Abstract Flower Authorization Plugin class for ControlServicer.
|
74
74
|
|
75
75
|
Parameters
|
76
76
|
----------
|
@@ -103,7 +103,7 @@ class CliAuthPlugin(ABC):
|
|
103
103
|
@abstractmethod
|
104
104
|
def login(
|
105
105
|
login_details: UserAuthLoginDetails,
|
106
|
-
|
106
|
+
control_stub: ControlStub,
|
107
107
|
) -> UserAuthCredentials:
|
108
108
|
"""Authenticate the user and retrieve authentication credentials.
|
109
109
|
|
@@ -111,7 +111,7 @@ class CliAuthPlugin(ABC):
|
|
111
111
|
----------
|
112
112
|
login_details : UserAuthLoginDetails
|
113
113
|
An object containing the user's login details.
|
114
|
-
|
114
|
+
control_stub : ControlStub
|
115
115
|
A stub for executing RPC calls to the server.
|
116
116
|
|
117
117
|
Returns
|
flwr/common/constant.py
CHANGED
@@ -35,7 +35,7 @@ CLIENTAPPIO_PORT = "9094"
|
|
35
35
|
SERVERAPPIO_PORT = "9091"
|
36
36
|
FLEETAPI_GRPC_RERE_PORT = "9092"
|
37
37
|
FLEETAPI_PORT = "9095"
|
38
|
-
|
38
|
+
CONTROL_API_PORT = "9093"
|
39
39
|
SIMULATIONIO_PORT = "9096"
|
40
40
|
# Octets
|
41
41
|
SERVER_OCTET = "0.0.0.0"
|
@@ -51,7 +51,7 @@ FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS = (
|
|
51
51
|
"[::]:8080" # IPv6 to keep start_server compatible
|
52
52
|
)
|
53
53
|
FLEET_API_REST_DEFAULT_ADDRESS = f"{SERVER_OCTET}:{FLEETAPI_PORT}"
|
54
|
-
|
54
|
+
CONTROL_API_DEFAULT_SERVER_ADDRESS = f"{SERVER_OCTET}:{CONTROL_API_PORT}"
|
55
55
|
SIMULATIONIO_API_DEFAULT_SERVER_ADDRESS = f"{SERVER_OCTET}:{SIMULATIONIO_PORT}"
|
56
56
|
SIMULATIONIO_API_DEFAULT_CLIENT_ADDRESS = f"{CLIENT_OCTET}:{SIMULATIONIO_PORT}"
|
57
57
|
|
@@ -103,7 +103,7 @@ ISOLATION_MODE_PROCESS = "process"
|
|
103
103
|
# Log streaming configurations
|
104
104
|
CONN_REFRESH_PERIOD = 60 # Stream connection refresh period
|
105
105
|
CONN_RECONNECT_INTERVAL = 0.5 # Reconnect interval between two stream connections
|
106
|
-
LOG_STREAM_INTERVAL = 0.5 # Log stream interval for `
|
106
|
+
LOG_STREAM_INTERVAL = 0.5 # Log stream interval for `ControlServicer.StreamLogs`
|
107
107
|
LOG_UPLOAD_INTERVAL = 0.2 # Minimum interval between two log uploads
|
108
108
|
|
109
109
|
# Retry configurations
|
@@ -152,7 +152,7 @@ PULL_INITIAL_BACKOFF = 1 # Initial backoff time for pulling objects
|
|
152
152
|
PULL_BACKOFF_CAP = 10 # Maximum backoff time for pulling objects
|
153
153
|
|
154
154
|
|
155
|
-
#
|
155
|
+
# ControlServicer constants
|
156
156
|
RUN_ID_NOT_FOUND_MESSAGE = "Run ID not found"
|
157
157
|
|
158
158
|
|
@@ -25,7 +25,7 @@ from flwr.common.typing import AccountInfo, LogEntry
|
|
25
25
|
|
26
26
|
|
27
27
|
class EventLogWriterPlugin(ABC):
|
28
|
-
"""Abstract Flower Event Log Writer Plugin class for
|
28
|
+
"""Abstract Flower Event Log Writer Plugin class for ControlServicer."""
|
29
29
|
|
30
30
|
@abstractmethod
|
31
31
|
def __init__(self) -> None:
|
@@ -0,0 +1,62 @@
|
|
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\x32\xe8\x03\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\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['_CONTROL']._serialized_start=1140
|
61
|
+
_globals['_CONTROL']._serialized_end=1628
|
62
|
+
# @@protoc_insertion_point(module_scope)
|