flwr-nightly 1.15.0.dev20250107__py3-none-any.whl → 1.15.0.dev20250109__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/cli_user_auth_interceptor.py +6 -2
- flwr/cli/login/login.py +11 -4
- flwr/cli/utils.py +4 -4
- flwr/client/grpc_rere_client/client_interceptor.py +6 -0
- flwr/client/grpc_rere_client/grpc_adapter.py +16 -0
- flwr/common/auth_plugin/auth_plugin.py +33 -23
- flwr/common/constant.py +2 -0
- flwr/common/typing.py +20 -0
- flwr/proto/exec_pb2.py +12 -24
- flwr/proto/exec_pb2.pyi +27 -54
- flwr/proto/fleet_pb2.py +40 -27
- flwr/proto/fleet_pb2.pyi +84 -0
- flwr/proto/fleet_pb2_grpc.py +66 -0
- flwr/proto/fleet_pb2_grpc.pyi +20 -0
- flwr/server/app.py +11 -13
- flwr/server/superlink/driver/serverappio_servicer.py +22 -8
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +16 -0
- flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +2 -1
- flwr/server/superlink/linkstate/in_memory_linkstate.py +26 -22
- flwr/server/superlink/linkstate/linkstate.py +10 -4
- flwr/server/superlink/linkstate/sqlite_linkstate.py +50 -29
- flwr/superexec/exec_servicer.py +23 -2
- {flwr_nightly-1.15.0.dev20250107.dist-info → flwr_nightly-1.15.0.dev20250109.dist-info}/METADATA +4 -4
- {flwr_nightly-1.15.0.dev20250107.dist-info → flwr_nightly-1.15.0.dev20250109.dist-info}/RECORD +27 -27
- {flwr_nightly-1.15.0.dev20250107.dist-info → flwr_nightly-1.15.0.dev20250109.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.15.0.dev20250107.dist-info → flwr_nightly-1.15.0.dev20250109.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.15.0.dev20250107.dist-info → flwr_nightly-1.15.0.dev20250109.dist-info}/entry_points.txt +0 -0
@@ -54,8 +54,12 @@ class CliUserAuthInterceptor(
|
|
54
54
|
|
55
55
|
response = continuation(details, request)
|
56
56
|
if response.initial_metadata():
|
57
|
-
|
58
|
-
|
57
|
+
credentials = self.auth_plugin.read_tokens_from_metadata(
|
58
|
+
response.initial_metadata()
|
59
|
+
)
|
60
|
+
# The metadata contains tokens only if they have been refreshed
|
61
|
+
if credentials is not None:
|
62
|
+
self.auth_plugin.store_tokens(credentials)
|
59
63
|
|
60
64
|
return response
|
61
65
|
|
flwr/cli/login/login.py
CHANGED
@@ -26,7 +26,7 @@ from flwr.cli.config_utils import (
|
|
26
26
|
process_loaded_project_config,
|
27
27
|
validate_federation_in_project_config,
|
28
28
|
)
|
29
|
-
from flwr.common.
|
29
|
+
from flwr.common.typing import UserAuthLoginDetails
|
30
30
|
from flwr.proto.exec_pb2 import ( # pylint: disable=E0611
|
31
31
|
GetLoginDetailsRequest,
|
32
32
|
GetLoginDetailsResponse,
|
@@ -64,7 +64,7 @@ def login( # pylint: disable=R0914
|
|
64
64
|
login_response: GetLoginDetailsResponse = stub.GetLoginDetails(login_request)
|
65
65
|
|
66
66
|
# Get the auth plugin
|
67
|
-
auth_type = login_response.
|
67
|
+
auth_type = login_response.auth_type
|
68
68
|
auth_plugin = try_obtain_cli_auth_plugin(app, federation, auth_type)
|
69
69
|
if auth_plugin is None:
|
70
70
|
typer.secho(
|
@@ -75,7 +75,14 @@ def login( # pylint: disable=R0914
|
|
75
75
|
raise typer.Exit(code=1)
|
76
76
|
|
77
77
|
# Login
|
78
|
-
|
78
|
+
details = UserAuthLoginDetails(
|
79
|
+
auth_type=login_response.auth_type,
|
80
|
+
device_code=login_response.device_code,
|
81
|
+
verification_uri_complete=login_response.verification_uri_complete,
|
82
|
+
expires_in=login_response.expires_in,
|
83
|
+
interval=login_response.interval,
|
84
|
+
)
|
85
|
+
credentials = auth_plugin.login(details, stub)
|
79
86
|
|
80
87
|
# Store the tokens
|
81
|
-
auth_plugin.store_tokens(
|
88
|
+
auth_plugin.store_tokens(credentials)
|
flwr/cli/utils.py
CHANGED
@@ -223,19 +223,19 @@ def try_obtain_cli_auth_plugin(
|
|
223
223
|
config_path = get_user_auth_config_path(root_dir, federation)
|
224
224
|
|
225
225
|
# Load the config file if it exists
|
226
|
-
|
226
|
+
json_file: dict[str, Any] = {}
|
227
227
|
if config_path.exists():
|
228
228
|
with config_path.open("r", encoding="utf-8") as file:
|
229
|
-
|
229
|
+
json_file = json.load(file)
|
230
230
|
# This is the case when the user auth is not enabled
|
231
231
|
elif auth_type is None:
|
232
232
|
return None
|
233
233
|
|
234
234
|
# Get the auth type from the config if not provided
|
235
235
|
if auth_type is None:
|
236
|
-
if AUTH_TYPE not in
|
236
|
+
if AUTH_TYPE not in json_file:
|
237
237
|
return None
|
238
|
-
auth_type =
|
238
|
+
auth_type = json_file[AUTH_TYPE]
|
239
239
|
|
240
240
|
# Retrieve auth plugin class and instantiate it
|
241
241
|
try:
|
@@ -36,7 +36,9 @@ from flwr.proto.fleet_pb2 import ( # pylint: disable=E0611
|
|
36
36
|
CreateNodeRequest,
|
37
37
|
DeleteNodeRequest,
|
38
38
|
PingRequest,
|
39
|
+
PullMessagesRequest,
|
39
40
|
PullTaskInsRequest,
|
41
|
+
PushMessagesRequest,
|
40
42
|
PushTaskResRequest,
|
41
43
|
)
|
42
44
|
from flwr.proto.run_pb2 import GetRunRequest # pylint: disable=E0611
|
@@ -52,6 +54,8 @@ Request = Union[
|
|
52
54
|
GetRunRequest,
|
53
55
|
PingRequest,
|
54
56
|
GetFabRequest,
|
57
|
+
PullMessagesRequest,
|
58
|
+
PushMessagesRequest,
|
55
59
|
]
|
56
60
|
|
57
61
|
|
@@ -129,6 +133,8 @@ class AuthenticateClientInterceptor(grpc.UnaryUnaryClientInterceptor): # type:
|
|
129
133
|
GetRunRequest,
|
130
134
|
PingRequest,
|
131
135
|
GetFabRequest,
|
136
|
+
PullMessagesRequest,
|
137
|
+
PushMessagesRequest,
|
132
138
|
),
|
133
139
|
):
|
134
140
|
if self.shared_secret is None:
|
@@ -40,8 +40,12 @@ from flwr.proto.fleet_pb2 import ( # pylint: disable=E0611
|
|
40
40
|
DeleteNodeResponse,
|
41
41
|
PingRequest,
|
42
42
|
PingResponse,
|
43
|
+
PullMessagesRequest,
|
44
|
+
PullMessagesResponse,
|
43
45
|
PullTaskInsRequest,
|
44
46
|
PullTaskInsResponse,
|
47
|
+
PushMessagesRequest,
|
48
|
+
PushMessagesResponse,
|
45
49
|
PushTaskResRequest,
|
46
50
|
PushTaskResResponse,
|
47
51
|
)
|
@@ -132,12 +136,24 @@ class GrpcAdapter:
|
|
132
136
|
"""."""
|
133
137
|
return self._send_and_receive(request, PullTaskInsResponse, **kwargs)
|
134
138
|
|
139
|
+
def PullMessages( # pylint: disable=C0103
|
140
|
+
self, request: PullMessagesRequest, **kwargs: Any
|
141
|
+
) -> PullMessagesResponse:
|
142
|
+
"""."""
|
143
|
+
return self._send_and_receive(request, PullMessagesResponse, **kwargs)
|
144
|
+
|
135
145
|
def PushTaskRes( # pylint: disable=C0103
|
136
146
|
self, request: PushTaskResRequest, **kwargs: Any
|
137
147
|
) -> PushTaskResResponse:
|
138
148
|
"""."""
|
139
149
|
return self._send_and_receive(request, PushTaskResResponse, **kwargs)
|
140
150
|
|
151
|
+
def PushMessages( # pylint: disable=C0103
|
152
|
+
self, request: PushMessagesRequest, **kwargs: Any
|
153
|
+
) -> PushMessagesResponse:
|
154
|
+
"""."""
|
155
|
+
return self._send_and_receive(request, PushMessagesResponse, **kwargs)
|
156
|
+
|
141
157
|
def GetRun( # pylint: disable=C0103
|
142
158
|
self, request: GetRunRequest, **kwargs: Any
|
143
159
|
) -> GetRunResponse:
|
@@ -18,26 +18,31 @@
|
|
18
18
|
from abc import ABC, abstractmethod
|
19
19
|
from collections.abc import Sequence
|
20
20
|
from pathlib import Path
|
21
|
-
from typing import
|
21
|
+
from typing import Optional, Union
|
22
22
|
|
23
23
|
from flwr.proto.exec_pb2_grpc import ExecStub
|
24
24
|
|
25
|
+
from ..typing import UserAuthCredentials, UserAuthLoginDetails
|
26
|
+
|
25
27
|
|
26
28
|
class ExecAuthPlugin(ABC):
|
27
29
|
"""Abstract Flower Auth Plugin class for ExecServicer.
|
28
30
|
|
29
31
|
Parameters
|
30
32
|
----------
|
31
|
-
|
32
|
-
|
33
|
+
user_auth_config_path : Path
|
34
|
+
Path to the YAML file containing the authentication configuration.
|
33
35
|
"""
|
34
36
|
|
35
37
|
@abstractmethod
|
36
|
-
def __init__(
|
38
|
+
def __init__(
|
39
|
+
self,
|
40
|
+
user_auth_config_path: Path,
|
41
|
+
):
|
37
42
|
"""Abstract constructor."""
|
38
43
|
|
39
44
|
@abstractmethod
|
40
|
-
def get_login_details(self) ->
|
45
|
+
def get_login_details(self) -> Optional[UserAuthLoginDetails]:
|
41
46
|
"""Get the login details."""
|
42
47
|
|
43
48
|
@abstractmethod
|
@@ -47,7 +52,7 @@ class ExecAuthPlugin(ABC):
|
|
47
52
|
"""Validate authentication tokens in the provided metadata."""
|
48
53
|
|
49
54
|
@abstractmethod
|
50
|
-
def get_auth_tokens(self,
|
55
|
+
def get_auth_tokens(self, device_code: str) -> Optional[UserAuthCredentials]:
|
51
56
|
"""Get authentication tokens."""
|
52
57
|
|
53
58
|
@abstractmethod
|
@@ -62,50 +67,55 @@ class CliAuthPlugin(ABC):
|
|
62
67
|
|
63
68
|
Parameters
|
64
69
|
----------
|
65
|
-
|
66
|
-
|
70
|
+
credentials_path : Path
|
71
|
+
Path to the user's authentication credentials file.
|
67
72
|
"""
|
68
73
|
|
69
74
|
@staticmethod
|
70
75
|
@abstractmethod
|
71
76
|
def login(
|
72
|
-
login_details:
|
77
|
+
login_details: UserAuthLoginDetails,
|
73
78
|
exec_stub: ExecStub,
|
74
|
-
) ->
|
75
|
-
"""Authenticate the user
|
79
|
+
) -> UserAuthCredentials:
|
80
|
+
"""Authenticate the user and retrieve authentication credentials.
|
76
81
|
|
77
82
|
Parameters
|
78
83
|
----------
|
79
|
-
login_details :
|
80
|
-
|
84
|
+
login_details : UserAuthLoginDetails
|
85
|
+
An object containing the user's login details.
|
81
86
|
exec_stub : ExecStub
|
82
|
-
|
87
|
+
A stub for executing RPC calls to the server.
|
83
88
|
|
84
89
|
Returns
|
85
90
|
-------
|
86
|
-
|
87
|
-
|
88
|
-
in JSON format.
|
91
|
+
UserAuthCredentials
|
92
|
+
The authentication credentials obtained after login.
|
89
93
|
"""
|
90
94
|
|
91
95
|
@abstractmethod
|
92
|
-
def __init__(self,
|
96
|
+
def __init__(self, credentials_path: Path):
|
93
97
|
"""Abstract constructor."""
|
94
98
|
|
95
99
|
@abstractmethod
|
96
|
-
def store_tokens(self,
|
97
|
-
"""Store authentication tokens
|
100
|
+
def store_tokens(self, credentials: UserAuthCredentials) -> None:
|
101
|
+
"""Store authentication tokens to the `credentials_path`.
|
98
102
|
|
99
|
-
The
|
100
|
-
at `
|
103
|
+
The credentials, including tokens, will be saved as a JSON file
|
104
|
+
at `credentials_path`.
|
101
105
|
"""
|
102
106
|
|
103
107
|
@abstractmethod
|
104
108
|
def load_tokens(self) -> None:
|
105
|
-
"""Load authentication tokens from the
|
109
|
+
"""Load authentication tokens from the `credentials_path`."""
|
106
110
|
|
107
111
|
@abstractmethod
|
108
112
|
def write_tokens_to_metadata(
|
109
113
|
self, metadata: Sequence[tuple[str, Union[str, bytes]]]
|
110
114
|
) -> Sequence[tuple[str, Union[str, bytes]]]:
|
111
115
|
"""Write authentication tokens to the provided metadata."""
|
116
|
+
|
117
|
+
@abstractmethod
|
118
|
+
def read_tokens_from_metadata(
|
119
|
+
self, metadata: Sequence[tuple[str, Union[str, bytes]]]
|
120
|
+
) -> Optional[UserAuthCredentials]:
|
121
|
+
"""Read authentication tokens from the provided metadata."""
|
flwr/common/constant.py
CHANGED
@@ -114,6 +114,8 @@ MAX_RETRY_DELAY = 20 # Maximum delay duration between two consecutive retries.
|
|
114
114
|
# Constants for user authentication
|
115
115
|
CREDENTIALS_DIR = ".credentials"
|
116
116
|
AUTH_TYPE = "auth_type"
|
117
|
+
ACCESS_TOKEN_KEY = "access_token"
|
118
|
+
REFRESH_TOKEN_KEY = "refresh_token"
|
117
119
|
|
118
120
|
|
119
121
|
class MessageType:
|
flwr/common/typing.py
CHANGED
@@ -266,3 +266,23 @@ class InvalidRunStatusException(BaseException):
|
|
266
266
|
def __init__(self, message: str) -> None:
|
267
267
|
super().__init__(message)
|
268
268
|
self.message = message
|
269
|
+
|
270
|
+
|
271
|
+
# OIDC user authentication types
|
272
|
+
@dataclass
|
273
|
+
class UserAuthLoginDetails:
|
274
|
+
"""User authentication login details."""
|
275
|
+
|
276
|
+
auth_type: str
|
277
|
+
device_code: str
|
278
|
+
verification_uri_complete: str
|
279
|
+
expires_in: int
|
280
|
+
interval: int
|
281
|
+
|
282
|
+
|
283
|
+
@dataclass
|
284
|
+
class UserAuthCredentials:
|
285
|
+
"""User authentication tokens."""
|
286
|
+
|
287
|
+
access_token: str
|
288
|
+
refresh_token: str
|
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\"\x18\n\x16GetLoginDetailsRequest\"\
|
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\"\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\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,12 +29,6 @@ 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'
|
38
32
|
_globals['_STARTRUNREQUEST']._serialized_start=138
|
39
33
|
_globals['_STARTRUNREQUEST']._serialized_end=389
|
40
34
|
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=316
|
@@ -54,21 +48,15 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
54
48
|
_globals['_GETLOGINDETAILSREQUEST']._serialized_start=784
|
55
49
|
_globals['_GETLOGINDETAILSREQUEST']._serialized_end=808
|
56
50
|
_globals['_GETLOGINDETAILSRESPONSE']._serialized_start=811
|
57
|
-
_globals['_GETLOGINDETAILSRESPONSE']._serialized_end=
|
58
|
-
_globals['
|
59
|
-
_globals['
|
60
|
-
_globals['
|
61
|
-
_globals['
|
62
|
-
_globals['
|
63
|
-
_globals['
|
64
|
-
_globals['
|
65
|
-
_globals['
|
66
|
-
_globals['
|
67
|
-
_globals['
|
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
|
51
|
+
_globals['_GETLOGINDETAILSRESPONSE']._serialized_end=949
|
52
|
+
_globals['_GETAUTHTOKENSREQUEST']._serialized_start=951
|
53
|
+
_globals['_GETAUTHTOKENSREQUEST']._serialized_end=994
|
54
|
+
_globals['_GETAUTHTOKENSRESPONSE']._serialized_start=996
|
55
|
+
_globals['_GETAUTHTOKENSRESPONSE']._serialized_end=1064
|
56
|
+
_globals['_STOPRUNREQUEST']._serialized_start=1066
|
57
|
+
_globals['_STOPRUNREQUEST']._serialized_end=1098
|
58
|
+
_globals['_STOPRUNRESPONSE']._serialized_start=1100
|
59
|
+
_globals['_STOPRUNRESPONSE']._serialized_end=1134
|
60
|
+
_globals['_EXEC']._serialized_start=1137
|
61
|
+
_globals['_EXEC']._serialized_end=1622
|
74
62
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/exec_pb2.pyi
CHANGED
@@ -143,77 +143,50 @@ global___GetLoginDetailsRequest = GetLoginDetailsRequest
|
|
143
143
|
|
144
144
|
class GetLoginDetailsResponse(google.protobuf.message.Message):
|
145
145
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
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]: ...
|
146
|
+
AUTH_TYPE_FIELD_NUMBER: builtins.int
|
147
|
+
DEVICE_CODE_FIELD_NUMBER: builtins.int
|
148
|
+
VERIFICATION_URI_COMPLETE_FIELD_NUMBER: builtins.int
|
149
|
+
EXPIRES_IN_FIELD_NUMBER: builtins.int
|
150
|
+
INTERVAL_FIELD_NUMBER: builtins.int
|
151
|
+
auth_type: typing.Text
|
152
|
+
device_code: typing.Text
|
153
|
+
verification_uri_complete: typing.Text
|
154
|
+
expires_in: builtins.int
|
155
|
+
interval: builtins.int
|
162
156
|
def __init__(self,
|
163
157
|
*,
|
164
|
-
|
158
|
+
auth_type: typing.Text = ...,
|
159
|
+
device_code: typing.Text = ...,
|
160
|
+
verification_uri_complete: typing.Text = ...,
|
161
|
+
expires_in: builtins.int = ...,
|
162
|
+
interval: builtins.int = ...,
|
165
163
|
) -> None: ...
|
166
|
-
def ClearField(self, field_name: typing_extensions.Literal["
|
164
|
+
def ClearField(self, field_name: typing_extensions.Literal["auth_type",b"auth_type","device_code",b"device_code","expires_in",b"expires_in","interval",b"interval","verification_uri_complete",b"verification_uri_complete"]) -> None: ...
|
167
165
|
global___GetLoginDetailsResponse = GetLoginDetailsResponse
|
168
166
|
|
169
167
|
class GetAuthTokensRequest(google.protobuf.message.Message):
|
170
168
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
171
|
-
|
172
|
-
|
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]: ...
|
169
|
+
DEVICE_CODE_FIELD_NUMBER: builtins.int
|
170
|
+
device_code: typing.Text
|
187
171
|
def __init__(self,
|
188
172
|
*,
|
189
|
-
|
173
|
+
device_code: typing.Text = ...,
|
190
174
|
) -> None: ...
|
191
|
-
def ClearField(self, field_name: typing_extensions.Literal["
|
175
|
+
def ClearField(self, field_name: typing_extensions.Literal["device_code",b"device_code"]) -> None: ...
|
192
176
|
global___GetAuthTokensRequest = GetAuthTokensRequest
|
193
177
|
|
194
178
|
class GetAuthTokensResponse(google.protobuf.message.Message):
|
195
179
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
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]: ...
|
180
|
+
ACCESS_TOKEN_FIELD_NUMBER: builtins.int
|
181
|
+
REFRESH_TOKEN_FIELD_NUMBER: builtins.int
|
182
|
+
access_token: typing.Text
|
183
|
+
refresh_token: typing.Text
|
212
184
|
def __init__(self,
|
213
185
|
*,
|
214
|
-
|
186
|
+
access_token: typing.Text = ...,
|
187
|
+
refresh_token: typing.Text = ...,
|
215
188
|
) -> None: ...
|
216
|
-
def ClearField(self, field_name: typing_extensions.Literal["
|
189
|
+
def ClearField(self, field_name: typing_extensions.Literal["access_token",b"access_token","refresh_token",b"refresh_token"]) -> None: ...
|
217
190
|
global___GetAuthTokensResponse = GetAuthTokensResponse
|
218
191
|
|
219
192
|
class StopRunRequest(google.protobuf.message.Message):
|
flwr/proto/fleet_pb2.py
CHANGED
@@ -16,9 +16,10 @@ from flwr.proto import node_pb2 as flwr_dot_proto_dot_node__pb2
|
|
16
16
|
from flwr.proto import task_pb2 as flwr_dot_proto_dot_task__pb2
|
17
17
|
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
|
+
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
19
20
|
|
20
21
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/fleet.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"*\n\x11\x43reateNodeRequest\x12\x15\n\rping_interval\x18\x01 \x01(\x01\"4\n\x12\x43reateNodeResponse\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"3\n\x11\x44\x65leteNodeRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"\x14\n\x12\x44\x65leteNodeResponse\"D\n\x0bPingRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x15\n\rping_interval\x18\x02 \x01(\x01\"\x1f\n\x0cPingResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"F\n\x12PullTaskInsRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"k\n\x13PullTaskInsResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rtask_ins_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"`\n\x12PushTaskResRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rtask_res_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskRes\"\xae\x01\n\x13PushTaskResResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12=\n\x07results\x18\x02 \x03(\x0b\x32,.flwr.proto.PushTaskResResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x1e\n\tReconnect\x12\x11\n\treconnect\x18\x01 \x01(\x04\x32\
|
22
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x66lwr/proto/fleet.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x18\x66lwr/proto/message.proto\"*\n\x11\x43reateNodeRequest\x12\x15\n\rping_interval\x18\x01 \x01(\x01\"4\n\x12\x43reateNodeResponse\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"3\n\x11\x44\x65leteNodeRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\"\x14\n\x12\x44\x65leteNodeResponse\"D\n\x0bPingRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x15\n\rping_interval\x18\x02 \x01(\x01\"\x1f\n\x0cPingResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"F\n\x12PullTaskInsRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"k\n\x13PullTaskInsResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rtask_ins_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"`\n\x12PushTaskResRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rtask_res_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.TaskRes\"\xae\x01\n\x13PushTaskResResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12=\n\x07results\x18\x02 \x03(\x0b\x32,.flwr.proto.PushTaskResResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"J\n\x13PullMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x13\n\x0bmessage_ids\x18\x02 \x03(\t\"l\n\x14PullMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"a\n\x13PushMessagesRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12*\n\rmessages_list\x18\x02 \x03(\x0b\x32\x13.flwr.proto.Message\"\xb0\x01\n\x14PushMessagesResponse\x12(\n\treconnect\x18\x01 \x01(\x0b\x32\x15.flwr.proto.Reconnect\x12>\n\x07results\x18\x02 \x03(\x0b\x32-.flwr.proto.PushMessagesResponse.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x1e\n\tReconnect\x12\x11\n\treconnect\x18\x01 \x01(\x04\x32\xb6\x05\n\x05\x46leet\x12M\n\nCreateNode\x12\x1d.flwr.proto.CreateNodeRequest\x1a\x1e.flwr.proto.CreateNodeResponse\"\x00\x12M\n\nDeleteNode\x12\x1d.flwr.proto.DeleteNodeRequest\x1a\x1e.flwr.proto.DeleteNodeResponse\"\x00\x12;\n\x04Ping\x12\x17.flwr.proto.PingRequest\x1a\x18.flwr.proto.PingResponse\"\x00\x12P\n\x0bPullTaskIns\x12\x1e.flwr.proto.PullTaskInsRequest\x1a\x1f.flwr.proto.PullTaskInsResponse\"\x00\x12S\n\x0cPullMessages\x12\x1f.flwr.proto.PullMessagesRequest\x1a .flwr.proto.PullMessagesResponse\"\x00\x12P\n\x0bPushTaskRes\x12\x1e.flwr.proto.PushTaskResRequest\x1a\x1f.flwr.proto.PushTaskResResponse\"\x00\x12S\n\x0cPushMessages\x12\x1f.flwr.proto.PushMessagesRequest\x1a .flwr.proto.PushMessagesResponse\"\x00\x12\x41\n\x06GetRun\x12\x19.flwr.proto.GetRunRequest\x1a\x1a.flwr.proto.GetRunResponse\"\x00\x12\x41\n\x06GetFab\x12\x19.flwr.proto.GetFabRequest\x1a\x1a.flwr.proto.GetFabResponse\"\x00\x62\x06proto3')
|
22
23
|
|
23
24
|
_globals = globals()
|
24
25
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -27,30 +28,42 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
28
|
DESCRIPTOR._options = None
|
28
29
|
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._options = None
|
29
30
|
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_options = b'8\001'
|
30
|
-
_globals['
|
31
|
-
_globals['
|
32
|
-
_globals['
|
33
|
-
_globals['
|
34
|
-
_globals['
|
35
|
-
_globals['
|
36
|
-
_globals['
|
37
|
-
_globals['
|
38
|
-
_globals['
|
39
|
-
_globals['
|
40
|
-
_globals['
|
41
|
-
_globals['
|
42
|
-
_globals['
|
43
|
-
_globals['
|
44
|
-
_globals['
|
45
|
-
_globals['
|
46
|
-
_globals['
|
47
|
-
_globals['
|
48
|
-
_globals['
|
49
|
-
_globals['
|
50
|
-
_globals['
|
51
|
-
_globals['
|
52
|
-
_globals['
|
53
|
-
_globals['
|
54
|
-
_globals['
|
55
|
-
_globals['
|
31
|
+
_globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._options = None
|
32
|
+
_globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._serialized_options = b'8\001'
|
33
|
+
_globals['_CREATENODEREQUEST']._serialized_start=154
|
34
|
+
_globals['_CREATENODEREQUEST']._serialized_end=196
|
35
|
+
_globals['_CREATENODERESPONSE']._serialized_start=198
|
36
|
+
_globals['_CREATENODERESPONSE']._serialized_end=250
|
37
|
+
_globals['_DELETENODEREQUEST']._serialized_start=252
|
38
|
+
_globals['_DELETENODEREQUEST']._serialized_end=303
|
39
|
+
_globals['_DELETENODERESPONSE']._serialized_start=305
|
40
|
+
_globals['_DELETENODERESPONSE']._serialized_end=325
|
41
|
+
_globals['_PINGREQUEST']._serialized_start=327
|
42
|
+
_globals['_PINGREQUEST']._serialized_end=395
|
43
|
+
_globals['_PINGRESPONSE']._serialized_start=397
|
44
|
+
_globals['_PINGRESPONSE']._serialized_end=428
|
45
|
+
_globals['_PULLTASKINSREQUEST']._serialized_start=430
|
46
|
+
_globals['_PULLTASKINSREQUEST']._serialized_end=500
|
47
|
+
_globals['_PULLTASKINSRESPONSE']._serialized_start=502
|
48
|
+
_globals['_PULLTASKINSRESPONSE']._serialized_end=609
|
49
|
+
_globals['_PUSHTASKRESREQUEST']._serialized_start=611
|
50
|
+
_globals['_PUSHTASKRESREQUEST']._serialized_end=707
|
51
|
+
_globals['_PUSHTASKRESRESPONSE']._serialized_start=710
|
52
|
+
_globals['_PUSHTASKRESRESPONSE']._serialized_end=884
|
53
|
+
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_start=838
|
54
|
+
_globals['_PUSHTASKRESRESPONSE_RESULTSENTRY']._serialized_end=884
|
55
|
+
_globals['_PULLMESSAGESREQUEST']._serialized_start=886
|
56
|
+
_globals['_PULLMESSAGESREQUEST']._serialized_end=960
|
57
|
+
_globals['_PULLMESSAGESRESPONSE']._serialized_start=962
|
58
|
+
_globals['_PULLMESSAGESRESPONSE']._serialized_end=1070
|
59
|
+
_globals['_PUSHMESSAGESREQUEST']._serialized_start=1072
|
60
|
+
_globals['_PUSHMESSAGESREQUEST']._serialized_end=1169
|
61
|
+
_globals['_PUSHMESSAGESRESPONSE']._serialized_start=1172
|
62
|
+
_globals['_PUSHMESSAGESRESPONSE']._serialized_end=1348
|
63
|
+
_globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._serialized_start=838
|
64
|
+
_globals['_PUSHMESSAGESRESPONSE_RESULTSENTRY']._serialized_end=884
|
65
|
+
_globals['_RECONNECT']._serialized_start=1350
|
66
|
+
_globals['_RECONNECT']._serialized_end=1380
|
67
|
+
_globals['_FLEET']._serialized_start=1383
|
68
|
+
_globals['_FLEET']._serialized_end=2077
|
56
69
|
# @@protoc_insertion_point(module_scope)
|