flwr-nightly 1.14.0.dev20241207__py3-none-any.whl → 1.14.0.dev20241209__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 +2 -0
- flwr/cli/stop.py +121 -0
- flwr/proto/exec_pb2.py +27 -7
- flwr/proto/exec_pb2.pyi +81 -0
- flwr/proto/exec_pb2_grpc.py +68 -0
- flwr/proto/exec_pb2_grpc.pyi +26 -0
- flwr/proto/simulationio_pb2.py +2 -2
- flwr/proto/simulationio_pb2_grpc.py +34 -0
- flwr/proto/simulationio_pb2_grpc.pyi +13 -0
- flwr/server/superlink/simulation/simulationio_servicer.py +19 -0
- flwr/superexec/exec_servicer.py +18 -0
- {flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/METADATA +1 -1
- {flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/RECORD +16 -15
- {flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/entry_points.txt +0 -0
flwr/cli/app.py
CHANGED
|
@@ -23,6 +23,7 @@ from .log import log
|
|
|
23
23
|
from .ls import ls
|
|
24
24
|
from .new import new
|
|
25
25
|
from .run import run
|
|
26
|
+
from .stop import stop
|
|
26
27
|
|
|
27
28
|
app = typer.Typer(
|
|
28
29
|
help=typer.style(
|
|
@@ -39,6 +40,7 @@ app.command()(build)
|
|
|
39
40
|
app.command()(install)
|
|
40
41
|
app.command()(log)
|
|
41
42
|
app.command()(ls)
|
|
43
|
+
app.command()(stop)
|
|
42
44
|
|
|
43
45
|
typer_click_object = get_command(app)
|
|
44
46
|
|
flwr/cli/stop.py
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Copyright 2024 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
|
+
# ==============================================================================
|
|
15
|
+
"""Flower command line interface `stop` command."""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from logging import DEBUG
|
|
19
|
+
from pathlib import Path
|
|
20
|
+
from typing import Annotated, Any, Optional
|
|
21
|
+
|
|
22
|
+
import grpc
|
|
23
|
+
import typer
|
|
24
|
+
|
|
25
|
+
from flwr.cli.config_utils import (
|
|
26
|
+
load_and_validate,
|
|
27
|
+
validate_certificate_in_federation_config,
|
|
28
|
+
validate_federation_in_project_config,
|
|
29
|
+
validate_project_config,
|
|
30
|
+
)
|
|
31
|
+
from flwr.common.constant import FAB_CONFIG_FILE
|
|
32
|
+
from flwr.common.grpc import GRPC_MAX_MESSAGE_LENGTH, create_channel
|
|
33
|
+
from flwr.common.logger import log
|
|
34
|
+
from flwr.proto.exec_pb2 import StopRunRequest, StopRunResponse # pylint: disable=E0611
|
|
35
|
+
from flwr.proto.exec_pb2_grpc import ExecStub
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def stop(
|
|
39
|
+
run_id: Annotated[ # pylint: disable=unused-argument
|
|
40
|
+
int,
|
|
41
|
+
typer.Argument(help="The Flower run ID to stop"),
|
|
42
|
+
],
|
|
43
|
+
app: Annotated[
|
|
44
|
+
Path,
|
|
45
|
+
typer.Argument(help="Path of the Flower project"),
|
|
46
|
+
] = Path("."),
|
|
47
|
+
federation: Annotated[
|
|
48
|
+
Optional[str],
|
|
49
|
+
typer.Argument(help="Name of the federation"),
|
|
50
|
+
] = None,
|
|
51
|
+
) -> None:
|
|
52
|
+
"""Stop a run."""
|
|
53
|
+
# Load and validate federation config
|
|
54
|
+
typer.secho("Loading project configuration... ", fg=typer.colors.BLUE)
|
|
55
|
+
|
|
56
|
+
pyproject_path = app / FAB_CONFIG_FILE if app else None
|
|
57
|
+
config, errors, warnings = load_and_validate(path=pyproject_path)
|
|
58
|
+
config = validate_project_config(config, errors, warnings)
|
|
59
|
+
federation, federation_config = validate_federation_in_project_config(
|
|
60
|
+
federation, config
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
if "address" not in federation_config:
|
|
64
|
+
typer.secho(
|
|
65
|
+
"❌ `flwr stop` currently works with Exec API. Ensure that the correct"
|
|
66
|
+
"Exec API address is provided in the `pyproject.toml`.",
|
|
67
|
+
fg=typer.colors.RED,
|
|
68
|
+
bold=True,
|
|
69
|
+
)
|
|
70
|
+
raise typer.Exit(code=1)
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
channel = _init_channel(app, federation_config)
|
|
74
|
+
stub = ExecStub(channel) # pylint: disable=unused-variable # noqa: F841
|
|
75
|
+
|
|
76
|
+
typer.secho(f"✋ Stopping run ID {run_id}...", fg=typer.colors.GREEN)
|
|
77
|
+
_stop_run(stub, run_id=run_id)
|
|
78
|
+
|
|
79
|
+
except ValueError as err:
|
|
80
|
+
typer.secho(
|
|
81
|
+
f"❌ {err}",
|
|
82
|
+
fg=typer.colors.RED,
|
|
83
|
+
bold=True,
|
|
84
|
+
)
|
|
85
|
+
raise typer.Exit(code=1) from err
|
|
86
|
+
finally:
|
|
87
|
+
channel.close()
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def on_channel_state_change(channel_connectivity: str) -> None:
|
|
91
|
+
"""Log channel connectivity."""
|
|
92
|
+
log(DEBUG, channel_connectivity)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _init_channel(app: Path, federation_config: dict[str, Any]) -> grpc.Channel:
|
|
96
|
+
"""Initialize gRPC channel to the Exec API."""
|
|
97
|
+
insecure, root_certificates_bytes = validate_certificate_in_federation_config(
|
|
98
|
+
app, federation_config
|
|
99
|
+
)
|
|
100
|
+
channel = create_channel(
|
|
101
|
+
server_address=federation_config["address"],
|
|
102
|
+
insecure=insecure,
|
|
103
|
+
root_certificates=root_certificates_bytes,
|
|
104
|
+
max_message_length=GRPC_MAX_MESSAGE_LENGTH,
|
|
105
|
+
interceptors=None,
|
|
106
|
+
)
|
|
107
|
+
channel.subscribe(on_channel_state_change)
|
|
108
|
+
return channel
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def _stop_run(
|
|
112
|
+
stub: ExecStub, # pylint: disable=unused-argument
|
|
113
|
+
run_id: int, # pylint: disable=unused-argument
|
|
114
|
+
) -> None:
|
|
115
|
+
"""Stop a run."""
|
|
116
|
+
response: StopRunResponse = stub.StopRun(request=StopRunRequest(run_id=run_id))
|
|
117
|
+
|
|
118
|
+
if response.success:
|
|
119
|
+
typer.secho(f"✅ Run {run_id} successfully stopped.", fg=typer.colors.GREEN)
|
|
120
|
+
else:
|
|
121
|
+
typer.secho(f"❌ Run {run_id} couldn't be stopped.", fg=typer.colors.RED)
|
flwr/proto/exec_pb2.py
CHANGED
|
@@ -18,7 +18,7 @@ from flwr.proto import recordset_pb2 as flwr_dot_proto_dot_recordset__pb2
|
|
|
18
18
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/exec.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x1a\x66lwr/proto/transport.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x14\x66lwr/proto/run.proto\"\xfb\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\x35\n\x12\x66\x65\x64\x65ration_options\x18\x03 \x01(\x0b\x32\x19.flwr.proto.ConfigsRecord\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\" \n\x0eStopRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"\"\n\x0fStopRunResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\
|
|
21
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/exec.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x1a\x66lwr/proto/transport.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x14\x66lwr/proto/run.proto\"\xfb\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\x35\n\x12\x66\x65\x64\x65ration_options\x18\x03 \x01(\x0b\x32\x19.flwr.proto.ConfigsRecord\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\"\x9c\x01\n\x17GetLoginDetailsResponse\x12L\n\rlogin_details\x18\x01 \x03(\x0b\x32\x35.flwr.proto.GetLoginDetailsResponse.LoginDetailsEntry\x1a\x33\n\x11LoginDetailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x93\x01\n\x14GetAuthTokensRequest\x12G\n\x0c\x61uth_details\x18\x01 \x03(\x0b\x32\x31.flwr.proto.GetAuthTokensRequest.AuthDetailsEntry\x1a\x32\n\x10\x41uthDetailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x92\x01\n\x15GetAuthTokensResponse\x12\x46\n\x0b\x61uth_tokens\x18\x01 \x03(\x0b\x32\x31.flwr.proto.GetAuthTokensResponse.AuthTokensEntry\x1a\x31\n\x0f\x41uthTokensEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\" \n\x0eStopRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"\"\n\x0fStopRunResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\xe5\x03\n\x04\x45xec\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
22
|
|
|
23
23
|
_globals = globals()
|
|
24
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -29,6 +29,12 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
29
29
|
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
30
30
|
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._options = None
|
|
31
31
|
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_options = b'8\001'
|
|
32
|
+
_globals['_GETLOGINDETAILSRESPONSE_LOGINDETAILSENTRY']._options = None
|
|
33
|
+
_globals['_GETLOGINDETAILSRESPONSE_LOGINDETAILSENTRY']._serialized_options = b'8\001'
|
|
34
|
+
_globals['_GETAUTHTOKENSREQUEST_AUTHDETAILSENTRY']._options = None
|
|
35
|
+
_globals['_GETAUTHTOKENSREQUEST_AUTHDETAILSENTRY']._serialized_options = b'8\001'
|
|
36
|
+
_globals['_GETAUTHTOKENSRESPONSE_AUTHTOKENSENTRY']._options = None
|
|
37
|
+
_globals['_GETAUTHTOKENSRESPONSE_AUTHTOKENSENTRY']._serialized_options = b'8\001'
|
|
32
38
|
_globals['_STARTRUNREQUEST']._serialized_start=138
|
|
33
39
|
_globals['_STARTRUNREQUEST']._serialized_end=389
|
|
34
40
|
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=316
|
|
@@ -45,10 +51,24 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
45
51
|
_globals['_LISTRUNSRESPONSE']._serialized_end=782
|
|
46
52
|
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_start=719
|
|
47
53
|
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_end=782
|
|
48
|
-
_globals['
|
|
49
|
-
_globals['
|
|
50
|
-
_globals['
|
|
51
|
-
_globals['
|
|
52
|
-
_globals['
|
|
53
|
-
_globals['
|
|
54
|
+
_globals['_GETLOGINDETAILSREQUEST']._serialized_start=784
|
|
55
|
+
_globals['_GETLOGINDETAILSREQUEST']._serialized_end=808
|
|
56
|
+
_globals['_GETLOGINDETAILSRESPONSE']._serialized_start=811
|
|
57
|
+
_globals['_GETLOGINDETAILSRESPONSE']._serialized_end=967
|
|
58
|
+
_globals['_GETLOGINDETAILSRESPONSE_LOGINDETAILSENTRY']._serialized_start=916
|
|
59
|
+
_globals['_GETLOGINDETAILSRESPONSE_LOGINDETAILSENTRY']._serialized_end=967
|
|
60
|
+
_globals['_GETAUTHTOKENSREQUEST']._serialized_start=970
|
|
61
|
+
_globals['_GETAUTHTOKENSREQUEST']._serialized_end=1117
|
|
62
|
+
_globals['_GETAUTHTOKENSREQUEST_AUTHDETAILSENTRY']._serialized_start=1067
|
|
63
|
+
_globals['_GETAUTHTOKENSREQUEST_AUTHDETAILSENTRY']._serialized_end=1117
|
|
64
|
+
_globals['_GETAUTHTOKENSRESPONSE']._serialized_start=1120
|
|
65
|
+
_globals['_GETAUTHTOKENSRESPONSE']._serialized_end=1266
|
|
66
|
+
_globals['_GETAUTHTOKENSRESPONSE_AUTHTOKENSENTRY']._serialized_start=1217
|
|
67
|
+
_globals['_GETAUTHTOKENSRESPONSE_AUTHTOKENSENTRY']._serialized_end=1266
|
|
68
|
+
_globals['_STOPRUNREQUEST']._serialized_start=1268
|
|
69
|
+
_globals['_STOPRUNREQUEST']._serialized_end=1300
|
|
70
|
+
_globals['_STOPRUNRESPONSE']._serialized_start=1302
|
|
71
|
+
_globals['_STOPRUNRESPONSE']._serialized_end=1336
|
|
72
|
+
_globals['_EXEC']._serialized_start=1339
|
|
73
|
+
_globals['_EXEC']._serialized_end=1824
|
|
54
74
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/exec_pb2.pyi
CHANGED
|
@@ -135,6 +135,87 @@ class ListRunsResponse(google.protobuf.message.Message):
|
|
|
135
135
|
def ClearField(self, field_name: typing_extensions.Literal["now",b"now","run_dict",b"run_dict"]) -> None: ...
|
|
136
136
|
global___ListRunsResponse = ListRunsResponse
|
|
137
137
|
|
|
138
|
+
class GetLoginDetailsRequest(google.protobuf.message.Message):
|
|
139
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
140
|
+
def __init__(self,
|
|
141
|
+
) -> None: ...
|
|
142
|
+
global___GetLoginDetailsRequest = GetLoginDetailsRequest
|
|
143
|
+
|
|
144
|
+
class GetLoginDetailsResponse(google.protobuf.message.Message):
|
|
145
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
146
|
+
class LoginDetailsEntry(google.protobuf.message.Message):
|
|
147
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
148
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
149
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
150
|
+
key: typing.Text
|
|
151
|
+
value: typing.Text
|
|
152
|
+
def __init__(self,
|
|
153
|
+
*,
|
|
154
|
+
key: typing.Text = ...,
|
|
155
|
+
value: typing.Text = ...,
|
|
156
|
+
) -> None: ...
|
|
157
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
158
|
+
|
|
159
|
+
LOGIN_DETAILS_FIELD_NUMBER: builtins.int
|
|
160
|
+
@property
|
|
161
|
+
def login_details(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
162
|
+
def __init__(self,
|
|
163
|
+
*,
|
|
164
|
+
login_details: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
165
|
+
) -> None: ...
|
|
166
|
+
def ClearField(self, field_name: typing_extensions.Literal["login_details",b"login_details"]) -> None: ...
|
|
167
|
+
global___GetLoginDetailsResponse = GetLoginDetailsResponse
|
|
168
|
+
|
|
169
|
+
class GetAuthTokensRequest(google.protobuf.message.Message):
|
|
170
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
171
|
+
class AuthDetailsEntry(google.protobuf.message.Message):
|
|
172
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
173
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
174
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
175
|
+
key: typing.Text
|
|
176
|
+
value: typing.Text
|
|
177
|
+
def __init__(self,
|
|
178
|
+
*,
|
|
179
|
+
key: typing.Text = ...,
|
|
180
|
+
value: typing.Text = ...,
|
|
181
|
+
) -> None: ...
|
|
182
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
183
|
+
|
|
184
|
+
AUTH_DETAILS_FIELD_NUMBER: builtins.int
|
|
185
|
+
@property
|
|
186
|
+
def auth_details(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
187
|
+
def __init__(self,
|
|
188
|
+
*,
|
|
189
|
+
auth_details: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
190
|
+
) -> None: ...
|
|
191
|
+
def ClearField(self, field_name: typing_extensions.Literal["auth_details",b"auth_details"]) -> None: ...
|
|
192
|
+
global___GetAuthTokensRequest = GetAuthTokensRequest
|
|
193
|
+
|
|
194
|
+
class GetAuthTokensResponse(google.protobuf.message.Message):
|
|
195
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
196
|
+
class AuthTokensEntry(google.protobuf.message.Message):
|
|
197
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
198
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
199
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
200
|
+
key: typing.Text
|
|
201
|
+
value: typing.Text
|
|
202
|
+
def __init__(self,
|
|
203
|
+
*,
|
|
204
|
+
key: typing.Text = ...,
|
|
205
|
+
value: typing.Text = ...,
|
|
206
|
+
) -> None: ...
|
|
207
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
208
|
+
|
|
209
|
+
AUTH_TOKENS_FIELD_NUMBER: builtins.int
|
|
210
|
+
@property
|
|
211
|
+
def auth_tokens(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
212
|
+
def __init__(self,
|
|
213
|
+
*,
|
|
214
|
+
auth_tokens: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
215
|
+
) -> None: ...
|
|
216
|
+
def ClearField(self, field_name: typing_extensions.Literal["auth_tokens",b"auth_tokens"]) -> None: ...
|
|
217
|
+
global___GetAuthTokensResponse = GetAuthTokensResponse
|
|
218
|
+
|
|
138
219
|
class StopRunRequest(google.protobuf.message.Message):
|
|
139
220
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
140
221
|
RUN_ID_FIELD_NUMBER: builtins.int
|
flwr/proto/exec_pb2_grpc.py
CHANGED
|
@@ -34,6 +34,16 @@ class ExecStub(object):
|
|
|
34
34
|
request_serializer=flwr_dot_proto_dot_exec__pb2.ListRunsRequest.SerializeToString,
|
|
35
35
|
response_deserializer=flwr_dot_proto_dot_exec__pb2.ListRunsResponse.FromString,
|
|
36
36
|
)
|
|
37
|
+
self.GetLoginDetails = channel.unary_unary(
|
|
38
|
+
'/flwr.proto.Exec/GetLoginDetails',
|
|
39
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsRequest.SerializeToString,
|
|
40
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsResponse.FromString,
|
|
41
|
+
)
|
|
42
|
+
self.GetAuthTokens = channel.unary_unary(
|
|
43
|
+
'/flwr.proto.Exec/GetAuthTokens',
|
|
44
|
+
request_serializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensRequest.SerializeToString,
|
|
45
|
+
response_deserializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensResponse.FromString,
|
|
46
|
+
)
|
|
37
47
|
|
|
38
48
|
|
|
39
49
|
class ExecServicer(object):
|
|
@@ -67,6 +77,20 @@ class ExecServicer(object):
|
|
|
67
77
|
context.set_details('Method not implemented!')
|
|
68
78
|
raise NotImplementedError('Method not implemented!')
|
|
69
79
|
|
|
80
|
+
def GetLoginDetails(self, request, context):
|
|
81
|
+
"""Get login details upon request
|
|
82
|
+
"""
|
|
83
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
84
|
+
context.set_details('Method not implemented!')
|
|
85
|
+
raise NotImplementedError('Method not implemented!')
|
|
86
|
+
|
|
87
|
+
def GetAuthTokens(self, request, context):
|
|
88
|
+
"""Get auth tokens upon request
|
|
89
|
+
"""
|
|
90
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
91
|
+
context.set_details('Method not implemented!')
|
|
92
|
+
raise NotImplementedError('Method not implemented!')
|
|
93
|
+
|
|
70
94
|
|
|
71
95
|
def add_ExecServicer_to_server(servicer, server):
|
|
72
96
|
rpc_method_handlers = {
|
|
@@ -90,6 +114,16 @@ def add_ExecServicer_to_server(servicer, server):
|
|
|
90
114
|
request_deserializer=flwr_dot_proto_dot_exec__pb2.ListRunsRequest.FromString,
|
|
91
115
|
response_serializer=flwr_dot_proto_dot_exec__pb2.ListRunsResponse.SerializeToString,
|
|
92
116
|
),
|
|
117
|
+
'GetLoginDetails': grpc.unary_unary_rpc_method_handler(
|
|
118
|
+
servicer.GetLoginDetails,
|
|
119
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsRequest.FromString,
|
|
120
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.GetLoginDetailsResponse.SerializeToString,
|
|
121
|
+
),
|
|
122
|
+
'GetAuthTokens': grpc.unary_unary_rpc_method_handler(
|
|
123
|
+
servicer.GetAuthTokens,
|
|
124
|
+
request_deserializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensRequest.FromString,
|
|
125
|
+
response_serializer=flwr_dot_proto_dot_exec__pb2.GetAuthTokensResponse.SerializeToString,
|
|
126
|
+
),
|
|
93
127
|
}
|
|
94
128
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
95
129
|
'flwr.proto.Exec', rpc_method_handlers)
|
|
@@ -167,3 +201,37 @@ class Exec(object):
|
|
|
167
201
|
flwr_dot_proto_dot_exec__pb2.ListRunsResponse.FromString,
|
|
168
202
|
options, channel_credentials,
|
|
169
203
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
204
|
+
|
|
205
|
+
@staticmethod
|
|
206
|
+
def GetLoginDetails(request,
|
|
207
|
+
target,
|
|
208
|
+
options=(),
|
|
209
|
+
channel_credentials=None,
|
|
210
|
+
call_credentials=None,
|
|
211
|
+
insecure=False,
|
|
212
|
+
compression=None,
|
|
213
|
+
wait_for_ready=None,
|
|
214
|
+
timeout=None,
|
|
215
|
+
metadata=None):
|
|
216
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Exec/GetLoginDetails',
|
|
217
|
+
flwr_dot_proto_dot_exec__pb2.GetLoginDetailsRequest.SerializeToString,
|
|
218
|
+
flwr_dot_proto_dot_exec__pb2.GetLoginDetailsResponse.FromString,
|
|
219
|
+
options, channel_credentials,
|
|
220
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
221
|
+
|
|
222
|
+
@staticmethod
|
|
223
|
+
def GetAuthTokens(request,
|
|
224
|
+
target,
|
|
225
|
+
options=(),
|
|
226
|
+
channel_credentials=None,
|
|
227
|
+
call_credentials=None,
|
|
228
|
+
insecure=False,
|
|
229
|
+
compression=None,
|
|
230
|
+
wait_for_ready=None,
|
|
231
|
+
timeout=None,
|
|
232
|
+
metadata=None):
|
|
233
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Exec/GetAuthTokens',
|
|
234
|
+
flwr_dot_proto_dot_exec__pb2.GetAuthTokensRequest.SerializeToString,
|
|
235
|
+
flwr_dot_proto_dot_exec__pb2.GetAuthTokensResponse.FromString,
|
|
236
|
+
options, channel_credentials,
|
|
237
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
flwr/proto/exec_pb2_grpc.pyi
CHANGED
|
@@ -29,6 +29,16 @@ class ExecStub:
|
|
|
29
29
|
flwr.proto.exec_pb2.ListRunsResponse]
|
|
30
30
|
"""flwr ls command"""
|
|
31
31
|
|
|
32
|
+
GetLoginDetails: grpc.UnaryUnaryMultiCallable[
|
|
33
|
+
flwr.proto.exec_pb2.GetLoginDetailsRequest,
|
|
34
|
+
flwr.proto.exec_pb2.GetLoginDetailsResponse]
|
|
35
|
+
"""Get login details upon request"""
|
|
36
|
+
|
|
37
|
+
GetAuthTokens: grpc.UnaryUnaryMultiCallable[
|
|
38
|
+
flwr.proto.exec_pb2.GetAuthTokensRequest,
|
|
39
|
+
flwr.proto.exec_pb2.GetAuthTokensResponse]
|
|
40
|
+
"""Get auth tokens upon request"""
|
|
41
|
+
|
|
32
42
|
|
|
33
43
|
class ExecServicer(metaclass=abc.ABCMeta):
|
|
34
44
|
@abc.abstractmethod
|
|
@@ -63,5 +73,21 @@ class ExecServicer(metaclass=abc.ABCMeta):
|
|
|
63
73
|
"""flwr ls command"""
|
|
64
74
|
pass
|
|
65
75
|
|
|
76
|
+
@abc.abstractmethod
|
|
77
|
+
def GetLoginDetails(self,
|
|
78
|
+
request: flwr.proto.exec_pb2.GetLoginDetailsRequest,
|
|
79
|
+
context: grpc.ServicerContext,
|
|
80
|
+
) -> flwr.proto.exec_pb2.GetLoginDetailsResponse:
|
|
81
|
+
"""Get login details upon request"""
|
|
82
|
+
pass
|
|
83
|
+
|
|
84
|
+
@abc.abstractmethod
|
|
85
|
+
def GetAuthTokens(self,
|
|
86
|
+
request: flwr.proto.exec_pb2.GetAuthTokensRequest,
|
|
87
|
+
context: grpc.ServicerContext,
|
|
88
|
+
) -> flwr.proto.exec_pb2.GetAuthTokensResponse:
|
|
89
|
+
"""Get auth tokens upon request"""
|
|
90
|
+
pass
|
|
91
|
+
|
|
66
92
|
|
|
67
93
|
def add_ExecServicer_to_server(servicer: ExecServicer, server: grpc.Server) -> None: ...
|
flwr/proto/simulationio_pb2.py
CHANGED
|
@@ -18,7 +18,7 @@ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
|
18
18
|
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lwr/proto/simulationio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"\x1d\n\x1bPullSimulationInputsRequest\"\x80\x01\n\x1cPullSimulationInputsResponse\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\"T\n\x1cPushSimulationOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1f\n\x1dPushSimulationOutputsResponse2\
|
|
21
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x66lwr/proto/simulationio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"\x1d\n\x1bPullSimulationInputsRequest\"\x80\x01\n\x1cPullSimulationInputsResponse\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\"T\n\x1cPushSimulationOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1f\n\x1dPushSimulationOutputsResponse2\xd4\x04\n\x0cSimulationIo\x12k\n\x14PullSimulationInputs\x12\'.flwr.proto.PullSimulationInputsRequest\x1a(.flwr.proto.PullSimulationInputsResponse\"\x00\x12n\n\x15PushSimulationOutputs\x12(.flwr.proto.PushSimulationOutputsRequest\x1a).flwr.proto.PushSimulationOutputsResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x12G\n\x08PushLogs\x12\x1b.flwr.proto.PushLogsRequest\x1a\x1c.flwr.proto.PushLogsResponse\"\x00\x12k\n\x14GetFederationOptions\x12\'.flwr.proto.GetFederationOptionsRequest\x1a(.flwr.proto.GetFederationOptionsResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x62\x06proto3')
|
|
22
22
|
|
|
23
23
|
_globals = globals()
|
|
24
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -34,5 +34,5 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
34
34
|
_globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_start=385
|
|
35
35
|
_globals['_PUSHSIMULATIONOUTPUTSRESPONSE']._serialized_end=416
|
|
36
36
|
_globals['_SIMULATIONIO']._serialized_start=419
|
|
37
|
-
_globals['_SIMULATIONIO']._serialized_end=
|
|
37
|
+
_globals['_SIMULATIONIO']._serialized_end=1015
|
|
38
38
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -41,6 +41,11 @@ class SimulationIoStub(object):
|
|
|
41
41
|
request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
|
|
42
42
|
response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
|
|
43
43
|
)
|
|
44
|
+
self.GetRunStatus = channel.unary_unary(
|
|
45
|
+
'/flwr.proto.SimulationIo/GetRunStatus',
|
|
46
|
+
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
|
|
47
|
+
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
48
|
+
)
|
|
44
49
|
|
|
45
50
|
|
|
46
51
|
class SimulationIoServicer(object):
|
|
@@ -81,6 +86,13 @@ class SimulationIoServicer(object):
|
|
|
81
86
|
context.set_details('Method not implemented!')
|
|
82
87
|
raise NotImplementedError('Method not implemented!')
|
|
83
88
|
|
|
89
|
+
def GetRunStatus(self, request, context):
|
|
90
|
+
"""Get Run Status
|
|
91
|
+
"""
|
|
92
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
93
|
+
context.set_details('Method not implemented!')
|
|
94
|
+
raise NotImplementedError('Method not implemented!')
|
|
95
|
+
|
|
84
96
|
|
|
85
97
|
def add_SimulationIoServicer_to_server(servicer, server):
|
|
86
98
|
rpc_method_handlers = {
|
|
@@ -109,6 +121,11 @@ def add_SimulationIoServicer_to_server(servicer, server):
|
|
|
109
121
|
request_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.FromString,
|
|
110
122
|
response_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.SerializeToString,
|
|
111
123
|
),
|
|
124
|
+
'GetRunStatus': grpc.unary_unary_rpc_method_handler(
|
|
125
|
+
servicer.GetRunStatus,
|
|
126
|
+
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
|
|
127
|
+
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
|
|
128
|
+
),
|
|
112
129
|
}
|
|
113
130
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
114
131
|
'flwr.proto.SimulationIo', rpc_method_handlers)
|
|
@@ -203,3 +220,20 @@ class SimulationIo(object):
|
|
|
203
220
|
flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
|
|
204
221
|
options, channel_credentials,
|
|
205
222
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
223
|
+
|
|
224
|
+
@staticmethod
|
|
225
|
+
def GetRunStatus(request,
|
|
226
|
+
target,
|
|
227
|
+
options=(),
|
|
228
|
+
channel_credentials=None,
|
|
229
|
+
call_credentials=None,
|
|
230
|
+
insecure=False,
|
|
231
|
+
compression=None,
|
|
232
|
+
wait_for_ready=None,
|
|
233
|
+
timeout=None,
|
|
234
|
+
metadata=None):
|
|
235
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetRunStatus',
|
|
236
|
+
flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
|
|
237
|
+
flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
238
|
+
options, channel_credentials,
|
|
239
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -35,6 +35,11 @@ class SimulationIoStub:
|
|
|
35
35
|
flwr.proto.run_pb2.GetFederationOptionsResponse]
|
|
36
36
|
"""Get Federation Options"""
|
|
37
37
|
|
|
38
|
+
GetRunStatus: grpc.UnaryUnaryMultiCallable[
|
|
39
|
+
flwr.proto.run_pb2.GetRunStatusRequest,
|
|
40
|
+
flwr.proto.run_pb2.GetRunStatusResponse]
|
|
41
|
+
"""Get Run Status"""
|
|
42
|
+
|
|
38
43
|
|
|
39
44
|
class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
40
45
|
@abc.abstractmethod
|
|
@@ -77,5 +82,13 @@ class SimulationIoServicer(metaclass=abc.ABCMeta):
|
|
|
77
82
|
"""Get Federation Options"""
|
|
78
83
|
pass
|
|
79
84
|
|
|
85
|
+
@abc.abstractmethod
|
|
86
|
+
def GetRunStatus(self,
|
|
87
|
+
request: flwr.proto.run_pb2.GetRunStatusRequest,
|
|
88
|
+
context: grpc.ServicerContext,
|
|
89
|
+
) -> flwr.proto.run_pb2.GetRunStatusResponse:
|
|
90
|
+
"""Get Run Status"""
|
|
91
|
+
pass
|
|
92
|
+
|
|
80
93
|
|
|
81
94
|
def add_SimulationIoServicer_to_server(servicer: SimulationIoServicer, server: grpc.Server) -> None: ...
|
|
@@ -28,6 +28,7 @@ from flwr.common.serde import (
|
|
|
28
28
|
context_to_proto,
|
|
29
29
|
fab_to_proto,
|
|
30
30
|
run_status_from_proto,
|
|
31
|
+
run_status_to_proto,
|
|
31
32
|
run_to_proto,
|
|
32
33
|
)
|
|
33
34
|
from flwr.common.typing import Fab, RunStatus
|
|
@@ -39,6 +40,8 @@ from flwr.proto.log_pb2 import ( # pylint: disable=E0611
|
|
|
39
40
|
from flwr.proto.run_pb2 import ( # pylint: disable=E0611
|
|
40
41
|
GetFederationOptionsRequest,
|
|
41
42
|
GetFederationOptionsResponse,
|
|
43
|
+
GetRunStatusRequest,
|
|
44
|
+
GetRunStatusResponse,
|
|
42
45
|
UpdateRunStatusRequest,
|
|
43
46
|
UpdateRunStatusResponse,
|
|
44
47
|
)
|
|
@@ -122,6 +125,22 @@ class SimulationIoServicer(simulationio_pb2_grpc.SimulationIoServicer):
|
|
|
122
125
|
)
|
|
123
126
|
return UpdateRunStatusResponse()
|
|
124
127
|
|
|
128
|
+
def GetRunStatus(
|
|
129
|
+
self, request: GetRunStatusRequest, context: ServicerContext
|
|
130
|
+
) -> GetRunStatusResponse:
|
|
131
|
+
"""Get status of requested runs."""
|
|
132
|
+
log(DEBUG, "SimultionIoServicer.GetRunStatus")
|
|
133
|
+
state = self.state_factory.state()
|
|
134
|
+
|
|
135
|
+
statuses = state.get_run_status(set(request.run_ids))
|
|
136
|
+
|
|
137
|
+
return GetRunStatusResponse(
|
|
138
|
+
run_status_dict={
|
|
139
|
+
run_id: run_status_to_proto(status)
|
|
140
|
+
for run_id, status in statuses.items()
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
|
|
125
144
|
def PushLogs(
|
|
126
145
|
self, request: PushLogsRequest, context: grpc.ServicerContext
|
|
127
146
|
) -> PushLogsResponse:
|
flwr/superexec/exec_servicer.py
CHANGED
|
@@ -33,6 +33,10 @@ from flwr.common.serde import (
|
|
|
33
33
|
from flwr.common.typing import RunStatus
|
|
34
34
|
from flwr.proto import exec_pb2_grpc # pylint: disable=E0611
|
|
35
35
|
from flwr.proto.exec_pb2 import ( # pylint: disable=E0611
|
|
36
|
+
GetAuthTokensRequest,
|
|
37
|
+
GetAuthTokensResponse,
|
|
38
|
+
GetLoginDetailsRequest,
|
|
39
|
+
GetLoginDetailsResponse,
|
|
36
40
|
ListRunsRequest,
|
|
37
41
|
ListRunsResponse,
|
|
38
42
|
StartRunRequest,
|
|
@@ -155,6 +159,20 @@ class ExecServicer(exec_pb2_grpc.ExecServicer):
|
|
|
155
159
|
)
|
|
156
160
|
return StopRunResponse(success=update_success)
|
|
157
161
|
|
|
162
|
+
def GetLoginDetails(
|
|
163
|
+
self, request: GetLoginDetailsRequest, context: grpc.ServicerContext
|
|
164
|
+
) -> GetLoginDetailsResponse:
|
|
165
|
+
"""Start login."""
|
|
166
|
+
log(INFO, "ExecServicer.GetLoginDetails")
|
|
167
|
+
return GetLoginDetailsResponse(login_details={})
|
|
168
|
+
|
|
169
|
+
def GetAuthTokens(
|
|
170
|
+
self, request: GetAuthTokensRequest, context: grpc.ServicerContext
|
|
171
|
+
) -> GetAuthTokensResponse:
|
|
172
|
+
"""Get auth token."""
|
|
173
|
+
log(INFO, "ExecServicer.GetAuthTokens")
|
|
174
|
+
return GetAuthTokensResponse(auth_tokens={})
|
|
175
|
+
|
|
158
176
|
|
|
159
177
|
def _create_list_runs_response(run_ids: set[int], state: LinkState) -> ListRunsResponse:
|
|
160
178
|
"""Create response for `flwr ls --runs` and `flwr ls --run-id <run_id>`."""
|
{flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
flwr/__init__.py,sha256=VmBWedrCxqmt4QvUHBLqyVEH6p7zaFMD_oCHerXHSVw,937
|
|
2
2
|
flwr/cli/__init__.py,sha256=cZJVgozlkC6Ni2Hd_FAIrqefrkCGOV18fikToq-6iLw,720
|
|
3
|
-
flwr/cli/app.py,sha256=
|
|
3
|
+
flwr/cli/app.py,sha256=4naV5q1Fepne8XAgdGISxotWSIT__sm0TIHdodSvou4,1335
|
|
4
4
|
flwr/cli/build.py,sha256=k2M0aIY2q5WB_yXQ22Woxt1zb6m-Z1wNwmhWMxEm5Dw,6344
|
|
5
5
|
flwr/cli/config_utils.py,sha256=n-xNkQG_0POz5UUHyE00lthNaOjuS6IYU9Thzb_BThs,11431
|
|
6
6
|
flwr/cli/example.py,sha256=1bGDYll3BXQY2kRqSN-oICqS5n1b9m0g0RvXTopXHl4,2215
|
|
@@ -63,6 +63,7 @@ flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl,sha256=01HArBqRrbZT3O7pXOM
|
|
|
63
63
|
flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl,sha256=KVCIOEYNWnq6j7XOboXqZshc9aQ2PyRDUu7bZtmfJ24,710
|
|
64
64
|
flwr/cli/run/__init__.py,sha256=oCd6HmQDx-sqver1gecgx-uMA38BLTSiiKpl7RGNceg,789
|
|
65
65
|
flwr/cli/run/run.py,sha256=5To92BOrfM5VEwNp2zzRUoz4tHE2NtazxIQICProA8k,8503
|
|
66
|
+
flwr/cli/stop.py,sha256=OrV_znXyu3t_gABHisAA6uHwFdFPP2Z9bKvhcE1O5Yk,4116
|
|
66
67
|
flwr/cli/utils.py,sha256=emMUdthvoHBTB0iGQp-oFBmA5wV46lw3y3FmfXQPCsc,4500
|
|
67
68
|
flwr/client/__init__.py,sha256=DGDoO0AEAfz-0CUFmLdyUUweAS64-07AOnmDfWUefK4,1192
|
|
68
69
|
flwr/client/app.py,sha256=3AKrJduvki_1ATvKCQV4T9_1qZuarVVTtpnsq6_cWw0,34384
|
|
@@ -151,10 +152,10 @@ flwr/proto/error_pb2.py,sha256=LarjKL90LbwkXKlhzNrDssgl4DXcvIPve8NVCXHpsKA,1084
|
|
|
151
152
|
flwr/proto/error_pb2.pyi,sha256=ZNH4HhJTU_KfMXlyCeg8FwU-fcUYxTqEmoJPtWtHikc,734
|
|
152
153
|
flwr/proto/error_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
153
154
|
flwr/proto/error_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
|
154
|
-
flwr/proto/exec_pb2.py,sha256=
|
|
155
|
-
flwr/proto/exec_pb2.pyi,sha256=
|
|
156
|
-
flwr/proto/exec_pb2_grpc.py,sha256
|
|
157
|
-
flwr/proto/exec_pb2_grpc.pyi,sha256=
|
|
155
|
+
flwr/proto/exec_pb2.py,sha256=IVqmpzzThSjuLBCF8T9VofTpnUXtp3SYWOEp8dzyv5o,6883
|
|
156
|
+
flwr/proto/exec_pb2.pyi,sha256=amt-3e3zJVjkRlQ8Gz6m1A7hXyeZmbQhHpAEIQyIDn0,10660
|
|
157
|
+
flwr/proto/exec_pb2_grpc.py,sha256=-bdLqjsqQxK9R8LIiZaKlLKH2NmjR50EaGKTPPTwFhI,10445
|
|
158
|
+
flwr/proto/exec_pb2_grpc.pyi,sha256=M5k-FzeLWxal7zt28LJfzMWWRxmNknTC2BzHRRMa1sQ,2914
|
|
158
159
|
flwr/proto/fab_pb2.py,sha256=3QSDq9pjbZoqVxsmCRDwHO5PrSjzn2vixjYxE-qPmb0,1589
|
|
159
160
|
flwr/proto/fab_pb2.pyi,sha256=fXI108QaFtbl1WWTyslPbIx9c_19D0aYCoFn0xYtL4U,2277
|
|
160
161
|
flwr/proto/fab_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -191,10 +192,10 @@ flwr/proto/serverappio_pb2.py,sha256=zWnODeaj26oSx98-BFvwtWM_fYvsw9OeSIuV7JnKVvw
|
|
|
191
192
|
flwr/proto/serverappio_pb2.pyi,sha256=Ib9c32FCtjA9zZY54Ohi6B-DtLgSjokAqOExm_2uOvY,6429
|
|
192
193
|
flwr/proto/serverappio_pb2_grpc.py,sha256=M__pFMmb9yTAGMHVd3_K1V6DeLRuFc9UErJHWjBAsZs,17439
|
|
193
194
|
flwr/proto/serverappio_pb2_grpc.pyi,sha256=ERM-0cQVmUqrVXlvEbS2wfUZpZmv5SlIeNsGZPYMrVo,4779
|
|
194
|
-
flwr/proto/simulationio_pb2.py,sha256=
|
|
195
|
+
flwr/proto/simulationio_pb2.py,sha256=Fv7m8d4vR_0CIGU93nN5tDXSCk2QPbASH_8mT2wBPTE,3117
|
|
195
196
|
flwr/proto/simulationio_pb2.pyi,sha256=oXx8_FLBe5B54wduZj-f89kub73XxNtQbThuW8YfPAs,2660
|
|
196
|
-
flwr/proto/simulationio_pb2_grpc.py,sha256
|
|
197
|
-
flwr/proto/simulationio_pb2_grpc.pyi,sha256=
|
|
197
|
+
flwr/proto/simulationio_pb2_grpc.py,sha256=9I3yAfJaeMuG-qH_5Ge45eFOftsIOmL9b8E_xHmcvKw,11232
|
|
198
|
+
flwr/proto/simulationio_pb2_grpc.pyi,sha256=YHvKtyo7UdbBgdhoN0ndzZeB5vIC3JuR5PAJLrl-OKM,3206
|
|
198
199
|
flwr/proto/task_pb2.py,sha256=R5GfHgL8IJRI_qHWNeILl1Y9zHjvB0tnCvMHmTgF4Is,2361
|
|
199
200
|
flwr/proto/task_pb2.pyi,sha256=KJVsLm-THY5QjHreHDm_-OS1tyZyD61mx6BzOpoeMjw,4320
|
|
200
201
|
flwr/proto/task_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -286,7 +287,7 @@ flwr/server/superlink/linkstate/sqlite_linkstate.py,sha256=XWr-2CWZTWCrGdXV_wYBB
|
|
|
286
287
|
flwr/server/superlink/linkstate/utils.py,sha256=d5uqqIOCKfd54X8CFNfUr3AWqPLpgmzsC_RagRwFugM,13321
|
|
287
288
|
flwr/server/superlink/simulation/__init__.py,sha256=mg-oapC9dkzEfjXPQFior5lpWj4g9kwbLovptyYM_g0,718
|
|
288
289
|
flwr/server/superlink/simulation/simulationio_grpc.py,sha256=5wflYW_TS0mjmPG6OYuHMJwXD2_cYmUNhFkdOU0jMWQ,2237
|
|
289
|
-
flwr/server/superlink/simulation/simulationio_servicer.py,sha256=
|
|
290
|
+
flwr/server/superlink/simulation/simulationio_servicer.py,sha256=riaZm090aTs7o8cFD8gvCWkX7A2SPLXKM4K8MG60av8,6545
|
|
290
291
|
flwr/server/typing.py,sha256=5kaRLZuxTEse9A0g7aVna2VhYxU3wTq1f3d3mtw7kXs,1019
|
|
291
292
|
flwr/server/utils/__init__.py,sha256=pltsPHJoXmUIr3utjwwYxu7_ZAGy5u4MVHzv9iA5Un8,908
|
|
292
293
|
flwr/server/utils/tensorboard.py,sha256=gEBD8w_5uaIfp5aw5RYH66lYZpd_SfkObHQ7eDd9MUk,5466
|
|
@@ -310,11 +311,11 @@ flwr/superexec/__init__.py,sha256=fcj366jh4RFby_vDwLroU4kepzqbnJgseZD_jUr_Mko,71
|
|
|
310
311
|
flwr/superexec/app.py,sha256=Tt3GonnTwHrMmicwx9XaP-crP78-bf4DUWl-N5cG6zY,1841
|
|
311
312
|
flwr/superexec/deployment.py,sha256=7VYmmI12zEaTHp_cQtU1GLikmqhctUHhEdshBPRFHMs,6734
|
|
312
313
|
flwr/superexec/exec_grpc.py,sha256=OuhBAk7hiky9rjGceinLGIXqchtzGPQThZnwyYv6Ei0,2241
|
|
313
|
-
flwr/superexec/exec_servicer.py,sha256=
|
|
314
|
+
flwr/superexec/exec_servicer.py,sha256=S8Wr4bL8gNN5OV-Vl-m73PSYzHHyFe94FJKlSlXewPs,6659
|
|
314
315
|
flwr/superexec/executor.py,sha256=zH3_53il6Jh0ZscIVEB9f4GNnXMeBbCGyCoBCxLgiG0,3114
|
|
315
316
|
flwr/superexec/simulation.py,sha256=WQDon15oqpMopAZnwRZoTICYCfHqtkvFSqiTQ2hLD_g,4088
|
|
316
|
-
flwr_nightly-1.14.0.
|
|
317
|
-
flwr_nightly-1.14.0.
|
|
318
|
-
flwr_nightly-1.14.0.
|
|
319
|
-
flwr_nightly-1.14.0.
|
|
320
|
-
flwr_nightly-1.14.0.
|
|
317
|
+
flwr_nightly-1.14.0.dev20241209.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
318
|
+
flwr_nightly-1.14.0.dev20241209.dist-info/METADATA,sha256=OqqIhyoOusHI0s2giCqSRVbMW_59v190s1EEewwfdas,15679
|
|
319
|
+
flwr_nightly-1.14.0.dev20241209.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
320
|
+
flwr_nightly-1.14.0.dev20241209.dist-info/entry_points.txt,sha256=JlNxX3qhaV18_2yj5a3kJW1ESxm31cal9iS_N_pf1Rk,538
|
|
321
|
+
flwr_nightly-1.14.0.dev20241209.dist-info/RECORD,,
|
{flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/LICENSE
RENAMED
|
File without changes
|
{flwr_nightly-1.14.0.dev20241207.dist-info → flwr_nightly-1.14.0.dev20241209.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|