flwr-nightly 1.19.0.dev20250616__py3-none-any.whl → 1.20.0.dev20250618__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/new/templates/app/pyproject.baseline.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
- flwr/cli/run/run.py +45 -38
- flwr/proto/clientappio_pb2.py +27 -19
- flwr/proto/clientappio_pb2.pyi +47 -4
- flwr/proto/clientappio_pb2_grpc.py +70 -2
- flwr/proto/clientappio_pb2_grpc.pyi +30 -4
- flwr/server/app.py +1 -1
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +1 -1
- flwr/server/superlink/fleet/message_handler/message_handler.py +1 -1
- flwr/server/superlink/fleet/rest_rere/rest_api.py +1 -2
- flwr/server/superlink/serverappio/serverappio_grpc.py +1 -1
- flwr/server/superlink/serverappio/serverappio_servicer.py +1 -2
- flwr/server/superlink/simulation/simulationio_grpc.py +1 -1
- flwr/server/superlink/simulation/simulationio_servicer.py +1 -1
- flwr/{server/superlink → supercore}/ffs/disk_ffs.py +1 -1
- flwr/superexec/deployment.py +1 -2
- flwr/superexec/exec_grpc.py +1 -1
- flwr/superexec/exec_servicer.py +1 -1
- flwr/superexec/executor.py +1 -1
- flwr/superexec/simulation.py +1 -2
- flwr/supernode/cli/flwr_clientapp.py +8 -2
- flwr/supernode/nodestate/in_memory_nodestate.py +11 -2
- flwr/supernode/nodestate/nodestate.py +15 -0
- flwr/supernode/runtime/run_clientapp.py +22 -18
- flwr/supernode/servicer/clientappio/clientappio_servicer.py +83 -85
- flwr/supernode/start_client_internal.py +23 -36
- {flwr_nightly-1.19.0.dev20250616.dist-info → flwr_nightly-1.20.0.dev20250618.dist-info}/METADATA +1 -1
- {flwr_nightly-1.19.0.dev20250616.dist-info → flwr_nightly-1.20.0.dev20250618.dist-info}/RECORD +41 -41
- /flwr/{server/superlink → supercore}/ffs/__init__.py +0 -0
- /flwr/{server/superlink → supercore}/ffs/ffs.py +0 -0
- /flwr/{server/superlink → supercore}/ffs/ffs_factory.py +0 -0
- {flwr_nightly-1.19.0.dev20250616.dist-info → flwr_nightly-1.20.0.dev20250618.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.19.0.dev20250616.dist-info → flwr_nightly-1.20.0.dev20250618.dist-info}/entry_points.txt +0 -0
flwr/cli/run/run.py
CHANGED
@@ -150,50 +150,57 @@ def _run_with_exec_api(
|
|
150
150
|
stream: bool,
|
151
151
|
output_format: str,
|
152
152
|
) -> None:
|
153
|
-
|
154
|
-
|
155
|
-
|
153
|
+
channel = None
|
154
|
+
try:
|
155
|
+
auth_plugin = try_obtain_cli_auth_plugin(app, federation, federation_config)
|
156
|
+
channel = init_channel(app, federation_config, auth_plugin)
|
157
|
+
stub = ExecStub(channel)
|
156
158
|
|
157
|
-
|
158
|
-
|
159
|
+
fab_bytes, fab_hash, config = build_fab(app)
|
160
|
+
fab_id, fab_version = get_metadata_from_config(config)
|
159
161
|
|
160
|
-
|
162
|
+
fab = Fab(fab_hash, fab_bytes)
|
161
163
|
|
162
|
-
|
163
|
-
|
164
|
-
|
164
|
+
# Construct a `ConfigRecord` out of a flattened `UserConfig`
|
165
|
+
fed_config = flatten_dict(federation_config.get("options", {}))
|
166
|
+
c_record = user_config_to_configrecord(fed_config)
|
165
167
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
)
|
171
|
-
with flwr_cli_grpc_exc_handler():
|
172
|
-
res = stub.StartRun(req)
|
173
|
-
|
174
|
-
if res.HasField("run_id"):
|
175
|
-
typer.secho(f"🎊 Successfully started run {res.run_id}", fg=typer.colors.GREEN)
|
176
|
-
else:
|
177
|
-
typer.secho("❌ Failed to start run", fg=typer.colors.RED)
|
178
|
-
raise typer.Exit(code=1)
|
179
|
-
|
180
|
-
if output_format == CliOutputFormat.JSON:
|
181
|
-
run_output = json.dumps(
|
182
|
-
{
|
183
|
-
"success": res.HasField("run_id"),
|
184
|
-
"run-id": res.run_id if res.HasField("run_id") else None,
|
185
|
-
"fab-id": fab_id,
|
186
|
-
"fab-name": fab_id.rsplit("/", maxsplit=1)[-1],
|
187
|
-
"fab-version": fab_version,
|
188
|
-
"fab-hash": fab_hash[:8],
|
189
|
-
"fab-filename": get_fab_filename(config, fab_hash),
|
190
|
-
}
|
168
|
+
req = StartRunRequest(
|
169
|
+
fab=fab_to_proto(fab),
|
170
|
+
override_config=user_config_to_proto(parse_config_args(config_overrides)),
|
171
|
+
federation_options=config_record_to_proto(c_record),
|
191
172
|
)
|
192
|
-
|
193
|
-
|
173
|
+
with flwr_cli_grpc_exc_handler():
|
174
|
+
res = stub.StartRun(req)
|
194
175
|
|
195
|
-
|
196
|
-
|
176
|
+
if res.HasField("run_id"):
|
177
|
+
typer.secho(
|
178
|
+
f"🎊 Successfully started run {res.run_id}", fg=typer.colors.GREEN
|
179
|
+
)
|
180
|
+
else:
|
181
|
+
typer.secho("❌ Failed to start run", fg=typer.colors.RED)
|
182
|
+
raise typer.Exit(code=1)
|
183
|
+
|
184
|
+
if output_format == CliOutputFormat.JSON:
|
185
|
+
run_output = json.dumps(
|
186
|
+
{
|
187
|
+
"success": res.HasField("run_id"),
|
188
|
+
"run-id": res.run_id if res.HasField("run_id") else None,
|
189
|
+
"fab-id": fab_id,
|
190
|
+
"fab-name": fab_id.rsplit("/", maxsplit=1)[-1],
|
191
|
+
"fab-version": fab_version,
|
192
|
+
"fab-hash": fab_hash[:8],
|
193
|
+
"fab-filename": get_fab_filename(config, fab_hash),
|
194
|
+
}
|
195
|
+
)
|
196
|
+
restore_output()
|
197
|
+
Console().print_json(run_output)
|
198
|
+
|
199
|
+
if stream:
|
200
|
+
start_stream(res.run_id, channel, CONN_REFRESH_PERIOD)
|
201
|
+
finally:
|
202
|
+
if channel:
|
203
|
+
channel.close()
|
197
204
|
|
198
205
|
|
199
206
|
def _run_without_exec_api(
|
flwr/proto/clientappio_pb2.py
CHANGED
@@ -17,29 +17,37 @@ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
17
17
|
from flwr.proto import message_pb2 as flwr_dot_proto_dot_message__pb2
|
18
18
|
|
19
19
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/clientappio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x18\x66lwr/proto/message.proto\"W\n\x15\x43lientAppOutputStatus\x12-\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x1f.flwr.proto.ClientAppOutputCode\x12\x0f\n\x07message\x18\x02 \x01(\t\"\x11\n\x0fGetTokenRequest\"!\n\x10GetTokenResponse\x12\r\n\x05token\x18\x01 \x01(\x04\"+\n\x1aPullClientAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/clientappio.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x18\x66lwr/proto/message.proto\"%\n#GetRunIdsWithPendingMessagesRequest\"7\n$GetRunIdsWithPendingMessagesResponse\x12\x0f\n\x07run_ids\x18\x01 \x03(\x04\"%\n\x13RequestTokenRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"%\n\x14RequestTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\"W\n\x15\x43lientAppOutputStatus\x12-\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x1f.flwr.proto.ClientAppOutputCode\x12\x0f\n\x07message\x18\x02 \x01(\t\"\x11\n\x0fGetTokenRequest\"!\n\x10GetTokenResponse\x12\r\n\x05token\x18\x01 \x01(\x04\"+\n\x1aPullClientAppInputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\xa5\x01\n\x1bPullClientAppInputsResponse\x12$\n\x07message\x18\x01 \x01(\x0b\x32\x13.flwr.proto.Message\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\x12\x1c\n\x03run\x18\x03 \x01(\x0b\x32\x0f.flwr.proto.Run\x12\x1c\n\x03\x66\x61\x62\x18\x04 \x01(\x0b\x32\x0f.flwr.proto.Fab\"x\n\x1bPushClientAppOutputsRequest\x12\r\n\x05token\x18\x01 \x01(\t\x12$\n\x07message\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Message\x12$\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x13.flwr.proto.Context\"Q\n\x1cPushClientAppOutputsResponse\x12\x31\n\x06status\x18\x01 \x01(\x0b\x32!.flwr.proto.ClientAppOutputStatus*L\n\x13\x43lientAppOutputCode\x12\x0b\n\x07SUCCESS\x10\x00\x12\x15\n\x11\x44\x45\x41\x44LINE_EXCEEDED\x10\x01\x12\x11\n\rUNKNOWN_ERROR\x10\x02\x32\x88\x04\n\x0b\x43lientAppIo\x12\x83\x01\n\x1cGetRunIdsWithPendingMessages\x12/.flwr.proto.GetRunIdsWithPendingMessagesRequest\x1a\x30.flwr.proto.GetRunIdsWithPendingMessagesResponse\"\x00\x12S\n\x0cRequestToken\x12\x1f.flwr.proto.RequestTokenRequest\x1a .flwr.proto.RequestTokenResponse\"\x00\x12G\n\x08GetToken\x12\x1b.flwr.proto.GetTokenRequest\x1a\x1c.flwr.proto.GetTokenResponse\"\x00\x12h\n\x13PullClientAppInputs\x12&.flwr.proto.PullClientAppInputsRequest\x1a\'.flwr.proto.PullClientAppInputsResponse\"\x00\x12k\n\x14PushClientAppOutputs\x12\'.flwr.proto.PushClientAppOutputsRequest\x1a(.flwr.proto.PushClientAppOutputsResponse\"\x00\x62\x06proto3')
|
21
21
|
|
22
22
|
_globals = globals()
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
24
24
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.clientappio_pb2', _globals)
|
25
25
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
26
26
|
DESCRIPTOR._options = None
|
27
|
-
_globals['_CLIENTAPPOUTPUTCODE']._serialized_start=
|
28
|
-
_globals['_CLIENTAPPOUTPUTCODE']._serialized_end=
|
29
|
-
_globals['
|
30
|
-
_globals['
|
31
|
-
_globals['
|
32
|
-
_globals['
|
33
|
-
_globals['
|
34
|
-
_globals['
|
35
|
-
_globals['
|
36
|
-
_globals['
|
37
|
-
_globals['
|
38
|
-
_globals['
|
39
|
-
_globals['
|
40
|
-
_globals['
|
41
|
-
_globals['
|
42
|
-
_globals['
|
43
|
-
_globals['
|
44
|
-
_globals['
|
27
|
+
_globals['_CLIENTAPPOUTPUTCODE']._serialized_start=849
|
28
|
+
_globals['_CLIENTAPPOUTPUTCODE']._serialized_end=925
|
29
|
+
_globals['_GETRUNIDSWITHPENDINGMESSAGESREQUEST']._serialized_start=114
|
30
|
+
_globals['_GETRUNIDSWITHPENDINGMESSAGESREQUEST']._serialized_end=151
|
31
|
+
_globals['_GETRUNIDSWITHPENDINGMESSAGESRESPONSE']._serialized_start=153
|
32
|
+
_globals['_GETRUNIDSWITHPENDINGMESSAGESRESPONSE']._serialized_end=208
|
33
|
+
_globals['_REQUESTTOKENREQUEST']._serialized_start=210
|
34
|
+
_globals['_REQUESTTOKENREQUEST']._serialized_end=247
|
35
|
+
_globals['_REQUESTTOKENRESPONSE']._serialized_start=249
|
36
|
+
_globals['_REQUESTTOKENRESPONSE']._serialized_end=286
|
37
|
+
_globals['_CLIENTAPPOUTPUTSTATUS']._serialized_start=288
|
38
|
+
_globals['_CLIENTAPPOUTPUTSTATUS']._serialized_end=375
|
39
|
+
_globals['_GETTOKENREQUEST']._serialized_start=377
|
40
|
+
_globals['_GETTOKENREQUEST']._serialized_end=394
|
41
|
+
_globals['_GETTOKENRESPONSE']._serialized_start=396
|
42
|
+
_globals['_GETTOKENRESPONSE']._serialized_end=429
|
43
|
+
_globals['_PULLCLIENTAPPINPUTSREQUEST']._serialized_start=431
|
44
|
+
_globals['_PULLCLIENTAPPINPUTSREQUEST']._serialized_end=474
|
45
|
+
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_start=477
|
46
|
+
_globals['_PULLCLIENTAPPINPUTSRESPONSE']._serialized_end=642
|
47
|
+
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_start=644
|
48
|
+
_globals['_PUSHCLIENTAPPOUTPUTSREQUEST']._serialized_end=764
|
49
|
+
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_start=766
|
50
|
+
_globals['_PUSHCLIENTAPPOUTPUTSRESPONSE']._serialized_end=847
|
51
|
+
_globals['_CLIENTAPPIO']._serialized_start=928
|
52
|
+
_globals['_CLIENTAPPIO']._serialized_end=1448
|
45
53
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/clientappio_pb2.pyi
CHANGED
@@ -7,6 +7,7 @@ import flwr.proto.fab_pb2
|
|
7
7
|
import flwr.proto.message_pb2
|
8
8
|
import flwr.proto.run_pb2
|
9
9
|
import google.protobuf.descriptor
|
10
|
+
import google.protobuf.internal.containers
|
10
11
|
import google.protobuf.internal.enum_type_wrapper
|
11
12
|
import google.protobuf.message
|
12
13
|
import typing
|
@@ -31,6 +32,48 @@ UNKNOWN_ERROR: ClientAppOutputCode.ValueType # 2
|
|
31
32
|
global___ClientAppOutputCode = ClientAppOutputCode
|
32
33
|
|
33
34
|
|
35
|
+
class GetRunIdsWithPendingMessagesRequest(google.protobuf.message.Message):
|
36
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
37
|
+
def __init__(self,
|
38
|
+
) -> None: ...
|
39
|
+
global___GetRunIdsWithPendingMessagesRequest = GetRunIdsWithPendingMessagesRequest
|
40
|
+
|
41
|
+
class GetRunIdsWithPendingMessagesResponse(google.protobuf.message.Message):
|
42
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
43
|
+
RUN_IDS_FIELD_NUMBER: builtins.int
|
44
|
+
@property
|
45
|
+
def run_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
|
46
|
+
"""List of run IDs"""
|
47
|
+
pass
|
48
|
+
def __init__(self,
|
49
|
+
*,
|
50
|
+
run_ids: typing.Optional[typing.Iterable[builtins.int]] = ...,
|
51
|
+
) -> None: ...
|
52
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_ids",b"run_ids"]) -> None: ...
|
53
|
+
global___GetRunIdsWithPendingMessagesResponse = GetRunIdsWithPendingMessagesResponse
|
54
|
+
|
55
|
+
class RequestTokenRequest(google.protobuf.message.Message):
|
56
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
57
|
+
RUN_ID_FIELD_NUMBER: builtins.int
|
58
|
+
run_id: builtins.int
|
59
|
+
def __init__(self,
|
60
|
+
*,
|
61
|
+
run_id: builtins.int = ...,
|
62
|
+
) -> None: ...
|
63
|
+
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
64
|
+
global___RequestTokenRequest = RequestTokenRequest
|
65
|
+
|
66
|
+
class RequestTokenResponse(google.protobuf.message.Message):
|
67
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
68
|
+
TOKEN_FIELD_NUMBER: builtins.int
|
69
|
+
token: typing.Text
|
70
|
+
def __init__(self,
|
71
|
+
*,
|
72
|
+
token: typing.Text = ...,
|
73
|
+
) -> None: ...
|
74
|
+
def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
|
75
|
+
global___RequestTokenResponse = RequestTokenResponse
|
76
|
+
|
34
77
|
class ClientAppOutputStatus(google.protobuf.message.Message):
|
35
78
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
36
79
|
CODE_FIELD_NUMBER: builtins.int
|
@@ -65,10 +108,10 @@ global___GetTokenResponse = GetTokenResponse
|
|
65
108
|
class PullClientAppInputsRequest(google.protobuf.message.Message):
|
66
109
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
67
110
|
TOKEN_FIELD_NUMBER: builtins.int
|
68
|
-
token:
|
111
|
+
token: typing.Text
|
69
112
|
def __init__(self,
|
70
113
|
*,
|
71
|
-
token:
|
114
|
+
token: typing.Text = ...,
|
72
115
|
) -> None: ...
|
73
116
|
def ClearField(self, field_name: typing_extensions.Literal["token",b"token"]) -> None: ...
|
74
117
|
global___PullClientAppInputsRequest = PullClientAppInputsRequest
|
@@ -103,14 +146,14 @@ class PushClientAppOutputsRequest(google.protobuf.message.Message):
|
|
103
146
|
TOKEN_FIELD_NUMBER: builtins.int
|
104
147
|
MESSAGE_FIELD_NUMBER: builtins.int
|
105
148
|
CONTEXT_FIELD_NUMBER: builtins.int
|
106
|
-
token:
|
149
|
+
token: typing.Text
|
107
150
|
@property
|
108
151
|
def message(self) -> flwr.proto.message_pb2.Message: ...
|
109
152
|
@property
|
110
153
|
def context(self) -> flwr.proto.message_pb2.Context: ...
|
111
154
|
def __init__(self,
|
112
155
|
*,
|
113
|
-
token:
|
156
|
+
token: typing.Text = ...,
|
114
157
|
message: typing.Optional[flwr.proto.message_pb2.Message] = ...,
|
115
158
|
context: typing.Optional[flwr.proto.message_pb2.Context] = ...,
|
116
159
|
) -> None: ...
|
@@ -14,6 +14,16 @@ class ClientAppIoStub(object):
|
|
14
14
|
Args:
|
15
15
|
channel: A grpc.Channel.
|
16
16
|
"""
|
17
|
+
self.GetRunIdsWithPendingMessages = channel.unary_unary(
|
18
|
+
'/flwr.proto.ClientAppIo/GetRunIdsWithPendingMessages',
|
19
|
+
request_serializer=flwr_dot_proto_dot_clientappio__pb2.GetRunIdsWithPendingMessagesRequest.SerializeToString,
|
20
|
+
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetRunIdsWithPendingMessagesResponse.FromString,
|
21
|
+
)
|
22
|
+
self.RequestToken = channel.unary_unary(
|
23
|
+
'/flwr.proto.ClientAppIo/RequestToken',
|
24
|
+
request_serializer=flwr_dot_proto_dot_clientappio__pb2.RequestTokenRequest.SerializeToString,
|
25
|
+
response_deserializer=flwr_dot_proto_dot_clientappio__pb2.RequestTokenResponse.FromString,
|
26
|
+
)
|
17
27
|
self.GetToken = channel.unary_unary(
|
18
28
|
'/flwr.proto.ClientAppIo/GetToken',
|
19
29
|
request_serializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.SerializeToString,
|
@@ -34,6 +44,20 @@ class ClientAppIoStub(object):
|
|
34
44
|
class ClientAppIoServicer(object):
|
35
45
|
"""Missing associated documentation comment in .proto file."""
|
36
46
|
|
47
|
+
def GetRunIdsWithPendingMessages(self, request, context):
|
48
|
+
"""Get run IDs with pending messages
|
49
|
+
"""
|
50
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
51
|
+
context.set_details('Method not implemented!')
|
52
|
+
raise NotImplementedError('Method not implemented!')
|
53
|
+
|
54
|
+
def RequestToken(self, request, context):
|
55
|
+
"""Request token
|
56
|
+
"""
|
57
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
58
|
+
context.set_details('Method not implemented!')
|
59
|
+
raise NotImplementedError('Method not implemented!')
|
60
|
+
|
37
61
|
def GetToken(self, request, context):
|
38
62
|
"""Get token
|
39
63
|
"""
|
@@ -42,14 +66,14 @@ class ClientAppIoServicer(object):
|
|
42
66
|
raise NotImplementedError('Method not implemented!')
|
43
67
|
|
44
68
|
def PullClientAppInputs(self, request, context):
|
45
|
-
"""
|
69
|
+
"""Pull client app inputs
|
46
70
|
"""
|
47
71
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
48
72
|
context.set_details('Method not implemented!')
|
49
73
|
raise NotImplementedError('Method not implemented!')
|
50
74
|
|
51
75
|
def PushClientAppOutputs(self, request, context):
|
52
|
-
"""
|
76
|
+
"""Push client app outputs
|
53
77
|
"""
|
54
78
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
55
79
|
context.set_details('Method not implemented!')
|
@@ -58,6 +82,16 @@ class ClientAppIoServicer(object):
|
|
58
82
|
|
59
83
|
def add_ClientAppIoServicer_to_server(servicer, server):
|
60
84
|
rpc_method_handlers = {
|
85
|
+
'GetRunIdsWithPendingMessages': grpc.unary_unary_rpc_method_handler(
|
86
|
+
servicer.GetRunIdsWithPendingMessages,
|
87
|
+
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetRunIdsWithPendingMessagesRequest.FromString,
|
88
|
+
response_serializer=flwr_dot_proto_dot_clientappio__pb2.GetRunIdsWithPendingMessagesResponse.SerializeToString,
|
89
|
+
),
|
90
|
+
'RequestToken': grpc.unary_unary_rpc_method_handler(
|
91
|
+
servicer.RequestToken,
|
92
|
+
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.RequestTokenRequest.FromString,
|
93
|
+
response_serializer=flwr_dot_proto_dot_clientappio__pb2.RequestTokenResponse.SerializeToString,
|
94
|
+
),
|
61
95
|
'GetToken': grpc.unary_unary_rpc_method_handler(
|
62
96
|
servicer.GetToken,
|
63
97
|
request_deserializer=flwr_dot_proto_dot_clientappio__pb2.GetTokenRequest.FromString,
|
@@ -83,6 +117,40 @@ def add_ClientAppIoServicer_to_server(servicer, server):
|
|
83
117
|
class ClientAppIo(object):
|
84
118
|
"""Missing associated documentation comment in .proto file."""
|
85
119
|
|
120
|
+
@staticmethod
|
121
|
+
def GetRunIdsWithPendingMessages(request,
|
122
|
+
target,
|
123
|
+
options=(),
|
124
|
+
channel_credentials=None,
|
125
|
+
call_credentials=None,
|
126
|
+
insecure=False,
|
127
|
+
compression=None,
|
128
|
+
wait_for_ready=None,
|
129
|
+
timeout=None,
|
130
|
+
metadata=None):
|
131
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/GetRunIdsWithPendingMessages',
|
132
|
+
flwr_dot_proto_dot_clientappio__pb2.GetRunIdsWithPendingMessagesRequest.SerializeToString,
|
133
|
+
flwr_dot_proto_dot_clientappio__pb2.GetRunIdsWithPendingMessagesResponse.FromString,
|
134
|
+
options, channel_credentials,
|
135
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
136
|
+
|
137
|
+
@staticmethod
|
138
|
+
def RequestToken(request,
|
139
|
+
target,
|
140
|
+
options=(),
|
141
|
+
channel_credentials=None,
|
142
|
+
call_credentials=None,
|
143
|
+
insecure=False,
|
144
|
+
compression=None,
|
145
|
+
wait_for_ready=None,
|
146
|
+
timeout=None,
|
147
|
+
metadata=None):
|
148
|
+
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ClientAppIo/RequestToken',
|
149
|
+
flwr_dot_proto_dot_clientappio__pb2.RequestTokenRequest.SerializeToString,
|
150
|
+
flwr_dot_proto_dot_clientappio__pb2.RequestTokenResponse.FromString,
|
151
|
+
options, channel_credentials,
|
152
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
153
|
+
|
86
154
|
@staticmethod
|
87
155
|
def GetToken(request,
|
88
156
|
target,
|
@@ -8,6 +8,16 @@ import grpc
|
|
8
8
|
|
9
9
|
class ClientAppIoStub:
|
10
10
|
def __init__(self, channel: grpc.Channel) -> None: ...
|
11
|
+
GetRunIdsWithPendingMessages: grpc.UnaryUnaryMultiCallable[
|
12
|
+
flwr.proto.clientappio_pb2.GetRunIdsWithPendingMessagesRequest,
|
13
|
+
flwr.proto.clientappio_pb2.GetRunIdsWithPendingMessagesResponse]
|
14
|
+
"""Get run IDs with pending messages"""
|
15
|
+
|
16
|
+
RequestToken: grpc.UnaryUnaryMultiCallable[
|
17
|
+
flwr.proto.clientappio_pb2.RequestTokenRequest,
|
18
|
+
flwr.proto.clientappio_pb2.RequestTokenResponse]
|
19
|
+
"""Request token"""
|
20
|
+
|
11
21
|
GetToken: grpc.UnaryUnaryMultiCallable[
|
12
22
|
flwr.proto.clientappio_pb2.GetTokenRequest,
|
13
23
|
flwr.proto.clientappio_pb2.GetTokenResponse]
|
@@ -16,15 +26,31 @@ class ClientAppIoStub:
|
|
16
26
|
PullClientAppInputs: grpc.UnaryUnaryMultiCallable[
|
17
27
|
flwr.proto.clientappio_pb2.PullClientAppInputsRequest,
|
18
28
|
flwr.proto.clientappio_pb2.PullClientAppInputsResponse]
|
19
|
-
"""
|
29
|
+
"""Pull client app inputs"""
|
20
30
|
|
21
31
|
PushClientAppOutputs: grpc.UnaryUnaryMultiCallable[
|
22
32
|
flwr.proto.clientappio_pb2.PushClientAppOutputsRequest,
|
23
33
|
flwr.proto.clientappio_pb2.PushClientAppOutputsResponse]
|
24
|
-
"""
|
34
|
+
"""Push client app outputs"""
|
25
35
|
|
26
36
|
|
27
37
|
class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
38
|
+
@abc.abstractmethod
|
39
|
+
def GetRunIdsWithPendingMessages(self,
|
40
|
+
request: flwr.proto.clientappio_pb2.GetRunIdsWithPendingMessagesRequest,
|
41
|
+
context: grpc.ServicerContext,
|
42
|
+
) -> flwr.proto.clientappio_pb2.GetRunIdsWithPendingMessagesResponse:
|
43
|
+
"""Get run IDs with pending messages"""
|
44
|
+
pass
|
45
|
+
|
46
|
+
@abc.abstractmethod
|
47
|
+
def RequestToken(self,
|
48
|
+
request: flwr.proto.clientappio_pb2.RequestTokenRequest,
|
49
|
+
context: grpc.ServicerContext,
|
50
|
+
) -> flwr.proto.clientappio_pb2.RequestTokenResponse:
|
51
|
+
"""Request token"""
|
52
|
+
pass
|
53
|
+
|
28
54
|
@abc.abstractmethod
|
29
55
|
def GetToken(self,
|
30
56
|
request: flwr.proto.clientappio_pb2.GetTokenRequest,
|
@@ -38,7 +64,7 @@ class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
|
38
64
|
request: flwr.proto.clientappio_pb2.PullClientAppInputsRequest,
|
39
65
|
context: grpc.ServicerContext,
|
40
66
|
) -> flwr.proto.clientappio_pb2.PullClientAppInputsResponse:
|
41
|
-
"""
|
67
|
+
"""Pull client app inputs"""
|
42
68
|
pass
|
43
69
|
|
44
70
|
@abc.abstractmethod
|
@@ -46,7 +72,7 @@ class ClientAppIoServicer(metaclass=abc.ABCMeta):
|
|
46
72
|
request: flwr.proto.clientappio_pb2.PushClientAppOutputsRequest,
|
47
73
|
context: grpc.ServicerContext,
|
48
74
|
) -> flwr.proto.clientappio_pb2.PushClientAppOutputsResponse:
|
49
|
-
"""
|
75
|
+
"""Push client app outputs"""
|
50
76
|
pass
|
51
77
|
|
52
78
|
|
flwr/server/app.py
CHANGED
@@ -71,11 +71,11 @@ from flwr.proto.grpcadapter_pb2_grpc import add_GrpcAdapterServicer_to_server
|
|
71
71
|
from flwr.server.fleet_event_log_interceptor import FleetEventLogInterceptor
|
72
72
|
from flwr.server.serverapp.app import flwr_serverapp
|
73
73
|
from flwr.simulation.app import flwr_simulation
|
74
|
+
from flwr.supercore.ffs import FfsFactory
|
74
75
|
from flwr.supercore.object_store import ObjectStoreFactory
|
75
76
|
from flwr.superexec.app import load_executor
|
76
77
|
from flwr.superexec.exec_grpc import run_exec_api_grpc
|
77
78
|
|
78
|
-
from .superlink.ffs.ffs_factory import FfsFactory
|
79
79
|
from .superlink.fleet.grpc_adapter.grpc_adapter_servicer import GrpcAdapterServicer
|
80
80
|
from .superlink.fleet.grpc_rere.fleet_servicer import FleetServicer
|
81
81
|
from .superlink.fleet.grpc_rere.server_interceptor import AuthenticateServerInterceptor
|
@@ -48,10 +48,10 @@ from flwr.proto.message_pb2 import ( # pylint: disable=E0611
|
|
48
48
|
PushObjectResponse,
|
49
49
|
)
|
50
50
|
from flwr.proto.run_pb2 import GetRunRequest, GetRunResponse # pylint: disable=E0611
|
51
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
52
51
|
from flwr.server.superlink.fleet.message_handler import message_handler
|
53
52
|
from flwr.server.superlink.linkstate import LinkStateFactory
|
54
53
|
from flwr.server.superlink.utils import abort_grpc_context
|
54
|
+
from flwr.supercore.ffs import FfsFactory
|
55
55
|
from flwr.supercore.object_store import ObjectStoreFactory
|
56
56
|
|
57
57
|
|
@@ -58,9 +58,9 @@ from flwr.proto.run_pb2 import ( # pylint: disable=E0611
|
|
58
58
|
GetRunResponse,
|
59
59
|
Run,
|
60
60
|
)
|
61
|
-
from flwr.server.superlink.ffs.ffs import Ffs
|
62
61
|
from flwr.server.superlink.linkstate import LinkState
|
63
62
|
from flwr.server.superlink.utils import check_abort
|
63
|
+
from flwr.supercore.ffs import Ffs
|
64
64
|
from flwr.supercore.object_store import NoObjectInStoreError, ObjectStore
|
65
65
|
|
66
66
|
from ...utils import store_mapping_and_register_objects
|
@@ -47,10 +47,9 @@ from flwr.proto.message_pb2 import ( # pylint: disable=E0611
|
|
47
47
|
PushObjectResponse,
|
48
48
|
)
|
49
49
|
from flwr.proto.run_pb2 import GetRunRequest, GetRunResponse # pylint: disable=E0611
|
50
|
-
from flwr.server.superlink.ffs.ffs import Ffs
|
51
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
52
50
|
from flwr.server.superlink.fleet.message_handler import message_handler
|
53
51
|
from flwr.server.superlink.linkstate import LinkState, LinkStateFactory
|
52
|
+
from flwr.supercore.ffs import Ffs, FfsFactory
|
54
53
|
from flwr.supercore.object_store import ObjectStore, ObjectStoreFactory
|
55
54
|
|
56
55
|
try:
|
@@ -26,8 +26,8 @@ from flwr.common.logger import log
|
|
26
26
|
from flwr.proto.serverappio_pb2_grpc import ( # pylint: disable=E0611
|
27
27
|
add_ServerAppIoServicer_to_server,
|
28
28
|
)
|
29
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
30
29
|
from flwr.server.superlink.linkstate import LinkStateFactory
|
30
|
+
from flwr.supercore.ffs import FfsFactory
|
31
31
|
from flwr.supercore.object_store import ObjectStoreFactory
|
32
32
|
|
33
33
|
from .serverappio_servicer import ServerAppIoServicer
|
@@ -81,11 +81,10 @@ from flwr.proto.serverappio_pb2 import ( # pylint: disable=E0611
|
|
81
81
|
PushServerAppOutputsRequest,
|
82
82
|
PushServerAppOutputsResponse,
|
83
83
|
)
|
84
|
-
from flwr.server.superlink.ffs.ffs import Ffs
|
85
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
86
84
|
from flwr.server.superlink.linkstate import LinkState, LinkStateFactory
|
87
85
|
from flwr.server.superlink.utils import abort_if
|
88
86
|
from flwr.server.utils.validator import validate_message
|
87
|
+
from flwr.supercore.ffs import Ffs, FfsFactory
|
89
88
|
from flwr.supercore.object_store import NoObjectInStoreError, ObjectStoreFactory
|
90
89
|
|
91
90
|
from ..utils import store_mapping_and_register_objects
|
@@ -26,8 +26,8 @@ from flwr.common.logger import log
|
|
26
26
|
from flwr.proto.simulationio_pb2_grpc import ( # pylint: disable=E0611
|
27
27
|
add_SimulationIoServicer_to_server,
|
28
28
|
)
|
29
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
30
29
|
from flwr.server.superlink.linkstate import LinkStateFactory
|
30
|
+
from flwr.supercore.ffs import FfsFactory
|
31
31
|
|
32
32
|
from .simulationio_servicer import SimulationIoServicer
|
33
33
|
|
@@ -56,9 +56,9 @@ from flwr.proto.simulationio_pb2 import ( # pylint: disable=E0611
|
|
56
56
|
PushSimulationOutputsRequest,
|
57
57
|
PushSimulationOutputsResponse,
|
58
58
|
)
|
59
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
60
59
|
from flwr.server.superlink.linkstate import LinkStateFactory
|
61
60
|
from flwr.server.superlink.utils import abort_if
|
61
|
+
from flwr.supercore.ffs import FfsFactory
|
62
62
|
|
63
63
|
|
64
64
|
class SimulationIoServicer(simulationio_pb2_grpc.SimulationIoServicer):
|
flwr/superexec/deployment.py
CHANGED
@@ -31,9 +31,8 @@ from flwr.common.constant import (
|
|
31
31
|
)
|
32
32
|
from flwr.common.logger import log
|
33
33
|
from flwr.common.typing import Fab, RunStatus, UserConfig
|
34
|
-
from flwr.server.superlink.ffs import Ffs
|
35
|
-
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
36
34
|
from flwr.server.superlink.linkstate import LinkState, LinkStateFactory
|
35
|
+
from flwr.supercore.ffs import Ffs, FfsFactory
|
37
36
|
|
38
37
|
from .executor import Executor
|
39
38
|
|