flwr-nightly 1.19.0.dev20250522__py3-none-any.whl → 1.19.0.dev20250524__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/compat/server/app.py +174 -0
- flwr/proto/run_pb2.py +19 -27
- flwr/proto/run_pb2.pyi +0 -51
- flwr/proto/serverappio_pb2.py +2 -2
- flwr/proto/serverappio_pb2_grpc.py +0 -34
- flwr/proto/serverappio_pb2_grpc.pyi +0 -13
- flwr/server/__init__.py +1 -1
- flwr/server/app.py +1 -150
- flwr/server/superlink/serverappio/serverappio_servicer.py +1 -31
- flwr/{client/supernode → supernode/cli}/__init__.py +3 -5
- flwr/{client/supernode/app.py → supernode/cli/flower_supernode.py} +2 -2
- flwr/{client → supernode}/start_client_internal.py +154 -163
- {flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/METADATA +1 -1
- {flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/RECORD +16 -15
- {flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/entry_points.txt +1 -1
- {flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/WHEEL +0 -0
@@ -0,0 +1,174 @@
|
|
1
|
+
# Copyright 2025 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 server app."""
|
16
|
+
|
17
|
+
|
18
|
+
import sys
|
19
|
+
from logging import INFO
|
20
|
+
from typing import Optional
|
21
|
+
|
22
|
+
from flwr.common import GRPC_MAX_MESSAGE_LENGTH, EventType, event
|
23
|
+
from flwr.common.address import parse_address
|
24
|
+
from flwr.common.constant import FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS
|
25
|
+
from flwr.common.exit_handlers import register_exit_handlers
|
26
|
+
from flwr.common.logger import log, warn_deprecated_feature
|
27
|
+
from flwr.server.client_manager import ClientManager
|
28
|
+
from flwr.server.history import History
|
29
|
+
from flwr.server.server import Server, init_defaults, run_fl
|
30
|
+
from flwr.server.server_config import ServerConfig
|
31
|
+
from flwr.server.strategy import Strategy
|
32
|
+
from flwr.server.superlink.fleet.grpc_bidi.grpc_server import start_grpc_server
|
33
|
+
|
34
|
+
|
35
|
+
def start_server( # pylint: disable=too-many-arguments,too-many-locals
|
36
|
+
*,
|
37
|
+
server_address: str = FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS,
|
38
|
+
server: Optional[Server] = None,
|
39
|
+
config: Optional[ServerConfig] = None,
|
40
|
+
strategy: Optional[Strategy] = None,
|
41
|
+
client_manager: Optional[ClientManager] = None,
|
42
|
+
grpc_max_message_length: int = GRPC_MAX_MESSAGE_LENGTH,
|
43
|
+
certificates: Optional[tuple[bytes, bytes, bytes]] = None,
|
44
|
+
) -> History:
|
45
|
+
"""Start a Flower server using the gRPC transport layer.
|
46
|
+
|
47
|
+
Warning
|
48
|
+
-------
|
49
|
+
This function is deprecated since 1.13.0. Use the :code:`flower-superlink` command
|
50
|
+
instead to start a SuperLink.
|
51
|
+
|
52
|
+
Parameters
|
53
|
+
----------
|
54
|
+
server_address : Optional[str]
|
55
|
+
The IPv4 or IPv6 address of the server. Defaults to `"[::]:8080"`.
|
56
|
+
server : Optional[flwr.server.Server] (default: None)
|
57
|
+
A server implementation, either `flwr.server.Server` or a subclass
|
58
|
+
thereof. If no instance is provided, then `start_server` will create
|
59
|
+
one.
|
60
|
+
config : Optional[ServerConfig] (default: None)
|
61
|
+
Currently supported values are `num_rounds` (int, default: 1) and
|
62
|
+
`round_timeout` in seconds (float, default: None).
|
63
|
+
strategy : Optional[flwr.server.Strategy] (default: None).
|
64
|
+
An implementation of the abstract base class
|
65
|
+
`flwr.server.strategy.Strategy`. If no strategy is provided, then
|
66
|
+
`start_server` will use `flwr.server.strategy.FedAvg`.
|
67
|
+
client_manager : Optional[flwr.server.ClientManager] (default: None)
|
68
|
+
An implementation of the abstract base class
|
69
|
+
`flwr.server.ClientManager`. If no implementation is provided, then
|
70
|
+
`start_server` will use
|
71
|
+
`flwr.server.client_manager.SimpleClientManager`.
|
72
|
+
grpc_max_message_length : int (default: 536_870_912, this equals 512MB)
|
73
|
+
The maximum length of gRPC messages that can be exchanged with the
|
74
|
+
Flower clients. The default should be sufficient for most models.
|
75
|
+
Users who train very large models might need to increase this
|
76
|
+
value. Note that the Flower clients need to be started with the
|
77
|
+
same value (see `flwr.client.start_client`), otherwise clients will
|
78
|
+
not know about the increased limit and block larger messages.
|
79
|
+
certificates : Tuple[bytes, bytes, bytes] (default: None)
|
80
|
+
Tuple containing root certificate, server certificate, and private key
|
81
|
+
to start a secure SSL-enabled server. The tuple is expected to have
|
82
|
+
three bytes elements in the following order:
|
83
|
+
|
84
|
+
* CA certificate.
|
85
|
+
* server certificate.
|
86
|
+
* server private key.
|
87
|
+
|
88
|
+
Returns
|
89
|
+
-------
|
90
|
+
hist : flwr.server.history.History
|
91
|
+
Object containing training and evaluation metrics.
|
92
|
+
|
93
|
+
Examples
|
94
|
+
--------
|
95
|
+
Starting an insecure server::
|
96
|
+
|
97
|
+
start_server()
|
98
|
+
|
99
|
+
Starting a TLS-enabled server::
|
100
|
+
|
101
|
+
start_server(
|
102
|
+
certificates=(
|
103
|
+
Path("/crts/root.pem").read_bytes(),
|
104
|
+
Path("/crts/localhost.crt").read_bytes(),
|
105
|
+
Path("/crts/localhost.key").read_bytes()
|
106
|
+
)
|
107
|
+
)
|
108
|
+
"""
|
109
|
+
msg = (
|
110
|
+
"flwr.server.start_server() is deprecated."
|
111
|
+
"\n\tInstead, use the `flower-superlink` CLI command to start a SuperLink "
|
112
|
+
"as shown below:"
|
113
|
+
"\n\n\t\t$ flower-superlink --insecure"
|
114
|
+
"\n\n\tTo view usage and all available options, run:"
|
115
|
+
"\n\n\t\t$ flower-superlink --help"
|
116
|
+
"\n\n\tUsing `start_server()` is deprecated."
|
117
|
+
)
|
118
|
+
warn_deprecated_feature(name=msg)
|
119
|
+
|
120
|
+
event(EventType.START_SERVER_ENTER)
|
121
|
+
|
122
|
+
# Parse IP address
|
123
|
+
parsed_address = parse_address(server_address)
|
124
|
+
if not parsed_address:
|
125
|
+
sys.exit(f"Server IP address ({server_address}) cannot be parsed.")
|
126
|
+
host, port, is_v6 = parsed_address
|
127
|
+
address = f"[{host}]:{port}" if is_v6 else f"{host}:{port}"
|
128
|
+
|
129
|
+
# Initialize server and server config
|
130
|
+
initialized_server, initialized_config = init_defaults(
|
131
|
+
server=server,
|
132
|
+
config=config,
|
133
|
+
strategy=strategy,
|
134
|
+
client_manager=client_manager,
|
135
|
+
)
|
136
|
+
log(
|
137
|
+
INFO,
|
138
|
+
"Starting Flower server, config: %s",
|
139
|
+
initialized_config,
|
140
|
+
)
|
141
|
+
|
142
|
+
# Start gRPC server
|
143
|
+
grpc_server = start_grpc_server(
|
144
|
+
client_manager=initialized_server.client_manager(),
|
145
|
+
server_address=address,
|
146
|
+
max_message_length=grpc_max_message_length,
|
147
|
+
certificates=certificates,
|
148
|
+
)
|
149
|
+
log(
|
150
|
+
INFO,
|
151
|
+
"Flower ECE: gRPC server running (%s rounds), SSL is %s",
|
152
|
+
initialized_config.num_rounds,
|
153
|
+
"enabled" if certificates is not None else "disabled",
|
154
|
+
)
|
155
|
+
|
156
|
+
# Graceful shutdown
|
157
|
+
register_exit_handlers(
|
158
|
+
event_type=EventType.START_SERVER_LEAVE,
|
159
|
+
exit_message="Flower server terminated gracefully.",
|
160
|
+
grpc_servers=[grpc_server],
|
161
|
+
)
|
162
|
+
|
163
|
+
# Start training
|
164
|
+
hist = run_fl(
|
165
|
+
server=initialized_server,
|
166
|
+
config=initialized_config,
|
167
|
+
)
|
168
|
+
|
169
|
+
# Stop the gRPC server
|
170
|
+
grpc_server.stop(grace=1)
|
171
|
+
|
172
|
+
event(EventType.START_SERVER_LEAVE)
|
173
|
+
|
174
|
+
return hist
|
flwr/proto/run_pb2.py
CHANGED
@@ -18,7 +18,7 @@ from flwr.proto import recorddict_pb2 as flwr_dot_proto_dot_recorddict__pb2
|
|
18
18
|
from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
|
19
19
|
|
20
20
|
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x1b\x66lwr/proto/recorddict.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xce\x02\n\x03Run\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x0e\n\x06\x66\x61\x62_id\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x03 \x01(\t\x12<\n\x0foverride_config\x18\x04 \x03(\x0b\x32#.flwr.proto.Run.OverrideConfigEntry\x12\x10\n\x08\x66\x61\x62_hash\x18\x05 \x01(\t\x12\x12\n\npending_at\x18\x06 \x01(\t\x12\x13\n\x0bstarting_at\x18\x07 \x01(\t\x12\x12\n\nrunning_at\x18\x08 \x01(\t\x12\x13\n\x0b\x66inished_at\x18\t \x01(\t\x12%\n\x06status\x18\n \x01(\x0b\x32\x15.flwr.proto.RunStatus\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\"@\n\tRunStatus\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nsub_status\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"
|
21
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/fab.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x1b\x66lwr/proto/recorddict.proto\x1a\x1a\x66lwr/proto/transport.proto\"\xce\x02\n\x03Run\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12\x0e\n\x06\x66\x61\x62_id\x18\x02 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x03 \x01(\t\x12<\n\x0foverride_config\x18\x04 \x03(\x0b\x32#.flwr.proto.Run.OverrideConfigEntry\x12\x10\n\x08\x66\x61\x62_hash\x18\x05 \x01(\t\x12\x12\n\npending_at\x18\x06 \x01(\t\x12\x13\n\x0bstarting_at\x18\x07 \x01(\t\x12\x12\n\nrunning_at\x18\x08 \x01(\t\x12\x13\n\x0b\x66inished_at\x18\t \x01(\t\x12%\n\x06status\x18\n \x01(\x0b\x32\x15.flwr.proto.RunStatus\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\"@\n\tRunStatus\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nsub_status\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x65tails\x18\x03 \x01(\t\"?\n\rGetRunRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\".\n\x0eGetRunResponse\x12\x1c\n\x03run\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Run\"S\n\x16UpdateRunStatusRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12)\n\nrun_status\x18\x02 \x01(\x0b\x32\x15.flwr.proto.RunStatus\"\x19\n\x17UpdateRunStatusResponse\"F\n\x13GetRunStatusRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x0f\n\x07run_ids\x18\x02 \x03(\x04\"\xb1\x01\n\x14GetRunStatusResponse\x12L\n\x0frun_status_dict\x18\x01 \x03(\x0b\x32\x33.flwr.proto.GetRunStatusResponse.RunStatusDictEntry\x1aK\n\x12RunStatusDictEntry\x12\x0b\n\x03key\x18\x01 \x01(\x04\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.flwr.proto.RunStatus:\x02\x38\x01\"-\n\x1bGetFederationOptionsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"T\n\x1cGetFederationOptionsResponse\x12\x34\n\x12\x66\x65\x64\x65ration_options\x18\x01 \x01(\x0b\x32\x18.flwr.proto.ConfigRecordb\x06proto3')
|
22
22
|
|
23
23
|
_globals = globals()
|
24
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -27,8 +27,6 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
27
|
DESCRIPTOR._options = None
|
28
28
|
_globals['_RUN_OVERRIDECONFIGENTRY']._options = None
|
29
29
|
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
30
|
-
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._options = None
|
31
|
-
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
32
30
|
_globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._options = None
|
33
31
|
_globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_options = b'8\001'
|
34
32
|
_globals['_RUN']._serialized_start=139
|
@@ -37,28 +35,22 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
37
35
|
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_end=473
|
38
36
|
_globals['_RUNSTATUS']._serialized_start=475
|
39
37
|
_globals['_RUNSTATUS']._serialized_end=539
|
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['
|
56
|
-
_globals['
|
57
|
-
_globals['
|
58
|
-
_globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_start=1216
|
59
|
-
_globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_end=1291
|
60
|
-
_globals['_GETFEDERATIONOPTIONSREQUEST']._serialized_start=1293
|
61
|
-
_globals['_GETFEDERATIONOPTIONSREQUEST']._serialized_end=1338
|
62
|
-
_globals['_GETFEDERATIONOPTIONSRESPONSE']._serialized_start=1340
|
63
|
-
_globals['_GETFEDERATIONOPTIONSRESPONSE']._serialized_end=1424
|
38
|
+
_globals['_GETRUNREQUEST']._serialized_start=541
|
39
|
+
_globals['_GETRUNREQUEST']._serialized_end=604
|
40
|
+
_globals['_GETRUNRESPONSE']._serialized_start=606
|
41
|
+
_globals['_GETRUNRESPONSE']._serialized_end=652
|
42
|
+
_globals['_UPDATERUNSTATUSREQUEST']._serialized_start=654
|
43
|
+
_globals['_UPDATERUNSTATUSREQUEST']._serialized_end=737
|
44
|
+
_globals['_UPDATERUNSTATUSRESPONSE']._serialized_start=739
|
45
|
+
_globals['_UPDATERUNSTATUSRESPONSE']._serialized_end=764
|
46
|
+
_globals['_GETRUNSTATUSREQUEST']._serialized_start=766
|
47
|
+
_globals['_GETRUNSTATUSREQUEST']._serialized_end=836
|
48
|
+
_globals['_GETRUNSTATUSRESPONSE']._serialized_start=839
|
49
|
+
_globals['_GETRUNSTATUSRESPONSE']._serialized_end=1016
|
50
|
+
_globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_start=941
|
51
|
+
_globals['_GETRUNSTATUSRESPONSE_RUNSTATUSDICTENTRY']._serialized_end=1016
|
52
|
+
_globals['_GETFEDERATIONOPTIONSREQUEST']._serialized_start=1018
|
53
|
+
_globals['_GETFEDERATIONOPTIONSREQUEST']._serialized_end=1063
|
54
|
+
_globals['_GETFEDERATIONOPTIONSRESPONSE']._serialized_start=1065
|
55
|
+
_globals['_GETFEDERATIONOPTIONSRESPONSE']._serialized_end=1149
|
64
56
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/run_pb2.pyi
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
isort:skip_file
|
4
4
|
"""
|
5
5
|
import builtins
|
6
|
-
import flwr.proto.fab_pb2
|
7
6
|
import flwr.proto.node_pb2
|
8
7
|
import flwr.proto.recorddict_pb2
|
9
8
|
import flwr.proto.transport_pb2
|
@@ -94,56 +93,6 @@ class RunStatus(google.protobuf.message.Message):
|
|
94
93
|
def ClearField(self, field_name: typing_extensions.Literal["details",b"details","status",b"status","sub_status",b"sub_status"]) -> None: ...
|
95
94
|
global___RunStatus = RunStatus
|
96
95
|
|
97
|
-
class CreateRunRequest(google.protobuf.message.Message):
|
98
|
-
"""CreateRun"""
|
99
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
100
|
-
class OverrideConfigEntry(google.protobuf.message.Message):
|
101
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
102
|
-
KEY_FIELD_NUMBER: builtins.int
|
103
|
-
VALUE_FIELD_NUMBER: builtins.int
|
104
|
-
key: typing.Text
|
105
|
-
@property
|
106
|
-
def value(self) -> flwr.proto.transport_pb2.Scalar: ...
|
107
|
-
def __init__(self,
|
108
|
-
*,
|
109
|
-
key: typing.Text = ...,
|
110
|
-
value: typing.Optional[flwr.proto.transport_pb2.Scalar] = ...,
|
111
|
-
) -> None: ...
|
112
|
-
def HasField(self, field_name: typing_extensions.Literal["value",b"value"]) -> builtins.bool: ...
|
113
|
-
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
114
|
-
|
115
|
-
FAB_ID_FIELD_NUMBER: builtins.int
|
116
|
-
FAB_VERSION_FIELD_NUMBER: builtins.int
|
117
|
-
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
118
|
-
FAB_FIELD_NUMBER: builtins.int
|
119
|
-
fab_id: typing.Text
|
120
|
-
fab_version: typing.Text
|
121
|
-
@property
|
122
|
-
def override_config(self) -> google.protobuf.internal.containers.MessageMap[typing.Text, flwr.proto.transport_pb2.Scalar]: ...
|
123
|
-
@property
|
124
|
-
def fab(self) -> flwr.proto.fab_pb2.Fab: ...
|
125
|
-
def __init__(self,
|
126
|
-
*,
|
127
|
-
fab_id: typing.Text = ...,
|
128
|
-
fab_version: typing.Text = ...,
|
129
|
-
override_config: typing.Optional[typing.Mapping[typing.Text, flwr.proto.transport_pb2.Scalar]] = ...,
|
130
|
-
fab: typing.Optional[flwr.proto.fab_pb2.Fab] = ...,
|
131
|
-
) -> None: ...
|
132
|
-
def HasField(self, field_name: typing_extensions.Literal["fab",b"fab"]) -> builtins.bool: ...
|
133
|
-
def ClearField(self, field_name: typing_extensions.Literal["fab",b"fab","fab_id",b"fab_id","fab_version",b"fab_version","override_config",b"override_config"]) -> None: ...
|
134
|
-
global___CreateRunRequest = CreateRunRequest
|
135
|
-
|
136
|
-
class CreateRunResponse(google.protobuf.message.Message):
|
137
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
138
|
-
RUN_ID_FIELD_NUMBER: builtins.int
|
139
|
-
run_id: builtins.int
|
140
|
-
def __init__(self,
|
141
|
-
*,
|
142
|
-
run_id: builtins.int = ...,
|
143
|
-
) -> None: ...
|
144
|
-
def ClearField(self, field_name: typing_extensions.Literal["run_id",b"run_id"]) -> None: ...
|
145
|
-
global___CreateRunResponse = CreateRunResponse
|
146
|
-
|
147
96
|
class GetRunRequest(google.protobuf.message.Message):
|
148
97
|
"""GetRun"""
|
149
98
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
flwr/proto/serverappio_pb2.py
CHANGED
@@ -20,7 +20,7 @@ from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
20
20
|
from flwr.proto import fab_pb2 as flwr_dot_proto_dot_fab__pb2
|
21
21
|
|
22
22
|
|
23
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/serverappio.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/heartbeat.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"T\n\x16PushInsMessagesRequest\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\".\n\x17PushInsMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\"=\n\x16PullResMessagesRequest\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\"E\n\x17PullResMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\"\x1c\n\x1aPullServerAppInputsRequest\"\x7f\n\x1bPullServerAppInputsResponse\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\"S\n\x1bPushServerAppOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1e\n\x1cPushServerAppOutputsResponse2\
|
23
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lwr/proto/serverappio.proto\x12\nflwr.proto\x1a\x1a\x66lwr/proto/heartbeat.proto\x1a\x14\x66lwr/proto/log.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x18\x66lwr/proto/message.proto\x1a\x14\x66lwr/proto/run.proto\x1a\x14\x66lwr/proto/fab.proto\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"T\n\x16PushInsMessagesRequest\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\".\n\x17PushInsMessagesResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\"=\n\x16PullResMessagesRequest\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\x12\x0e\n\x06run_id\x18\x02 \x01(\x04\"E\n\x17PullResMessagesResponse\x12*\n\rmessages_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.Message\"\x1c\n\x1aPullServerAppInputsRequest\"\x7f\n\x1bPullServerAppInputsResponse\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\"S\n\x1bPushServerAppOutputsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x04\x12$\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x13.flwr.proto.Context\"\x1e\n\x1cPushServerAppOutputsResponse2\xe4\x08\n\x0bServerAppIo\x12G\n\x08GetNodes\x12\x1b.flwr.proto.GetNodesRequest\x1a\x1c.flwr.proto.GetNodesResponse\"\x00\x12Y\n\x0cPushMessages\x12\".flwr.proto.PushInsMessagesRequest\x1a#.flwr.proto.PushInsMessagesResponse\"\x00\x12Y\n\x0cPullMessages\x12\".flwr.proto.PullResMessagesRequest\x1a#.flwr.proto.PullResMessagesResponse\"\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\x12h\n\x13PullServerAppInputs\x12&.flwr.proto.PullServerAppInputsRequest\x1a\'.flwr.proto.PullServerAppInputsResponse\"\x00\x12k\n\x14PushServerAppOutputs\x12\'.flwr.proto.PushServerAppOutputsRequest\x1a(.flwr.proto.PushServerAppOutputsResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x12G\n\x08PushLogs\x12\x1b.flwr.proto.PushLogsRequest\x1a\x1c.flwr.proto.PushLogsResponse\"\x00\x12_\n\x10SendAppHeartbeat\x12#.flwr.proto.SendAppHeartbeatRequest\x1a$.flwr.proto.SendAppHeartbeatResponse\"\x00\x12M\n\nPushObject\x12\x1d.flwr.proto.PushObjectRequest\x1a\x1e.flwr.proto.PushObjectResponse\"\x00\x12M\n\nPullObject\x12\x1d.flwr.proto.PullObjectRequest\x1a\x1e.flwr.proto.PullObjectResponse\"\x00\x62\x06proto3')
|
24
24
|
|
25
25
|
_globals = globals()
|
26
26
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -48,5 +48,5 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
48
48
|
_globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_start=787
|
49
49
|
_globals['_PUSHSERVERAPPOUTPUTSRESPONSE']._serialized_end=817
|
50
50
|
_globals['_SERVERAPPIO']._serialized_start=820
|
51
|
-
_globals['_SERVERAPPIO']._serialized_end=
|
51
|
+
_globals['_SERVERAPPIO']._serialized_end=1944
|
52
52
|
# @@protoc_insertion_point(module_scope)
|
@@ -19,11 +19,6 @@ class ServerAppIoStub(object):
|
|
19
19
|
Args:
|
20
20
|
channel: A grpc.Channel.
|
21
21
|
"""
|
22
|
-
self.CreateRun = channel.unary_unary(
|
23
|
-
'/flwr.proto.ServerAppIo/CreateRun',
|
24
|
-
request_serializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
|
25
|
-
response_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
|
26
|
-
)
|
27
22
|
self.GetNodes = channel.unary_unary(
|
28
23
|
'/flwr.proto.ServerAppIo/GetNodes',
|
29
24
|
request_serializer=flwr_dot_proto_dot_serverappio__pb2.GetNodesRequest.SerializeToString,
|
@@ -94,13 +89,6 @@ class ServerAppIoStub(object):
|
|
94
89
|
class ServerAppIoServicer(object):
|
95
90
|
"""Missing associated documentation comment in .proto file."""
|
96
91
|
|
97
|
-
def CreateRun(self, request, context):
|
98
|
-
"""Request run_id
|
99
|
-
"""
|
100
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
101
|
-
context.set_details('Method not implemented!')
|
102
|
-
raise NotImplementedError('Method not implemented!')
|
103
|
-
|
104
92
|
def GetNodes(self, request, context):
|
105
93
|
"""Return a set of nodes
|
106
94
|
"""
|
@@ -195,11 +183,6 @@ class ServerAppIoServicer(object):
|
|
195
183
|
|
196
184
|
def add_ServerAppIoServicer_to_server(servicer, server):
|
197
185
|
rpc_method_handlers = {
|
198
|
-
'CreateRun': grpc.unary_unary_rpc_method_handler(
|
199
|
-
servicer.CreateRun,
|
200
|
-
request_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.FromString,
|
201
|
-
response_serializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.SerializeToString,
|
202
|
-
),
|
203
186
|
'GetNodes': grpc.unary_unary_rpc_method_handler(
|
204
187
|
servicer.GetNodes,
|
205
188
|
request_deserializer=flwr_dot_proto_dot_serverappio__pb2.GetNodesRequest.FromString,
|
@@ -275,23 +258,6 @@ def add_ServerAppIoServicer_to_server(servicer, server):
|
|
275
258
|
class ServerAppIo(object):
|
276
259
|
"""Missing associated documentation comment in .proto file."""
|
277
260
|
|
278
|
-
@staticmethod
|
279
|
-
def CreateRun(request,
|
280
|
-
target,
|
281
|
-
options=(),
|
282
|
-
channel_credentials=None,
|
283
|
-
call_credentials=None,
|
284
|
-
insecure=False,
|
285
|
-
compression=None,
|
286
|
-
wait_for_ready=None,
|
287
|
-
timeout=None,
|
288
|
-
metadata=None):
|
289
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.ServerAppIo/CreateRun',
|
290
|
-
flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
|
291
|
-
flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
|
292
|
-
options, channel_credentials,
|
293
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
294
|
-
|
295
261
|
@staticmethod
|
296
262
|
def GetNodes(request,
|
297
263
|
target,
|
@@ -13,11 +13,6 @@ import grpc
|
|
13
13
|
|
14
14
|
class ServerAppIoStub:
|
15
15
|
def __init__(self, channel: grpc.Channel) -> None: ...
|
16
|
-
CreateRun: grpc.UnaryUnaryMultiCallable[
|
17
|
-
flwr.proto.run_pb2.CreateRunRequest,
|
18
|
-
flwr.proto.run_pb2.CreateRunResponse]
|
19
|
-
"""Request run_id"""
|
20
|
-
|
21
16
|
GetNodes: grpc.UnaryUnaryMultiCallable[
|
22
17
|
flwr.proto.serverappio_pb2.GetNodesRequest,
|
23
18
|
flwr.proto.serverappio_pb2.GetNodesResponse]
|
@@ -85,14 +80,6 @@ class ServerAppIoStub:
|
|
85
80
|
|
86
81
|
|
87
82
|
class ServerAppIoServicer(metaclass=abc.ABCMeta):
|
88
|
-
@abc.abstractmethod
|
89
|
-
def CreateRun(self,
|
90
|
-
request: flwr.proto.run_pb2.CreateRunRequest,
|
91
|
-
context: grpc.ServicerContext,
|
92
|
-
) -> flwr.proto.run_pb2.CreateRunResponse:
|
93
|
-
"""Request run_id"""
|
94
|
-
pass
|
95
|
-
|
96
83
|
@abc.abstractmethod
|
97
84
|
def GetNodes(self,
|
98
85
|
request: flwr.proto.serverappio_pb2.GetNodesRequest,
|
flwr/server/__init__.py
CHANGED
@@ -15,9 +15,9 @@
|
|
15
15
|
"""Flower server."""
|
16
16
|
|
17
17
|
|
18
|
+
from ..compat.server.app import start_server as start_server # Deprecated
|
18
19
|
from . import strategy
|
19
20
|
from . import workflow as workflow
|
20
|
-
from .app import start_server as start_server
|
21
21
|
from .client_manager import ClientManager as ClientManager
|
22
22
|
from .client_manager import SimpleClientManager as SimpleClientManager
|
23
23
|
from .compat import LegacyContext as LegacyContext
|
flwr/server/app.py
CHANGED
@@ -43,7 +43,6 @@ from flwr.common.constant import (
|
|
43
43
|
AUTH_TYPE_YAML_KEY,
|
44
44
|
CLIENT_OCTET,
|
45
45
|
EXEC_API_DEFAULT_SERVER_ADDRESS,
|
46
|
-
FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS,
|
47
46
|
FLEET_API_GRPC_RERE_DEFAULT_ADDRESS,
|
48
47
|
FLEET_API_REST_DEFAULT_ADDRESS,
|
49
48
|
ISOLATION_MODE_PROCESS,
|
@@ -60,7 +59,7 @@ from flwr.common.event_log_plugin import EventLogWriterPlugin
|
|
60
59
|
from flwr.common.exit import ExitCode, flwr_exit
|
61
60
|
from flwr.common.exit_handlers import register_exit_handlers
|
62
61
|
from flwr.common.grpc import generic_create_grpc_server
|
63
|
-
from flwr.common.logger import log
|
62
|
+
from flwr.common.logger import log
|
64
63
|
from flwr.common.secure_aggregation.crypto.symmetric_encryption import (
|
65
64
|
public_key_to_bytes,
|
66
65
|
)
|
@@ -75,14 +74,8 @@ from flwr.supercore.object_store import ObjectStoreFactory
|
|
75
74
|
from flwr.superexec.app import load_executor
|
76
75
|
from flwr.superexec.exec_grpc import run_exec_api_grpc
|
77
76
|
|
78
|
-
from .client_manager import ClientManager
|
79
|
-
from .history import History
|
80
|
-
from .server import Server, init_defaults, run_fl
|
81
|
-
from .server_config import ServerConfig
|
82
|
-
from .strategy import Strategy
|
83
77
|
from .superlink.ffs.ffs_factory import FfsFactory
|
84
78
|
from .superlink.fleet.grpc_adapter.grpc_adapter_servicer import GrpcAdapterServicer
|
85
|
-
from .superlink.fleet.grpc_bidi.grpc_server import start_grpc_server
|
86
79
|
from .superlink.fleet.grpc_rere.fleet_servicer import FleetServicer
|
87
80
|
from .superlink.fleet.grpc_rere.server_interceptor import AuthenticateServerInterceptor
|
88
81
|
from .superlink.linkstate import LinkStateFactory
|
@@ -124,148 +117,6 @@ except ImportError:
|
|
124
117
|
)
|
125
118
|
|
126
119
|
|
127
|
-
def start_server( # pylint: disable=too-many-arguments,too-many-locals
|
128
|
-
*,
|
129
|
-
server_address: str = FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS,
|
130
|
-
server: Optional[Server] = None,
|
131
|
-
config: Optional[ServerConfig] = None,
|
132
|
-
strategy: Optional[Strategy] = None,
|
133
|
-
client_manager: Optional[ClientManager] = None,
|
134
|
-
grpc_max_message_length: int = GRPC_MAX_MESSAGE_LENGTH,
|
135
|
-
certificates: Optional[tuple[bytes, bytes, bytes]] = None,
|
136
|
-
) -> History:
|
137
|
-
"""Start a Flower server using the gRPC transport layer.
|
138
|
-
|
139
|
-
Warning
|
140
|
-
-------
|
141
|
-
This function is deprecated since 1.13.0. Use the :code:`flower-superlink` command
|
142
|
-
instead to start a SuperLink.
|
143
|
-
|
144
|
-
Parameters
|
145
|
-
----------
|
146
|
-
server_address : Optional[str]
|
147
|
-
The IPv4 or IPv6 address of the server. Defaults to `"[::]:8080"`.
|
148
|
-
server : Optional[flwr.server.Server] (default: None)
|
149
|
-
A server implementation, either `flwr.server.Server` or a subclass
|
150
|
-
thereof. If no instance is provided, then `start_server` will create
|
151
|
-
one.
|
152
|
-
config : Optional[ServerConfig] (default: None)
|
153
|
-
Currently supported values are `num_rounds` (int, default: 1) and
|
154
|
-
`round_timeout` in seconds (float, default: None).
|
155
|
-
strategy : Optional[flwr.server.Strategy] (default: None).
|
156
|
-
An implementation of the abstract base class
|
157
|
-
`flwr.server.strategy.Strategy`. If no strategy is provided, then
|
158
|
-
`start_server` will use `flwr.server.strategy.FedAvg`.
|
159
|
-
client_manager : Optional[flwr.server.ClientManager] (default: None)
|
160
|
-
An implementation of the abstract base class
|
161
|
-
`flwr.server.ClientManager`. If no implementation is provided, then
|
162
|
-
`start_server` will use
|
163
|
-
`flwr.server.client_manager.SimpleClientManager`.
|
164
|
-
grpc_max_message_length : int (default: 536_870_912, this equals 512MB)
|
165
|
-
The maximum length of gRPC messages that can be exchanged with the
|
166
|
-
Flower clients. The default should be sufficient for most models.
|
167
|
-
Users who train very large models might need to increase this
|
168
|
-
value. Note that the Flower clients need to be started with the
|
169
|
-
same value (see `flwr.client.start_client`), otherwise clients will
|
170
|
-
not know about the increased limit and block larger messages.
|
171
|
-
certificates : Tuple[bytes, bytes, bytes] (default: None)
|
172
|
-
Tuple containing root certificate, server certificate, and private key
|
173
|
-
to start a secure SSL-enabled server. The tuple is expected to have
|
174
|
-
three bytes elements in the following order:
|
175
|
-
|
176
|
-
* CA certificate.
|
177
|
-
* server certificate.
|
178
|
-
* server private key.
|
179
|
-
|
180
|
-
Returns
|
181
|
-
-------
|
182
|
-
hist : flwr.server.history.History
|
183
|
-
Object containing training and evaluation metrics.
|
184
|
-
|
185
|
-
Examples
|
186
|
-
--------
|
187
|
-
Starting an insecure server::
|
188
|
-
|
189
|
-
start_server()
|
190
|
-
|
191
|
-
Starting a TLS-enabled server::
|
192
|
-
|
193
|
-
start_server(
|
194
|
-
certificates=(
|
195
|
-
Path("/crts/root.pem").read_bytes(),
|
196
|
-
Path("/crts/localhost.crt").read_bytes(),
|
197
|
-
Path("/crts/localhost.key").read_bytes()
|
198
|
-
)
|
199
|
-
)
|
200
|
-
"""
|
201
|
-
msg = (
|
202
|
-
"flwr.server.start_server() is deprecated."
|
203
|
-
"\n\tInstead, use the `flower-superlink` CLI command to start a SuperLink "
|
204
|
-
"as shown below:"
|
205
|
-
"\n\n\t\t$ flower-superlink --insecure"
|
206
|
-
"\n\n\tTo view usage and all available options, run:"
|
207
|
-
"\n\n\t\t$ flower-superlink --help"
|
208
|
-
"\n\n\tUsing `start_server()` is deprecated."
|
209
|
-
)
|
210
|
-
warn_deprecated_feature(name=msg)
|
211
|
-
|
212
|
-
event(EventType.START_SERVER_ENTER)
|
213
|
-
|
214
|
-
# Parse IP address
|
215
|
-
parsed_address = parse_address(server_address)
|
216
|
-
if not parsed_address:
|
217
|
-
sys.exit(f"Server IP address ({server_address}) cannot be parsed.")
|
218
|
-
host, port, is_v6 = parsed_address
|
219
|
-
address = f"[{host}]:{port}" if is_v6 else f"{host}:{port}"
|
220
|
-
|
221
|
-
# Initialize server and server config
|
222
|
-
initialized_server, initialized_config = init_defaults(
|
223
|
-
server=server,
|
224
|
-
config=config,
|
225
|
-
strategy=strategy,
|
226
|
-
client_manager=client_manager,
|
227
|
-
)
|
228
|
-
log(
|
229
|
-
INFO,
|
230
|
-
"Starting Flower server, config: %s",
|
231
|
-
initialized_config,
|
232
|
-
)
|
233
|
-
|
234
|
-
# Start gRPC server
|
235
|
-
grpc_server = start_grpc_server(
|
236
|
-
client_manager=initialized_server.client_manager(),
|
237
|
-
server_address=address,
|
238
|
-
max_message_length=grpc_max_message_length,
|
239
|
-
certificates=certificates,
|
240
|
-
)
|
241
|
-
log(
|
242
|
-
INFO,
|
243
|
-
"Flower ECE: gRPC server running (%s rounds), SSL is %s",
|
244
|
-
initialized_config.num_rounds,
|
245
|
-
"enabled" if certificates is not None else "disabled",
|
246
|
-
)
|
247
|
-
|
248
|
-
# Graceful shutdown
|
249
|
-
register_exit_handlers(
|
250
|
-
event_type=EventType.START_SERVER_LEAVE,
|
251
|
-
exit_message="Flower server terminated gracefully.",
|
252
|
-
grpc_servers=[grpc_server],
|
253
|
-
)
|
254
|
-
|
255
|
-
# Start training
|
256
|
-
hist = run_fl(
|
257
|
-
server=initialized_server,
|
258
|
-
config=initialized_config,
|
259
|
-
)
|
260
|
-
|
261
|
-
# Stop the gRPC server
|
262
|
-
grpc_server.stop(grace=1)
|
263
|
-
|
264
|
-
event(EventType.START_SERVER_LEAVE)
|
265
|
-
|
266
|
-
return hist
|
267
|
-
|
268
|
-
|
269
120
|
# pylint: disable=too-many-branches, too-many-locals, too-many-statements
|
270
121
|
def run_superlink() -> None:
|
271
122
|
"""Run Flower SuperLink (ServerAppIo API and Fleet API)."""
|
@@ -22,21 +22,19 @@ from uuid import UUID
|
|
22
22
|
|
23
23
|
import grpc
|
24
24
|
|
25
|
-
from flwr.common import
|
25
|
+
from flwr.common import Message
|
26
26
|
from flwr.common.constant import SUPERLINK_NODE_ID, Status
|
27
27
|
from flwr.common.inflatable import check_body_len_consistency
|
28
28
|
from flwr.common.logger import log
|
29
29
|
from flwr.common.serde import (
|
30
30
|
context_from_proto,
|
31
31
|
context_to_proto,
|
32
|
-
fab_from_proto,
|
33
32
|
fab_to_proto,
|
34
33
|
message_from_proto,
|
35
34
|
message_to_proto,
|
36
35
|
run_status_from_proto,
|
37
36
|
run_status_to_proto,
|
38
37
|
run_to_proto,
|
39
|
-
user_config_from_proto,
|
40
38
|
)
|
41
39
|
from flwr.common.typing import Fab, RunStatus
|
42
40
|
from flwr.proto import serverappio_pb2_grpc # pylint: disable=E0611
|
@@ -57,8 +55,6 @@ from flwr.proto.message_pb2 import ( # pylint: disable=E0611
|
|
57
55
|
)
|
58
56
|
from flwr.proto.node_pb2 import Node # pylint: disable=E0611
|
59
57
|
from flwr.proto.run_pb2 import ( # pylint: disable=E0611
|
60
|
-
CreateRunRequest,
|
61
|
-
CreateRunResponse,
|
62
58
|
GetRunRequest,
|
63
59
|
GetRunResponse,
|
64
60
|
GetRunStatusRequest,
|
@@ -121,32 +117,6 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
|
|
121
117
|
nodes: list[Node] = [Node(node_id=node_id) for node_id in all_ids]
|
122
118
|
return GetNodesResponse(nodes=nodes)
|
123
119
|
|
124
|
-
def CreateRun(
|
125
|
-
self, request: CreateRunRequest, context: grpc.ServicerContext
|
126
|
-
) -> CreateRunResponse:
|
127
|
-
"""Create run ID."""
|
128
|
-
log(DEBUG, "ServerAppIoServicer.CreateRun")
|
129
|
-
state: LinkState = self.state_factory.state()
|
130
|
-
if request.HasField("fab"):
|
131
|
-
fab = fab_from_proto(request.fab)
|
132
|
-
ffs: Ffs = self.ffs_factory.ffs()
|
133
|
-
fab_hash = ffs.put(fab.content, {})
|
134
|
-
_raise_if(
|
135
|
-
validation_error=fab_hash != fab.hash_str,
|
136
|
-
request_name="CreateRun",
|
137
|
-
detail=f"FAB ({fab.hash_str}) hash from request doesn't match contents",
|
138
|
-
)
|
139
|
-
else:
|
140
|
-
fab_hash = ""
|
141
|
-
run_id = state.create_run(
|
142
|
-
request.fab_id,
|
143
|
-
request.fab_version,
|
144
|
-
fab_hash,
|
145
|
-
user_config_from_proto(request.override_config),
|
146
|
-
ConfigRecord(),
|
147
|
-
)
|
148
|
-
return CreateRunResponse(run_id=run_id)
|
149
|
-
|
150
120
|
def PushMessages(
|
151
121
|
self, request: PushInsMessagesRequest, context: grpc.ServicerContext
|
152
122
|
) -> PushInsMessagesResponse:
|
@@ -12,11 +12,9 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
|
-
"""Flower SuperNode."""
|
15
|
+
"""Flower command line interface for SuperNode."""
|
16
16
|
|
17
17
|
|
18
|
-
from .
|
18
|
+
from .flower_supernode import flower_supernode
|
19
19
|
|
20
|
-
__all__ = [
|
21
|
-
"run_supernode",
|
22
|
-
]
|
20
|
+
__all__ = ["flower_supernode"]
|
@@ -12,7 +12,7 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
|
-
"""
|
15
|
+
"""`flower-supernode` command."""
|
16
16
|
|
17
17
|
|
18
18
|
import argparse
|
@@ -46,7 +46,7 @@ from flwr.common.logger import log
|
|
46
46
|
from ..start_client_internal import start_client_internal
|
47
47
|
|
48
48
|
|
49
|
-
def
|
49
|
+
def flower_supernode() -> None:
|
50
50
|
"""Run Flower SuperNode."""
|
51
51
|
args = _parse_args_run_supernode().parse_args()
|
52
52
|
|
@@ -20,8 +20,9 @@ import os
|
|
20
20
|
import sys
|
21
21
|
import threading
|
22
22
|
import time
|
23
|
-
from
|
24
|
-
from
|
23
|
+
from collections.abc import Iterator
|
24
|
+
from contextlib import contextmanager
|
25
|
+
from logging import INFO, WARN
|
25
26
|
from os import urandom
|
26
27
|
from pathlib import Path
|
27
28
|
from typing import Callable, Optional, Union
|
@@ -74,7 +75,6 @@ def start_client_internal(
|
|
74
75
|
*,
|
75
76
|
server_address: str,
|
76
77
|
node_config: UserConfig,
|
77
|
-
grpc_max_message_length: int = GRPC_MAX_MESSAGE_LENGTH,
|
78
78
|
root_certificates: Optional[Union[bytes, str]] = None,
|
79
79
|
insecure: Optional[bool] = None,
|
80
80
|
transport: str,
|
@@ -97,13 +97,6 @@ def start_client_internal(
|
|
97
97
|
would be `"[::]:8080"`.
|
98
98
|
node_config: UserConfig
|
99
99
|
The configuration of the node.
|
100
|
-
grpc_max_message_length : int (default: 536_870_912, this equals 512MB)
|
101
|
-
The maximum length of gRPC messages that can be exchanged with the
|
102
|
-
Flower server. The default should be sufficient for most models.
|
103
|
-
Users who train very large models might need to increase this
|
104
|
-
value. Note that the Flower server needs to be started with the
|
105
|
-
same value (see `flwr.server.start_server`), otherwise it will not
|
106
|
-
know about the increased limit and block larger messages.
|
107
100
|
root_certificates : Optional[Union[bytes, str]] (default: None)
|
108
101
|
The PEM-encoded root certificates as a byte string or a path string.
|
109
102
|
If provided, a secure connection using the certificates will be
|
@@ -150,49 +143,6 @@ def start_client_internal(
|
|
150
143
|
certificates=None,
|
151
144
|
)
|
152
145
|
|
153
|
-
# Initialize connection context manager
|
154
|
-
connection, address, connection_error_type = _init_connection(
|
155
|
-
transport, server_address
|
156
|
-
)
|
157
|
-
|
158
|
-
def _on_sucess(retry_state: RetryState) -> None:
|
159
|
-
if retry_state.tries > 1:
|
160
|
-
log(
|
161
|
-
INFO,
|
162
|
-
"Connection successful after %.2f seconds and %s tries.",
|
163
|
-
retry_state.elapsed_time,
|
164
|
-
retry_state.tries,
|
165
|
-
)
|
166
|
-
|
167
|
-
def _on_backoff(retry_state: RetryState) -> None:
|
168
|
-
if retry_state.tries == 1:
|
169
|
-
log(WARN, "Connection attempt failed, retrying...")
|
170
|
-
else:
|
171
|
-
log(
|
172
|
-
WARN,
|
173
|
-
"Connection attempt failed, retrying in %.2f seconds",
|
174
|
-
retry_state.actual_wait,
|
175
|
-
)
|
176
|
-
|
177
|
-
retry_invoker = RetryInvoker(
|
178
|
-
wait_gen_factory=lambda: exponential(max_delay=MAX_RETRY_DELAY),
|
179
|
-
recoverable_exceptions=connection_error_type,
|
180
|
-
max_tries=max_retries + 1 if max_retries is not None else None,
|
181
|
-
max_time=max_wait_time,
|
182
|
-
on_giveup=lambda retry_state: (
|
183
|
-
log(
|
184
|
-
WARN,
|
185
|
-
"Giving up reconnection after %.2f seconds and %s tries.",
|
186
|
-
retry_state.elapsed_time,
|
187
|
-
retry_state.tries,
|
188
|
-
)
|
189
|
-
if retry_state.tries > 1
|
190
|
-
else None
|
191
|
-
),
|
192
|
-
on_success=_on_sucess,
|
193
|
-
on_backoff=_on_backoff,
|
194
|
-
)
|
195
|
-
|
196
146
|
# DeprecatedRunInfoStore gets initialized when the first connection is established
|
197
147
|
run_info_store: Optional[DeprecatedRunInfoStore] = None
|
198
148
|
state_factory = NodeStateFactory()
|
@@ -203,13 +153,14 @@ def start_client_internal(
|
|
203
153
|
|
204
154
|
while True:
|
205
155
|
sleep_duration: int = 0
|
206
|
-
with
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
156
|
+
with _init_connection(
|
157
|
+
transport=transport,
|
158
|
+
server_address=server_address,
|
159
|
+
insecure=insecure,
|
160
|
+
root_certificates=root_certificates,
|
161
|
+
authentication_keys=authentication_keys,
|
162
|
+
max_retries=max_retries,
|
163
|
+
max_wait_time=max_wait_time,
|
213
164
|
) as conn:
|
214
165
|
receive, send, create_node, delete_node, get_run, get_fab = conn
|
215
166
|
|
@@ -287,88 +238,68 @@ def start_client_internal(
|
|
287
238
|
reply_to=message,
|
288
239
|
)
|
289
240
|
|
290
|
-
#
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
# (via `flwr-clientapp`), for example, in a separate
|
297
|
-
# Docker container.
|
298
|
-
|
299
|
-
# Generate SuperNode token
|
300
|
-
token = int.from_bytes(urandom(RUN_ID_NUM_BYTES), "little")
|
301
|
-
|
302
|
-
# Mode 1: SuperNode starts ClientApp as subprocess
|
303
|
-
start_subprocess = isolation == ISOLATION_MODE_SUBPROCESS
|
304
|
-
|
305
|
-
# Share Message and Context with servicer
|
306
|
-
clientappio_servicer.set_inputs(
|
307
|
-
clientapp_input=ClientAppInputs(
|
308
|
-
message=message,
|
309
|
-
context=context,
|
310
|
-
run=run,
|
311
|
-
fab=fab,
|
312
|
-
token=token,
|
313
|
-
),
|
314
|
-
token_returned=start_subprocess,
|
315
|
-
)
|
241
|
+
# Two isolation modes:
|
242
|
+
# 1. `subprocess`: SuperNode is starting the ClientApp
|
243
|
+
# process as a subprocess.
|
244
|
+
# 2. `process`: ClientApp process gets started separately
|
245
|
+
# (via `flwr-clientapp`), for example, in a separate
|
246
|
+
# Docker container.
|
316
247
|
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
command = [
|
328
|
-
"flwr-clientapp",
|
329
|
-
"--clientappio-api-address",
|
330
|
-
io_address,
|
331
|
-
"--token",
|
332
|
-
str(token),
|
333
|
-
]
|
334
|
-
command.append("--insecure")
|
335
|
-
|
336
|
-
proc = mp_spawn_context.Process(
|
337
|
-
target=_run_flwr_clientapp,
|
338
|
-
args=(command, os.getpid()),
|
339
|
-
daemon=True,
|
340
|
-
)
|
341
|
-
proc.start()
|
342
|
-
proc.join()
|
343
|
-
else:
|
344
|
-
# Wait for output to become available
|
345
|
-
while not clientappio_servicer.has_outputs():
|
346
|
-
time.sleep(0.1)
|
347
|
-
|
348
|
-
outputs = clientappio_servicer.get_outputs()
|
349
|
-
reply_message, context = outputs.message, outputs.context
|
350
|
-
except Exception as ex: # pylint: disable=broad-exception-caught
|
351
|
-
|
352
|
-
# Don't update/change DeprecatedRunInfoStore
|
353
|
-
|
354
|
-
e_code = ErrorCode.CLIENT_APP_RAISED_EXCEPTION
|
355
|
-
# Ex fmt: "<class 'ZeroDivisionError'>:<'division by zero'>"
|
356
|
-
reason = str(type(ex)) + ":<'" + str(ex) + "'>"
|
357
|
-
exc_entity = "ClientApp"
|
358
|
-
|
359
|
-
log(ERROR, "%s raised an exception", exc_entity, exc_info=ex)
|
360
|
-
|
361
|
-
# Create error message
|
362
|
-
reply_message = Message(
|
363
|
-
Error(code=e_code, reason=reason),
|
364
|
-
reply_to=message,
|
365
|
-
)
|
366
|
-
else:
|
367
|
-
# No exception, update node state
|
368
|
-
run_info_store.update_context(
|
369
|
-
run_id=run_id,
|
248
|
+
# Generate SuperNode token
|
249
|
+
token = int.from_bytes(urandom(RUN_ID_NUM_BYTES), "little")
|
250
|
+
|
251
|
+
# Mode 1: SuperNode starts ClientApp as subprocess
|
252
|
+
start_subprocess = isolation == ISOLATION_MODE_SUBPROCESS
|
253
|
+
|
254
|
+
# Share Message and Context with servicer
|
255
|
+
clientappio_servicer.set_inputs(
|
256
|
+
clientapp_input=ClientAppInputs(
|
257
|
+
message=message,
|
370
258
|
context=context,
|
259
|
+
run=run,
|
260
|
+
fab=fab,
|
261
|
+
token=token,
|
262
|
+
),
|
263
|
+
token_returned=start_subprocess,
|
264
|
+
)
|
265
|
+
|
266
|
+
if start_subprocess:
|
267
|
+
_octet, _colon, _port = clientappio_api_address.rpartition(":")
|
268
|
+
io_address = (
|
269
|
+
f"{CLIENT_OCTET}:{_port}"
|
270
|
+
if _octet == SERVER_OCTET
|
271
|
+
else clientappio_api_address
|
371
272
|
)
|
273
|
+
# Start ClientApp subprocess
|
274
|
+
command = [
|
275
|
+
"flwr-clientapp",
|
276
|
+
"--clientappio-api-address",
|
277
|
+
io_address,
|
278
|
+
"--token",
|
279
|
+
str(token),
|
280
|
+
]
|
281
|
+
command.append("--insecure")
|
282
|
+
|
283
|
+
proc = mp_spawn_context.Process(
|
284
|
+
target=_run_flwr_clientapp,
|
285
|
+
args=(command, os.getpid()),
|
286
|
+
daemon=True,
|
287
|
+
)
|
288
|
+
proc.start()
|
289
|
+
proc.join()
|
290
|
+
else:
|
291
|
+
# Wait for output to become available
|
292
|
+
while not clientappio_servicer.has_outputs():
|
293
|
+
time.sleep(0.1)
|
294
|
+
|
295
|
+
outputs = clientappio_servicer.get_outputs()
|
296
|
+
reply_message, context = outputs.message, outputs.context
|
297
|
+
|
298
|
+
# Update node state
|
299
|
+
run_info_store.update_context(
|
300
|
+
run_id=run_id,
|
301
|
+
context=context,
|
302
|
+
)
|
372
303
|
|
373
304
|
# Send
|
374
305
|
send(reply_message)
|
@@ -402,30 +333,28 @@ def start_client_internal(
|
|
402
333
|
time.sleep(sleep_duration)
|
403
334
|
|
404
335
|
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
],
|
426
|
-
str,
|
427
|
-
type[Exception],
|
336
|
+
@contextmanager
|
337
|
+
def _init_connection( # pylint: disable=too-many-positional-arguments
|
338
|
+
transport: str,
|
339
|
+
server_address: str,
|
340
|
+
insecure: bool,
|
341
|
+
root_certificates: Optional[Union[bytes, str]] = None,
|
342
|
+
authentication_keys: Optional[
|
343
|
+
tuple[ec.EllipticCurvePrivateKey, ec.EllipticCurvePublicKey]
|
344
|
+
] = None,
|
345
|
+
max_retries: Optional[int] = None,
|
346
|
+
max_wait_time: Optional[float] = None,
|
347
|
+
) -> Iterator[
|
348
|
+
tuple[
|
349
|
+
Callable[[], Optional[Message]],
|
350
|
+
Callable[[Message], None],
|
351
|
+
Callable[[], Optional[int]],
|
352
|
+
Callable[[], None],
|
353
|
+
Callable[[int], Run],
|
354
|
+
Callable[[str, int], Fab],
|
355
|
+
]
|
428
356
|
]:
|
357
|
+
"""Establish a connection to the Fleet API server at SuperLink."""
|
429
358
|
# Parse IP address
|
430
359
|
parsed_address = parse_address(server_address)
|
431
360
|
if not parsed_address:
|
@@ -456,7 +385,69 @@ def _init_connection(transport: str, server_address: str) -> tuple[
|
|
456
385
|
f"Unknown transport type: {transport} (possible: {TRANSPORT_TYPES})"
|
457
386
|
)
|
458
387
|
|
459
|
-
|
388
|
+
# Create RetryInvoker
|
389
|
+
retry_invoker = _make_fleet_connection_retry_invoker(
|
390
|
+
max_retries=max_retries,
|
391
|
+
max_wait_time=max_wait_time,
|
392
|
+
connection_error_type=error_type,
|
393
|
+
)
|
394
|
+
|
395
|
+
# Establish connection
|
396
|
+
with connection(
|
397
|
+
address,
|
398
|
+
insecure,
|
399
|
+
retry_invoker,
|
400
|
+
GRPC_MAX_MESSAGE_LENGTH,
|
401
|
+
root_certificates,
|
402
|
+
authentication_keys,
|
403
|
+
) as conn:
|
404
|
+
yield conn
|
405
|
+
|
406
|
+
|
407
|
+
def _make_fleet_connection_retry_invoker(
|
408
|
+
max_retries: Optional[int] = None,
|
409
|
+
max_wait_time: Optional[float] = None,
|
410
|
+
connection_error_type: type[Exception] = RpcError,
|
411
|
+
) -> RetryInvoker:
|
412
|
+
"""Create a retry invoker for fleet connection."""
|
413
|
+
|
414
|
+
def _on_success(retry_state: RetryState) -> None:
|
415
|
+
if retry_state.tries > 1:
|
416
|
+
log(
|
417
|
+
INFO,
|
418
|
+
"Connection successful after %.2f seconds and %s tries.",
|
419
|
+
retry_state.elapsed_time,
|
420
|
+
retry_state.tries,
|
421
|
+
)
|
422
|
+
|
423
|
+
def _on_backoff(retry_state: RetryState) -> None:
|
424
|
+
if retry_state.tries == 1:
|
425
|
+
log(WARN, "Connection attempt failed, retrying...")
|
426
|
+
else:
|
427
|
+
log(
|
428
|
+
WARN,
|
429
|
+
"Connection attempt failed, retrying in %.2f seconds",
|
430
|
+
retry_state.actual_wait,
|
431
|
+
)
|
432
|
+
|
433
|
+
return RetryInvoker(
|
434
|
+
wait_gen_factory=lambda: exponential(max_delay=MAX_RETRY_DELAY),
|
435
|
+
recoverable_exceptions=connection_error_type,
|
436
|
+
max_tries=max_retries + 1 if max_retries is not None else None,
|
437
|
+
max_time=max_wait_time,
|
438
|
+
on_giveup=lambda retry_state: (
|
439
|
+
log(
|
440
|
+
WARN,
|
441
|
+
"Giving up reconnection after %.2f seconds and %s tries.",
|
442
|
+
retry_state.elapsed_time,
|
443
|
+
retry_state.tries,
|
444
|
+
)
|
445
|
+
if retry_state.tries > 1
|
446
|
+
else None
|
447
|
+
),
|
448
|
+
on_success=_on_success,
|
449
|
+
on_backoff=_on_backoff,
|
450
|
+
)
|
460
451
|
|
461
452
|
|
462
453
|
def _run_flwr_clientapp(args: list[str], main_pid: int) -> None:
|
{flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: flwr-nightly
|
3
|
-
Version: 1.19.0.
|
3
|
+
Version: 1.19.0.dev20250524
|
4
4
|
Summary: Flower: A Friendly Federated AI Framework
|
5
5
|
License: Apache-2.0
|
6
6
|
Keywords: Artificial Intelligence,Federated AI,Federated Analytics,Federated Evaluation,Federated Learning,Flower,Machine Learning
|
{flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/RECORD
RENAMED
@@ -102,9 +102,6 @@ flwr/client/numpy_client.py,sha256=Qq6ghsIAop2slKqAfgiI5NiHJ4LIxGmrik3Ror4_XVc,9
|
|
102
102
|
flwr/client/rest_client/__init__.py,sha256=MBiuK62hj439m9rtwSwI184Hth6Tt5GbmpNMyl3zkZY,735
|
103
103
|
flwr/client/rest_client/connection.py,sha256=6yBh2Eeso0XLtinAs2kOHkSnge7C-co_a_QfBaAEudU,12766
|
104
104
|
flwr/client/run_info_store.py,sha256=MaJ3UQ-07hWtK67wnWu0zR29jrk0fsfgJX506dvEOfE,4042
|
105
|
-
flwr/client/start_client_internal.py,sha256=-FOBQE65a-ZsuTUiW8WcZoBZt9q_b3ee-JK5-H8ivME,19850
|
106
|
-
flwr/client/supernode/__init__.py,sha256=i3gFbV5ie_FGyRMpzOvqtZAi0Z0ChIEJ7I2Kr0ym0PM,793
|
107
|
-
flwr/client/supernode/app.py,sha256=an-aT2zZEL5Mv7StgE1el0-fgIvKSQIuihJubRUuzyo,8753
|
108
105
|
flwr/client/typing.py,sha256=Jw3rawDzI_-ZDcRmEQcs5gZModY7oeQlEeltYsdOhlU,1048
|
109
106
|
flwr/clientapp/__init__.py,sha256=zGW4z49Ojzoi1hDiRC7kyhLjijUilc6fqHhtM_ATRVA,719
|
110
107
|
flwr/common/__init__.py,sha256=5GCLVk399Az_rTJHNticRlL0Sl_oPw_j5_LuFKfX7-M,4171
|
@@ -164,6 +161,7 @@ flwr/compat/client/grpc_client/__init__.py,sha256=MDOckOODn-FJnkkFEfb2JO-2G97wrB
|
|
164
161
|
flwr/compat/client/grpc_client/connection.py,sha256=xAyvcTVr7bkwUfR5P3D_LKlZYiyySpt5sEwORA1h8Gc,9189
|
165
162
|
flwr/compat/common/__init__.py,sha256=OMnKw4ad0qYMSIA9LZRa2gOkhSOXwAZCpAHnBQE_hFc,746
|
166
163
|
flwr/compat/server/__init__.py,sha256=TGVSoOTuf5T5JHUVrK5wuorQF7L6Wvdem8B4uufvMJY,746
|
164
|
+
flwr/compat/server/app.py,sha256=_lIe7Q4KUk-olq9PYBxIsO3UaOn6N92CWgWQ4hRcAZw,6490
|
167
165
|
flwr/compat/simulation/__init__.py,sha256=MApGa-tysDDw34iSdxZ7TWOKtGJM-z3i8fIRJa0qbZ8,750
|
168
166
|
flwr/proto/__init__.py,sha256=S3VbQzVwNC1P-3_9EdrXuwgptO-BVuuAe20Z_OUc1cQ,683
|
169
167
|
flwr/proto/clientappio_pb2.py,sha256=aroQDv0D2GquQ5Ujqml7n7l6ObZoXqMvDa0XVO-_8Cc,3703
|
@@ -210,14 +208,14 @@ flwr/proto/recorddict_pb2.py,sha256=G_ArzgRfHVXJTqtIZ6lYN8rZsCcj6p_1KokGUjajtMY,
|
|
210
208
|
flwr/proto/recorddict_pb2.pyi,sha256=M9dVj5o7sw91pnIBWVl76Ka82sDUiwm-rnv_iV9Omhc,15286
|
211
209
|
flwr/proto/recorddict_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
212
210
|
flwr/proto/recorddict_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
213
|
-
flwr/proto/run_pb2.py,sha256=
|
214
|
-
flwr/proto/run_pb2.pyi,sha256=
|
211
|
+
flwr/proto/run_pb2.py,sha256=SWpc2yDTprm7DaabMQne43q_7_NWQN3I66y-d_PpcGg,4727
|
212
|
+
flwr/proto/run_pb2.pyi,sha256=g87sUXdUA3cPmlYG03EoUisVIxOtWft3OR6nznzXeDo,9416
|
215
213
|
flwr/proto/run_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
216
214
|
flwr/proto/run_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
217
|
-
flwr/proto/serverappio_pb2.py,sha256=
|
215
|
+
flwr/proto/serverappio_pb2.py,sha256=JvIoTp15o7og5saAuAPPEHS2-qoxOI4y1t6pD78GBf4,5236
|
218
216
|
flwr/proto/serverappio_pb2.pyi,sha256=8Q81UXbBCArSXnma6-rXUE_vKneCowZjY4W4JmLaH0c,6450
|
219
|
-
flwr/proto/serverappio_pb2_grpc.py,sha256=
|
220
|
-
flwr/proto/serverappio_pb2_grpc.pyi,sha256=
|
217
|
+
flwr/proto/serverappio_pb2_grpc.py,sha256=An5cPfO_1-MjvP8FaVymRfAFpes_pASDLUoxonZ1vrs,22602
|
218
|
+
flwr/proto/serverappio_pb2_grpc.pyi,sha256=GI6b8aH2H7yPnqeE7q9lF6RUMtohuucYYxTjtHXzLsA,6204
|
221
219
|
flwr/proto/simulationio_pb2.py,sha256=sAJX72z-IttVGxyU3PFnG8AFuA-pV7itvBoxz-hOudE,3342
|
222
220
|
flwr/proto/simulationio_pb2.pyi,sha256=oXx8_FLBe5B54wduZj-f89kub73XxNtQbThuW8YfPAs,2660
|
223
221
|
flwr/proto/simulationio_pb2_grpc.py,sha256=HuGbhOwV_A5GTbvmd5XTm6lSm9fWUgKcxq9OKhgmBT0,12999
|
@@ -227,8 +225,8 @@ flwr/proto/transport_pb2.pyi,sha256=ipHQ03eFBqsxtAuAVefZ2lVr04BZ4YifJCS2eauNmy8,
|
|
227
225
|
flwr/proto/transport_pb2_grpc.py,sha256=vLN3EHtx2aEEMCO4f1Upu-l27BPzd3-5pV-u8wPcosk,2598
|
228
226
|
flwr/proto/transport_pb2_grpc.pyi,sha256=AGXf8RiIiW2J5IKMlm_3qT3AzcDa4F3P5IqUjve_esA,766
|
229
227
|
flwr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
230
|
-
flwr/server/__init__.py,sha256=
|
231
|
-
flwr/server/app.py,sha256=
|
228
|
+
flwr/server/__init__.py,sha256=LQQHiuL2jy7TpNaKastRdGsexlxSt5ZWAQNVqitDnrY,1598
|
229
|
+
flwr/server/app.py,sha256=VLvatu0jNb7FvgnUt_kc21jzdvdVfBAwpXolwI2jINQ,28737
|
232
230
|
flwr/server/client_manager.py,sha256=5jCGavVli7XdupvWWo7ru3PdFTlRU8IGvHFSSoUVLRs,6227
|
233
231
|
flwr/server/client_proxy.py,sha256=sv0E9AldBYOvc3pusqFh-GnyreeMfsXQ1cuTtxTq_wY,2399
|
234
232
|
flwr/server/compat/__init__.py,sha256=0IsttWvY15qO98_1GyzVC-vR1e_ZPXOdu2qUlOkYMPE,886
|
@@ -307,7 +305,7 @@ flwr/server/superlink/linkstate/sqlite_linkstate.py,sha256=z3VABMX_WtAioWJ2aUOsx
|
|
307
305
|
flwr/server/superlink/linkstate/utils.py,sha256=AJs9jTAEK7JnjF2AODXnOfy0pKAKpe6oUWPCanAP57s,15382
|
308
306
|
flwr/server/superlink/serverappio/__init__.py,sha256=Fy4zJuoccZe5mZSEIpOmQvU6YeXFBa1M4eZuXXmJcn8,717
|
309
307
|
flwr/server/superlink/serverappio/serverappio_grpc.py,sha256=6-FUUt0GiLcBPljj8bBrUNeAITUoDQOLzaMihKo52hg,2326
|
310
|
-
flwr/server/superlink/serverappio/serverappio_servicer.py,sha256=
|
308
|
+
flwr/server/superlink/serverappio/serverappio_servicer.py,sha256=chSj2hzaYn4q5X9owxWEquLEIK4fEmk3oeG3copgCgI,13980
|
311
309
|
flwr/server/superlink/simulation/__init__.py,sha256=Ry8DrNaZCMcQXvUc4FoCN2m3dvUQgWjasfp015o3Ec4,718
|
312
310
|
flwr/server/superlink/simulation/simulationio_grpc.py,sha256=0l0F-UjYEk6W7HZmI28PbJQLFxSi_vBHRkdchgdaSMQ,2224
|
313
311
|
flwr/server/superlink/simulation/simulationio_servicer.py,sha256=aJezU8RSJswcmWm7Eoy0BqsU13jrcfuFwX3ljm-cORM,7719
|
@@ -348,11 +346,14 @@ flwr/superexec/executor.py,sha256=M5ucqSE53jfRtuCNf59WFLqQvA1Mln4741TySeZE7qQ,31
|
|
348
346
|
flwr/superexec/simulation.py,sha256=j6YwUvBN7EQ09ID7MYOCVZ70PGbuyBy8f9bXU0EszEM,4088
|
349
347
|
flwr/superlink/__init__.py,sha256=GNSuJ4-N6Z8wun2iZNlXqENt5beUyzC0Gi_tN396bbM,707
|
350
348
|
flwr/supernode/__init__.py,sha256=KgeCaVvXWrU3rptNR1y0oBp4YtXbAcrnCcJAiOoWkI4,707
|
349
|
+
flwr/supernode/cli/__init__.py,sha256=usct6KqEN3NFrwAA6K1RUDRJbUs0lia8o8FFF5Sxnc4,815
|
350
|
+
flwr/supernode/cli/flower_supernode.py,sha256=pr16i1xWDzxxB5lcRTaSd4DVQvVOC3G0zwLliS9jSZ0,8766
|
351
351
|
flwr/supernode/nodestate/__init__.py,sha256=CyLLObbmmVgfRO88UCM0VMait1dL57mUauUDfuSHsbU,976
|
352
352
|
flwr/supernode/nodestate/in_memory_nodestate.py,sha256=brV7TMMzS93tXk6ntpoYjtPK5qiSF3XD2W-uUdUVucc,1270
|
353
353
|
flwr/supernode/nodestate/nodestate.py,sha256=-LAjZOnS7VyHC05ll3b31cYDjwAt6l4WmYt7duVLRKk,1024
|
354
354
|
flwr/supernode/nodestate/nodestate_factory.py,sha256=UYTDCcwK_baHUmkzkJDxL0UEqvtTfOMlQRrROMCd0Xo,1430
|
355
|
-
|
356
|
-
flwr_nightly-1.19.0.
|
357
|
-
flwr_nightly-1.19.0.
|
358
|
-
flwr_nightly-1.19.0.
|
355
|
+
flwr/supernode/start_client_internal.py,sha256=4z9qtwT7ZwNwahpX1SRfuaoYw1HCICPFUvjPBLHgsA0,18806
|
356
|
+
flwr_nightly-1.19.0.dev20250524.dist-info/METADATA,sha256=wciHfcEhok_S6e8SueDdMCIL-QcOhUZGUI46AyGWPak,15910
|
357
|
+
flwr_nightly-1.19.0.dev20250524.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
358
|
+
flwr_nightly-1.19.0.dev20250524.dist-info/entry_points.txt,sha256=08k99PaHg3Wr6W49rFXYtjmgcfIdpFLNeu6O0bXDYnU,370
|
359
|
+
flwr_nightly-1.19.0.dev20250524.dist-info/RECORD,,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[console_scripts]
|
2
2
|
flower-simulation=flwr.simulation.run_simulation:run_simulation_from_cli
|
3
3
|
flower-superlink=flwr.server.app:run_superlink
|
4
|
-
flower-supernode=flwr.
|
4
|
+
flower-supernode=flwr.supernode.cli:flower_supernode
|
5
5
|
flwr=flwr.cli.app:app
|
6
6
|
flwr-clientapp=flwr.client.clientapp:flwr_clientapp
|
7
7
|
flwr-serverapp=flwr.server.serverapp:flwr_serverapp
|
{flwr_nightly-1.19.0.dev20250522.dist-info → flwr_nightly-1.19.0.dev20250524.dist-info}/WHEEL
RENAMED
File without changes
|