flwr-nightly 1.14.0.dev20241130__py3-none-any.whl → 1.14.0.dev20241204__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flwr-nightly might be problematic. Click here for more details.
- flwr/cli/ls.py +201 -75
- flwr/cli/run/run.py +81 -14
- flwr/common/constant.py +11 -0
- flwr/common/logger.py +25 -1
- flwr/proto/exec_pb2.py +14 -14
- flwr/proto/exec_pb2.pyi +4 -2
- flwr/server/superlink/driver/serverappio_servicer.py +1 -1
- {flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/METADATA +1 -1
- {flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/RECORD +12 -20
- flwr/proto/common_pb2.py +0 -36
- flwr/proto/common_pb2.pyi +0 -121
- flwr/proto/common_pb2_grpc.py +0 -4
- flwr/proto/common_pb2_grpc.pyi +0 -4
- flwr/proto/control_pb2.py +0 -27
- flwr/proto/control_pb2.pyi +0 -7
- flwr/proto/control_pb2_grpc.py +0 -135
- flwr/proto/control_pb2_grpc.pyi +0 -53
- {flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/entry_points.txt +0 -0
flwr/cli/ls.py
CHANGED
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
"""Flower command line interface `ls` command."""
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
import io
|
|
19
|
+
import json
|
|
18
20
|
from datetime import datetime, timedelta
|
|
19
21
|
from logging import DEBUG
|
|
20
22
|
from pathlib import Path
|
|
21
|
-
from typing import Annotated, Any, Optional
|
|
23
|
+
from typing import Annotated, Any, Optional, Union
|
|
22
24
|
|
|
23
25
|
import grpc
|
|
24
26
|
import typer
|
|
25
27
|
from rich.console import Console
|
|
26
28
|
from rich.table import Table
|
|
27
29
|
from rich.text import Text
|
|
30
|
+
from typer import Exit
|
|
28
31
|
|
|
29
32
|
from flwr.cli.config_utils import (
|
|
30
33
|
load_and_validate,
|
|
@@ -32,10 +35,10 @@ from flwr.cli.config_utils import (
|
|
|
32
35
|
validate_federation_in_project_config,
|
|
33
36
|
validate_project_config,
|
|
34
37
|
)
|
|
35
|
-
from flwr.common.constant import FAB_CONFIG_FILE, SubStatus
|
|
38
|
+
from flwr.common.constant import FAB_CONFIG_FILE, CliOutputFormat, SubStatus
|
|
36
39
|
from flwr.common.date import format_timedelta, isoformat8601_utc
|
|
37
40
|
from flwr.common.grpc import GRPC_MAX_MESSAGE_LENGTH, create_channel
|
|
38
|
-
from flwr.common.logger import log
|
|
41
|
+
from flwr.common.logger import log, redirect_output, remove_emojis, restore_output
|
|
39
42
|
from flwr.common.serde import run_from_proto
|
|
40
43
|
from flwr.common.typing import Run
|
|
41
44
|
from flwr.proto.exec_pb2 import ( # pylint: disable=E0611
|
|
@@ -44,8 +47,10 @@ from flwr.proto.exec_pb2 import ( # pylint: disable=E0611
|
|
|
44
47
|
)
|
|
45
48
|
from flwr.proto.exec_pb2_grpc import ExecStub
|
|
46
49
|
|
|
50
|
+
_RunListType = tuple[int, str, str, str, str, str, str, str, str]
|
|
47
51
|
|
|
48
|
-
|
|
52
|
+
|
|
53
|
+
def ls( # pylint: disable=too-many-locals, too-many-branches
|
|
49
54
|
app: Annotated[
|
|
50
55
|
Path,
|
|
51
56
|
typer.Argument(help="Path of the Flower project"),
|
|
@@ -68,54 +73,85 @@ def ls(
|
|
|
68
73
|
help="Specific run ID to display",
|
|
69
74
|
),
|
|
70
75
|
] = None,
|
|
76
|
+
output_format: Annotated[
|
|
77
|
+
str,
|
|
78
|
+
typer.Option(
|
|
79
|
+
"--format",
|
|
80
|
+
case_sensitive=False,
|
|
81
|
+
help="Format output using 'default' view or 'json'",
|
|
82
|
+
),
|
|
83
|
+
] = CliOutputFormat.DEFAULT,
|
|
71
84
|
) -> None:
|
|
72
85
|
"""List runs."""
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
)
|
|
86
|
+
suppress_output = output_format == CliOutputFormat.JSON
|
|
87
|
+
captured_output = io.StringIO()
|
|
88
|
+
try:
|
|
89
|
+
if suppress_output:
|
|
90
|
+
redirect_output(captured_output)
|
|
91
|
+
|
|
92
|
+
# Load and validate federation config
|
|
93
|
+
typer.secho("Loading project configuration... ", fg=typer.colors.BLUE)
|
|
82
94
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
bold=True,
|
|
95
|
+
pyproject_path = app / FAB_CONFIG_FILE if app else None
|
|
96
|
+
config, errors, warnings = load_and_validate(path=pyproject_path)
|
|
97
|
+
config = validate_project_config(config, errors, warnings)
|
|
98
|
+
federation, federation_config = validate_federation_in_project_config(
|
|
99
|
+
federation, config
|
|
89
100
|
)
|
|
90
|
-
raise typer.Exit(code=1)
|
|
91
101
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
102
|
+
if "address" not in federation_config:
|
|
103
|
+
typer.secho(
|
|
104
|
+
"❌ `flwr ls` currently works with Exec API. Ensure that the correct"
|
|
105
|
+
"Exec API address is provided in the `pyproject.toml`.",
|
|
106
|
+
fg=typer.colors.RED,
|
|
107
|
+
bold=True,
|
|
96
108
|
)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
raise typer.Exit(code=1)
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
if runs and run_id is not None:
|
|
113
|
+
raise ValueError(
|
|
114
|
+
"The options '--runs' and '--run-id' are mutually exclusive."
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
channel = _init_channel(app, federation_config)
|
|
118
|
+
stub = ExecStub(channel)
|
|
119
|
+
|
|
120
|
+
# Display information about a specific run ID
|
|
121
|
+
if run_id is not None:
|
|
122
|
+
typer.echo(f"🔍 Displaying information for run ID {run_id}...")
|
|
123
|
+
restore_output()
|
|
124
|
+
_display_one_run(stub, run_id, output_format)
|
|
125
|
+
# By default, list all runs
|
|
126
|
+
else:
|
|
127
|
+
typer.echo("📄 Listing all runs...")
|
|
128
|
+
restore_output()
|
|
129
|
+
_list_runs(stub, output_format)
|
|
130
|
+
|
|
131
|
+
except ValueError as err:
|
|
132
|
+
typer.secho(
|
|
133
|
+
f"❌ {err}",
|
|
134
|
+
fg=typer.colors.RED,
|
|
135
|
+
bold=True,
|
|
136
|
+
)
|
|
137
|
+
raise typer.Exit(code=1) from err
|
|
138
|
+
finally:
|
|
139
|
+
channel.close()
|
|
140
|
+
except (typer.Exit, Exception) as err: # pylint: disable=broad-except
|
|
141
|
+
if suppress_output:
|
|
142
|
+
restore_output()
|
|
143
|
+
e_message = captured_output.getvalue()
|
|
144
|
+
_print_json_error(e_message, err)
|
|
106
145
|
else:
|
|
107
|
-
typer.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
f"❌ {err}",
|
|
113
|
-
fg=typer.colors.RED,
|
|
114
|
-
bold=True,
|
|
115
|
-
)
|
|
116
|
-
raise typer.Exit(code=1) from err
|
|
146
|
+
typer.secho(
|
|
147
|
+
f"{err}",
|
|
148
|
+
fg=typer.colors.RED,
|
|
149
|
+
bold=True,
|
|
150
|
+
)
|
|
117
151
|
finally:
|
|
118
|
-
|
|
152
|
+
if suppress_output:
|
|
153
|
+
restore_output()
|
|
154
|
+
captured_output.close()
|
|
119
155
|
|
|
120
156
|
|
|
121
157
|
def on_channel_state_change(channel_connectivity: str) -> None:
|
|
@@ -139,23 +175,13 @@ def _init_channel(app: Path, federation_config: dict[str, Any]) -> grpc.Channel:
|
|
|
139
175
|
return channel
|
|
140
176
|
|
|
141
177
|
|
|
142
|
-
def
|
|
143
|
-
"""Format
|
|
144
|
-
table = Table(header_style="bold cyan", show_lines=True)
|
|
178
|
+
def _format_runs(run_dict: dict[int, Run], now_isoformat: str) -> list[_RunListType]:
|
|
179
|
+
"""Format runs to a list."""
|
|
145
180
|
|
|
146
181
|
def _format_datetime(dt: Optional[datetime]) -> str:
|
|
147
182
|
return isoformat8601_utc(dt).replace("T", " ") if dt else "N/A"
|
|
148
183
|
|
|
149
|
-
|
|
150
|
-
table.add_column(
|
|
151
|
-
Text("Run ID", justify="center"), style="bright_white", overflow="fold"
|
|
152
|
-
)
|
|
153
|
-
table.add_column(Text("FAB", justify="center"), style="dim white")
|
|
154
|
-
table.add_column(Text("Status", justify="center"))
|
|
155
|
-
table.add_column(Text("Elapsed", justify="center"), style="blue")
|
|
156
|
-
table.add_column(Text("Created At", justify="center"), style="dim white")
|
|
157
|
-
table.add_column(Text("Running At", justify="center"), style="dim white")
|
|
158
|
-
table.add_column(Text("Finished At", justify="center"), style="dim white")
|
|
184
|
+
run_list: list[_RunListType] = []
|
|
159
185
|
|
|
160
186
|
# Add rows
|
|
161
187
|
for run in sorted(
|
|
@@ -167,15 +193,6 @@ def _format_run_table(run_dict: dict[int, Run], now_isoformat: str) -> Table:
|
|
|
167
193
|
else:
|
|
168
194
|
status_text = f"{run.status.status}:{run.status.sub_status}"
|
|
169
195
|
|
|
170
|
-
# Style the status based on its value
|
|
171
|
-
sub_status = run.status.sub_status
|
|
172
|
-
if sub_status == SubStatus.COMPLETED:
|
|
173
|
-
status_style = "green"
|
|
174
|
-
elif sub_status == SubStatus.FAILED:
|
|
175
|
-
status_style = "red"
|
|
176
|
-
else:
|
|
177
|
-
status_style = "yellow"
|
|
178
|
-
|
|
179
196
|
# Convert isoformat to datetime
|
|
180
197
|
pending_at = datetime.fromisoformat(run.pending_at) if run.pending_at else None
|
|
181
198
|
running_at = datetime.fromisoformat(run.running_at) if run.running_at else None
|
|
@@ -192,31 +209,124 @@ def _format_run_table(run_dict: dict[int, Run], now_isoformat: str) -> Table:
|
|
|
192
209
|
end_time = datetime.fromisoformat(now_isoformat)
|
|
193
210
|
elapsed_time = end_time - running_at
|
|
194
211
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
212
|
+
run_list.append(
|
|
213
|
+
(
|
|
214
|
+
run.run_id,
|
|
215
|
+
run.fab_id,
|
|
216
|
+
run.fab_version,
|
|
217
|
+
run.fab_hash,
|
|
218
|
+
status_text,
|
|
219
|
+
format_timedelta(elapsed_time),
|
|
220
|
+
_format_datetime(pending_at),
|
|
221
|
+
_format_datetime(running_at),
|
|
222
|
+
_format_datetime(finished_at),
|
|
223
|
+
)
|
|
224
|
+
)
|
|
225
|
+
return run_list
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
def _to_table(run_list: list[_RunListType]) -> Table:
|
|
229
|
+
"""Format the provided run list to a rich Table."""
|
|
230
|
+
table = Table(header_style="bold cyan", show_lines=True)
|
|
231
|
+
|
|
232
|
+
# Add columns
|
|
233
|
+
table.add_column(
|
|
234
|
+
Text("Run ID", justify="center"), style="bright_white", overflow="fold"
|
|
235
|
+
)
|
|
236
|
+
table.add_column(Text("FAB", justify="center"), style="dim white")
|
|
237
|
+
table.add_column(Text("Status", justify="center"))
|
|
238
|
+
table.add_column(Text("Elapsed", justify="center"), style="blue")
|
|
239
|
+
table.add_column(Text("Created At", justify="center"), style="dim white")
|
|
240
|
+
table.add_column(Text("Running At", justify="center"), style="dim white")
|
|
241
|
+
table.add_column(Text("Finished At", justify="center"), style="dim white")
|
|
242
|
+
|
|
243
|
+
for row in run_list:
|
|
244
|
+
(
|
|
245
|
+
run_id,
|
|
246
|
+
fab_id,
|
|
247
|
+
fab_version,
|
|
248
|
+
_,
|
|
249
|
+
status_text,
|
|
250
|
+
elapsed,
|
|
251
|
+
created_at,
|
|
252
|
+
running_at,
|
|
253
|
+
finished_at,
|
|
254
|
+
) = row
|
|
255
|
+
# Style the status based on its value
|
|
256
|
+
sub_status = status_text.rsplit(":", maxsplit=1)[-1]
|
|
257
|
+
if sub_status == SubStatus.COMPLETED:
|
|
258
|
+
status_style = "green"
|
|
259
|
+
elif sub_status == SubStatus.FAILED:
|
|
260
|
+
status_style = "red"
|
|
261
|
+
else:
|
|
262
|
+
status_style = "yellow"
|
|
263
|
+
|
|
264
|
+
formatted_row = (
|
|
265
|
+
f"[bold]{run_id}[/bold]",
|
|
266
|
+
f"{fab_id} (v{fab_version})",
|
|
198
267
|
f"[{status_style}]{status_text}[/{status_style}]",
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
268
|
+
elapsed,
|
|
269
|
+
created_at,
|
|
270
|
+
running_at,
|
|
271
|
+
finished_at,
|
|
203
272
|
)
|
|
273
|
+
table.add_row(*formatted_row)
|
|
274
|
+
|
|
204
275
|
return table
|
|
205
276
|
|
|
206
277
|
|
|
278
|
+
def _to_json(run_list: list[_RunListType]) -> str:
|
|
279
|
+
"""Format run status list to a JSON formatted string."""
|
|
280
|
+
runs_list = []
|
|
281
|
+
for row in run_list:
|
|
282
|
+
(
|
|
283
|
+
run_id,
|
|
284
|
+
fab_id,
|
|
285
|
+
fab_version,
|
|
286
|
+
fab_hash,
|
|
287
|
+
status_text,
|
|
288
|
+
elapsed,
|
|
289
|
+
created_at,
|
|
290
|
+
running_at,
|
|
291
|
+
finished_at,
|
|
292
|
+
) = row
|
|
293
|
+
runs_list.append(
|
|
294
|
+
{
|
|
295
|
+
"run-id": run_id,
|
|
296
|
+
"fab-id": fab_id,
|
|
297
|
+
"fab-name": fab_id.split("/")[-1],
|
|
298
|
+
"fab-version": fab_version,
|
|
299
|
+
"fab-hash": fab_hash[:8],
|
|
300
|
+
"status": status_text,
|
|
301
|
+
"elapsed": elapsed,
|
|
302
|
+
"created-at": created_at,
|
|
303
|
+
"running-at": running_at,
|
|
304
|
+
"finished-at": finished_at,
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
return json.dumps({"success": True, "runs": runs_list})
|
|
309
|
+
|
|
310
|
+
|
|
207
311
|
def _list_runs(
|
|
208
312
|
stub: ExecStub,
|
|
313
|
+
output_format: str = CliOutputFormat.DEFAULT,
|
|
209
314
|
) -> None:
|
|
210
315
|
"""List all runs."""
|
|
211
316
|
res: ListRunsResponse = stub.ListRuns(ListRunsRequest())
|
|
212
317
|
run_dict = {run_id: run_from_proto(proto) for run_id, proto in res.run_dict.items()}
|
|
213
318
|
|
|
214
|
-
|
|
319
|
+
formatted_runs = _format_runs(run_dict, res.now)
|
|
320
|
+
if output_format == CliOutputFormat.JSON:
|
|
321
|
+
Console().print_json(_to_json(formatted_runs))
|
|
322
|
+
else:
|
|
323
|
+
Console().print(_to_table(formatted_runs))
|
|
215
324
|
|
|
216
325
|
|
|
217
326
|
def _display_one_run(
|
|
218
327
|
stub: ExecStub,
|
|
219
328
|
run_id: int,
|
|
329
|
+
output_format: str = CliOutputFormat.DEFAULT,
|
|
220
330
|
) -> None:
|
|
221
331
|
"""Display information about a specific run."""
|
|
222
332
|
res: ListRunsResponse = stub.ListRuns(ListRunsRequest(run_id=run_id))
|
|
@@ -225,4 +335,20 @@ def _display_one_run(
|
|
|
225
335
|
|
|
226
336
|
run_dict = {run_id: run_from_proto(proto) for run_id, proto in res.run_dict.items()}
|
|
227
337
|
|
|
228
|
-
|
|
338
|
+
formatted_runs = _format_runs(run_dict, res.now)
|
|
339
|
+
if output_format == CliOutputFormat.JSON:
|
|
340
|
+
Console().print_json(_to_json(formatted_runs))
|
|
341
|
+
else:
|
|
342
|
+
Console().print(_to_table(formatted_runs))
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
def _print_json_error(msg: str, e: Union[Exit, Exception]) -> None:
|
|
346
|
+
"""Print error message as JSON."""
|
|
347
|
+
Console().print_json(
|
|
348
|
+
json.dumps(
|
|
349
|
+
{
|
|
350
|
+
"success": False,
|
|
351
|
+
"error-message": remove_emojis(str(msg) + "\n" + str(e)),
|
|
352
|
+
}
|
|
353
|
+
)
|
|
354
|
+
)
|
flwr/cli/run/run.py
CHANGED
|
@@ -14,16 +14,19 @@
|
|
|
14
14
|
# ==============================================================================
|
|
15
15
|
"""Flower command line interface `run` command."""
|
|
16
16
|
|
|
17
|
+
import io
|
|
17
18
|
import json
|
|
18
19
|
import subprocess
|
|
19
20
|
from logging import DEBUG
|
|
20
21
|
from pathlib import Path
|
|
21
|
-
from typing import Annotated, Any, Optional
|
|
22
|
+
from typing import Annotated, Any, Optional, Union
|
|
22
23
|
|
|
23
24
|
import typer
|
|
25
|
+
from rich.console import Console
|
|
24
26
|
|
|
25
27
|
from flwr.cli.build import build
|
|
26
28
|
from flwr.cli.config_utils import (
|
|
29
|
+
get_fab_metadata,
|
|
27
30
|
load_and_validate,
|
|
28
31
|
validate_certificate_in_federation_config,
|
|
29
32
|
validate_federation_in_project_config,
|
|
@@ -34,8 +37,9 @@ from flwr.common.config import (
|
|
|
34
37
|
parse_config_args,
|
|
35
38
|
user_config_to_configsrecord,
|
|
36
39
|
)
|
|
40
|
+
from flwr.common.constant import CliOutputFormat
|
|
37
41
|
from flwr.common.grpc import GRPC_MAX_MESSAGE_LENGTH, create_channel
|
|
38
|
-
from flwr.common.logger import log
|
|
42
|
+
from flwr.common.logger import log, redirect_output, remove_emojis, restore_output
|
|
39
43
|
from flwr.common.serde import (
|
|
40
44
|
configs_record_to_proto,
|
|
41
45
|
fab_to_proto,
|
|
@@ -85,21 +89,51 @@ def run(
|
|
|
85
89
|
"logs are not streamed by default.",
|
|
86
90
|
),
|
|
87
91
|
] = False,
|
|
92
|
+
output_format: Annotated[
|
|
93
|
+
str,
|
|
94
|
+
typer.Option(
|
|
95
|
+
"--format",
|
|
96
|
+
case_sensitive=False,
|
|
97
|
+
help="Format output using 'default' view or 'json'",
|
|
98
|
+
),
|
|
99
|
+
] = CliOutputFormat.DEFAULT,
|
|
88
100
|
) -> None:
|
|
89
101
|
"""Run Flower App."""
|
|
90
|
-
|
|
102
|
+
suppress_output = output_format == CliOutputFormat.JSON
|
|
103
|
+
captured_output = io.StringIO()
|
|
104
|
+
try:
|
|
105
|
+
if suppress_output:
|
|
106
|
+
redirect_output(captured_output)
|
|
107
|
+
typer.secho("Loading project configuration... ", fg=typer.colors.BLUE)
|
|
91
108
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
pyproject_path = app / "pyproject.toml" if app else None
|
|
110
|
+
config, errors, warnings = load_and_validate(path=pyproject_path)
|
|
111
|
+
config = validate_project_config(config, errors, warnings)
|
|
112
|
+
federation, federation_config = validate_federation_in_project_config(
|
|
113
|
+
federation, config
|
|
114
|
+
)
|
|
98
115
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
if "address" in federation_config:
|
|
117
|
+
_run_with_exec_api(
|
|
118
|
+
app, federation_config, config_overrides, stream, output_format
|
|
119
|
+
)
|
|
120
|
+
else:
|
|
121
|
+
_run_without_exec_api(app, federation_config, config_overrides, federation)
|
|
122
|
+
except (typer.Exit, Exception) as err: # pylint: disable=broad-except
|
|
123
|
+
if suppress_output:
|
|
124
|
+
restore_output()
|
|
125
|
+
e_message = captured_output.getvalue()
|
|
126
|
+
_print_json_error(e_message, err)
|
|
127
|
+
else:
|
|
128
|
+
typer.secho(
|
|
129
|
+
f"{err}",
|
|
130
|
+
fg=typer.colors.RED,
|
|
131
|
+
bold=True,
|
|
132
|
+
)
|
|
133
|
+
finally:
|
|
134
|
+
if suppress_output:
|
|
135
|
+
restore_output()
|
|
136
|
+
captured_output.close()
|
|
103
137
|
|
|
104
138
|
|
|
105
139
|
# pylint: disable-next=too-many-locals
|
|
@@ -108,6 +142,7 @@ def _run_with_exec_api(
|
|
|
108
142
|
federation_config: dict[str, Any],
|
|
109
143
|
config_overrides: Optional[list[str]],
|
|
110
144
|
stream: bool,
|
|
145
|
+
output_format: str,
|
|
111
146
|
) -> None:
|
|
112
147
|
|
|
113
148
|
insecure, root_certificates_bytes = validate_certificate_in_federation_config(
|
|
@@ -125,6 +160,7 @@ def _run_with_exec_api(
|
|
|
125
160
|
|
|
126
161
|
fab_path, fab_hash = build(app)
|
|
127
162
|
content = Path(fab_path).read_bytes()
|
|
163
|
+
fab_id, fab_version = get_fab_metadata(Path(fab_path))
|
|
128
164
|
|
|
129
165
|
# Delete FAB file once the bytes is computed
|
|
130
166
|
Path(fab_path).unlink()
|
|
@@ -142,7 +178,26 @@ def _run_with_exec_api(
|
|
|
142
178
|
)
|
|
143
179
|
res = stub.StartRun(req)
|
|
144
180
|
|
|
145
|
-
|
|
181
|
+
if res.HasField("run_id"):
|
|
182
|
+
typer.secho(f"🎊 Successfully started run {res.run_id}", fg=typer.colors.GREEN)
|
|
183
|
+
else:
|
|
184
|
+
typer.secho("❌ Failed to start run", fg=typer.colors.RED)
|
|
185
|
+
raise typer.Exit(code=1)
|
|
186
|
+
|
|
187
|
+
if output_format == CliOutputFormat.JSON:
|
|
188
|
+
run_output = json.dumps(
|
|
189
|
+
{
|
|
190
|
+
"success": res.HasField("run_id"),
|
|
191
|
+
"run-id": res.run_id if res.HasField("run_id") else None,
|
|
192
|
+
"fab-id": fab_id,
|
|
193
|
+
"fab-name": fab_id.rsplit("/", maxsplit=1)[-1],
|
|
194
|
+
"fab-version": fab_version,
|
|
195
|
+
"fab-hash": fab_hash[:8],
|
|
196
|
+
"fab-filename": fab_path,
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
restore_output()
|
|
200
|
+
Console().print_json(run_output)
|
|
146
201
|
|
|
147
202
|
if stream:
|
|
148
203
|
start_stream(res.run_id, channel, CONN_REFRESH_PERIOD)
|
|
@@ -194,3 +249,15 @@ def _run_without_exec_api(
|
|
|
194
249
|
check=True,
|
|
195
250
|
text=True,
|
|
196
251
|
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _print_json_error(msg: str, e: Union[typer.Exit, Exception]) -> None:
|
|
255
|
+
"""Print error message as JSON."""
|
|
256
|
+
Console().print_json(
|
|
257
|
+
json.dumps(
|
|
258
|
+
{
|
|
259
|
+
"success": False,
|
|
260
|
+
"error-message": remove_emojis(str(msg) + "\n" + str(e)),
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
)
|
flwr/common/constant.py
CHANGED
|
@@ -181,3 +181,14 @@ class SubStatus:
|
|
|
181
181
|
def __new__(cls) -> SubStatus:
|
|
182
182
|
"""Prevent instantiation."""
|
|
183
183
|
raise TypeError(f"{cls.__name__} cannot be instantiated.")
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class CliOutputFormat:
|
|
187
|
+
"""Define output format for `flwr` CLI commands."""
|
|
188
|
+
|
|
189
|
+
DEFAULT = "default"
|
|
190
|
+
JSON = "json"
|
|
191
|
+
|
|
192
|
+
def __new__(cls) -> CliOutputFormat:
|
|
193
|
+
"""Prevent instantiation."""
|
|
194
|
+
raise TypeError(f"{cls.__name__} cannot be instantiated.")
|
flwr/common/logger.py
CHANGED
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
# ==============================================================================
|
|
15
15
|
"""Flower Logger."""
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
import logging
|
|
18
|
+
import re
|
|
19
19
|
import sys
|
|
20
20
|
import threading
|
|
21
21
|
import time
|
|
22
|
+
from io import StringIO
|
|
22
23
|
from logging import WARN, LogRecord
|
|
23
24
|
from logging.handlers import HTTPHandler
|
|
24
25
|
from queue import Empty, Queue
|
|
@@ -303,6 +304,13 @@ def restore_output() -> None:
|
|
|
303
304
|
console_handler.stream = sys.stdout
|
|
304
305
|
|
|
305
306
|
|
|
307
|
+
def redirect_output(output_buffer: StringIO) -> None:
|
|
308
|
+
"""Redirect stdout and stderr to text I/O buffer."""
|
|
309
|
+
sys.stdout = output_buffer
|
|
310
|
+
sys.stderr = output_buffer
|
|
311
|
+
console_handler.stream = sys.stdout
|
|
312
|
+
|
|
313
|
+
|
|
306
314
|
def _log_uploader(
|
|
307
315
|
log_queue: Queue[Optional[str]], node_id: int, run_id: int, stub: ServerAppIoStub
|
|
308
316
|
) -> None:
|
|
@@ -366,3 +374,19 @@ def stop_log_uploader(
|
|
|
366
374
|
"""Stop the log uploader thread."""
|
|
367
375
|
log_queue.put(None)
|
|
368
376
|
log_uploader.join()
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def remove_emojis(text: str) -> str:
|
|
380
|
+
"""Remove emojis from the provided text."""
|
|
381
|
+
emoji_pattern = re.compile(
|
|
382
|
+
"["
|
|
383
|
+
"\U0001F600-\U0001F64F" # Emoticons
|
|
384
|
+
"\U0001F300-\U0001F5FF" # Symbols & Pictographs
|
|
385
|
+
"\U0001F680-\U0001F6FF" # Transport & Map Symbols
|
|
386
|
+
"\U0001F1E0-\U0001F1FF" # Flags
|
|
387
|
+
"\U00002702-\U000027B0" # Dingbats
|
|
388
|
+
"\U000024C2-\U0001F251"
|
|
389
|
+
"]+",
|
|
390
|
+
flags=re.UNICODE,
|
|
391
|
+
)
|
|
392
|
+
return emoji_pattern.sub(r"", text)
|
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\"\
|
|
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\x32\xe9\x01\n\x04\x45xec\x12G\n\x08StartRun\x12\x1b.flwr.proto.StartRunRequest\x1a\x1c.flwr.proto.StartRunResponse\"\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\x62\x06proto3')
|
|
22
22
|
|
|
23
23
|
_globals = globals()
|
|
24
24
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -34,17 +34,17 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
|
34
34
|
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=316
|
|
35
35
|
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=389
|
|
36
36
|
_globals['_STARTRUNRESPONSE']._serialized_start=391
|
|
37
|
-
_globals['_STARTRUNRESPONSE']._serialized_end=
|
|
38
|
-
_globals['_STREAMLOGSREQUEST']._serialized_start=
|
|
39
|
-
_globals['_STREAMLOGSREQUEST']._serialized_end=
|
|
40
|
-
_globals['_STREAMLOGSRESPONSE']._serialized_start=
|
|
41
|
-
_globals['_STREAMLOGSRESPONSE']._serialized_end=
|
|
42
|
-
_globals['_LISTRUNSREQUEST']._serialized_start=
|
|
43
|
-
_globals['_LISTRUNSREQUEST']._serialized_end=
|
|
44
|
-
_globals['_LISTRUNSRESPONSE']._serialized_start=
|
|
45
|
-
_globals['_LISTRUNSRESPONSE']._serialized_end=
|
|
46
|
-
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_start=
|
|
47
|
-
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_end=
|
|
48
|
-
_globals['_EXEC']._serialized_start=
|
|
49
|
-
_globals['_EXEC']._serialized_end=
|
|
37
|
+
_globals['_STARTRUNRESPONSE']._serialized_end=441
|
|
38
|
+
_globals['_STREAMLOGSREQUEST']._serialized_start=443
|
|
39
|
+
_globals['_STREAMLOGSREQUEST']._serialized_end=503
|
|
40
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_start=505
|
|
41
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_end=571
|
|
42
|
+
_globals['_LISTRUNSREQUEST']._serialized_start=573
|
|
43
|
+
_globals['_LISTRUNSREQUEST']._serialized_end=622
|
|
44
|
+
_globals['_LISTRUNSRESPONSE']._serialized_start=625
|
|
45
|
+
_globals['_LISTRUNSRESPONSE']._serialized_end=782
|
|
46
|
+
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_start=719
|
|
47
|
+
_globals['_LISTRUNSRESPONSE_RUNDICTENTRY']._serialized_end=782
|
|
48
|
+
_globals['_EXEC']._serialized_start=785
|
|
49
|
+
_globals['_EXEC']._serialized_end=1018
|
|
50
50
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/exec_pb2.pyi
CHANGED
|
@@ -57,9 +57,11 @@ class StartRunResponse(google.protobuf.message.Message):
|
|
|
57
57
|
run_id: builtins.int
|
|
58
58
|
def __init__(self,
|
|
59
59
|
*,
|
|
60
|
-
run_id: builtins.int = ...,
|
|
60
|
+
run_id: typing.Optional[builtins.int] = ...,
|
|
61
61
|
) -> None: ...
|
|
62
|
-
def
|
|
62
|
+
def HasField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","run_id",b"run_id"]) -> builtins.bool: ...
|
|
63
|
+
def ClearField(self, field_name: typing_extensions.Literal["_run_id",b"_run_id","run_id",b"run_id"]) -> None: ...
|
|
64
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_run_id",b"_run_id"]) -> typing.Optional[typing_extensions.Literal["run_id"]]: ...
|
|
63
65
|
global___StartRunResponse = StartRunResponse
|
|
64
66
|
|
|
65
67
|
class StreamLogsRequest(google.protobuf.message.Message):
|
|
@@ -263,7 +263,7 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
|
|
|
263
263
|
self, request: UpdateRunStatusRequest, context: grpc.ServicerContext
|
|
264
264
|
) -> UpdateRunStatusResponse:
|
|
265
265
|
"""Update the status of a run."""
|
|
266
|
-
log(DEBUG, "
|
|
266
|
+
log(DEBUG, "ServerAppIoServicer.UpdateRunStatus")
|
|
267
267
|
state = self.state_factory.state()
|
|
268
268
|
|
|
269
269
|
# Update the run status
|
{flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/RECORD
RENAMED
|
@@ -6,7 +6,7 @@ flwr/cli/config_utils.py,sha256=n-xNkQG_0POz5UUHyE00lthNaOjuS6IYU9Thzb_BThs,1143
|
|
|
6
6
|
flwr/cli/example.py,sha256=1bGDYll3BXQY2kRqSN-oICqS5n1b9m0g0RvXTopXHl4,2215
|
|
7
7
|
flwr/cli/install.py,sha256=kmD2dW-9B7645GAQx5es1o2W11gRHQ2Fg2E31SLomrg,8179
|
|
8
8
|
flwr/cli/log.py,sha256=WlAuxZdTUYZ5bRKkm0jLWrOxHTS0TlSA5BeDtO9xF3k,6659
|
|
9
|
-
flwr/cli/ls.py,sha256=
|
|
9
|
+
flwr/cli/ls.py,sha256=aUaP49kkg4nV2nRYfO8qgbtV_FF5xN5gCy3ziD2HbUk,11513
|
|
10
10
|
flwr/cli/new/__init__.py,sha256=cQzK1WH4JP2awef1t2UQ2xjl1agVEz9rwutV18SWV1k,789
|
|
11
11
|
flwr/cli/new/new.py,sha256=xgzObnhNpnGvjVs6wTj6BlJ9X-avPhRX3DuwWnk9ED0,9903
|
|
12
12
|
flwr/cli/new/templates/__init__.py,sha256=4luU8RL-CK8JJCstQ_ON809W9bNTkY1l9zSaPKBkgwY,725
|
|
@@ -62,7 +62,7 @@ flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl,sha256=UtH3Vslg2S8fIKIHC-d
|
|
|
62
62
|
flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl,sha256=01HArBqRrbZT3O7pXOM9MqduXMNm525wv7Sj6dvYMJE,686
|
|
63
63
|
flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl,sha256=KVCIOEYNWnq6j7XOboXqZshc9aQ2PyRDUu7bZtmfJ24,710
|
|
64
64
|
flwr/cli/run/__init__.py,sha256=oCd6HmQDx-sqver1gecgx-uMA38BLTSiiKpl7RGNceg,789
|
|
65
|
-
flwr/cli/run/run.py,sha256=
|
|
65
|
+
flwr/cli/run/run.py,sha256=5To92BOrfM5VEwNp2zzRUoz4tHE2NtazxIQICProA8k,8503
|
|
66
66
|
flwr/cli/utils.py,sha256=emMUdthvoHBTB0iGQp-oFBmA5wV46lw3y3FmfXQPCsc,4500
|
|
67
67
|
flwr/client/__init__.py,sha256=DGDoO0AEAfz-0CUFmLdyUUweAS64-07AOnmDfWUefK4,1192
|
|
68
68
|
flwr/client/app.py,sha256=3AKrJduvki_1ATvKCQV4T9_1qZuarVVTtpnsq6_cWw0,34384
|
|
@@ -108,7 +108,7 @@ flwr/common/__init__.py,sha256=TVaoFEJE158aui1TPZQiJCDZX4RNHRyI8I55VC80HhI,3901
|
|
|
108
108
|
flwr/common/address.py,sha256=7kM2Rqjw86-c8aKwAvrXerWqznnVv4TFJ62aSAeTn10,3017
|
|
109
109
|
flwr/common/args.py,sha256=-KeQ6AZw1-G4Ifhsg4qlRnWhGH1m_OzUgxH7Z4j_0ns,6222
|
|
110
110
|
flwr/common/config.py,sha256=qC1QvGAGr4faBtg3Y5dWhfyK5FggyWUMjPqg-Rx_FW4,8083
|
|
111
|
-
flwr/common/constant.py,sha256=
|
|
111
|
+
flwr/common/constant.py,sha256=G1arzDznYIlhUpkrk31-k-pJsRcOuoAoscI6bGe59nE,5792
|
|
112
112
|
flwr/common/context.py,sha256=uJ-mnoC_8y_udEb3kAX-r8CPphNTWM72z1AlsvQEu54,2403
|
|
113
113
|
flwr/common/date.py,sha256=NHHpESce5wYqEwoDXf09gp9U9l_5Bmlh2BsOcwS-kDM,1554
|
|
114
114
|
flwr/common/differential_privacy.py,sha256=XwcJ3rWr8S8BZUocc76vLSJAXIf6OHnWkBV6-xlIRuw,6106
|
|
@@ -116,7 +116,7 @@ flwr/common/differential_privacy_constants.py,sha256=c7b7tqgvT7yMK0XN9ndiTBs4mQf
|
|
|
116
116
|
flwr/common/dp.py,sha256=vddkvyjV2FhRoN4VuU2LeAM1UBn7dQB8_W-Qdiveal8,1978
|
|
117
117
|
flwr/common/exit_handlers.py,sha256=MracJaBeoCOC7TaXK9zCJQxhrMSx9ZtczK237qvhBpU,2806
|
|
118
118
|
flwr/common/grpc.py,sha256=AIPMAHsvcTlduaYKCgnoBnst1A7RZEgGqh0Ulm7qfJ0,2621
|
|
119
|
-
flwr/common/logger.py,sha256=
|
|
119
|
+
flwr/common/logger.py,sha256=NQkdrtAP3NFTH_ebTTrjD2z6y-1bdoiIx9_npC-1TWw,11940
|
|
120
120
|
flwr/common/message.py,sha256=4O1m0OWXBAYZz05gKgEtnoJ94J1gjo7hCNHyUXThxRo,13831
|
|
121
121
|
flwr/common/object_ref.py,sha256=DavEkh-IJv_s0VeLsJvSZS5k-Ix_k1UcNXbldfNFXxM,9859
|
|
122
122
|
flwr/common/parameter.py,sha256=-bFAUayToYDF50FZGrBC1hQYJCQDtB2bbr3ZuVLMtdE,2095
|
|
@@ -147,20 +147,12 @@ flwr/proto/clientappio_pb2.py,sha256=Y3PMv-JMaBGehpslgbvGY6l2u5vNpfCTFWu-fmAmBJ4
|
|
|
147
147
|
flwr/proto/clientappio_pb2.pyi,sha256=iL6pOPmnot5wP3aXGiDfiUpp-eJIkysyju0ebPehS8Y,5670
|
|
148
148
|
flwr/proto/clientappio_pb2_grpc.py,sha256=G35GhZ3iEOL8N6tu7Kn_ip4QUx4O2HveXngHAuU2YEM,6112
|
|
149
149
|
flwr/proto/clientappio_pb2_grpc.pyi,sha256=cybktpMPaIMwrItd8hQaQDnRv4zNu_wgRddSqR9REyI,1822
|
|
150
|
-
flwr/proto/common_pb2.py,sha256=uzSmq0FJdC-MriN9UGPFs7QVIFTKJmX5lyLnzcyZ5WE,2405
|
|
151
|
-
flwr/proto/common_pb2.pyi,sha256=0ylFO7G79qqLuRg9IQUCBdgyIIFv4m8VzrfoWad4xXU,5394
|
|
152
|
-
flwr/proto/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
153
|
-
flwr/proto/common_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
|
154
|
-
flwr/proto/control_pb2.py,sha256=yaUkwY2J9uo-fdUIB5aHwVSDOuGunxaUr4ZlggifA_M,1439
|
|
155
|
-
flwr/proto/control_pb2.pyi,sha256=XbFvpZvvrS7QcH5AFXfpRGl4hQvhd3QdKO6x0oTlCCU,165
|
|
156
|
-
flwr/proto/control_pb2_grpc.py,sha256=FFE21nZvEILWpe1WCR5vAwgYEtpzrdG78-_SsU0gZ7w,5783
|
|
157
|
-
flwr/proto/control_pb2_grpc.pyi,sha256=9DU4sgkzJ497a4Nq6kitZWEG4g_5MO8MevichnO0oAg,1672
|
|
158
150
|
flwr/proto/error_pb2.py,sha256=LarjKL90LbwkXKlhzNrDssgl4DXcvIPve8NVCXHpsKA,1084
|
|
159
151
|
flwr/proto/error_pb2.pyi,sha256=ZNH4HhJTU_KfMXlyCeg8FwU-fcUYxTqEmoJPtWtHikc,734
|
|
160
152
|
flwr/proto/error_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
161
153
|
flwr/proto/error_pb2_grpc.pyi,sha256=ff2TSiLVnG6IVQcTGzb2DIH3XRSoAvAo_RMcvbMFyc0,76
|
|
162
|
-
flwr/proto/exec_pb2.py,sha256=
|
|
163
|
-
flwr/proto/exec_pb2.pyi,sha256=
|
|
154
|
+
flwr/proto/exec_pb2.py,sha256=BubvZLm2_IA9ziNdEc4zUj27r9u7jP20w1P8dzEaE1Q,4057
|
|
155
|
+
flwr/proto/exec_pb2.pyi,sha256=r-GGeFEsmc9I838U2CUWpXQEmkLiVKhxGZMmb067PUA,6327
|
|
164
156
|
flwr/proto/exec_pb2_grpc.py,sha256=kPXb_vp2Swl-1nkQEHJaqXKXi9P8pauBFemboGFgI9Q,5621
|
|
165
157
|
flwr/proto/exec_pb2_grpc.pyi,sha256=qnefAjYPdWs-yYTPIfsbecoKWbVKjp6IFZHwN82ZGUo,1601
|
|
166
158
|
flwr/proto/fab_pb2.py,sha256=3QSDq9pjbZoqVxsmCRDwHO5PrSjzn2vixjYxE-qPmb0,1589
|
|
@@ -261,7 +253,7 @@ flwr/server/strategy/strategy.py,sha256=cXapkD5uDrt5C-RbmWDn9FLoap3Q41i7GKvbmfbC
|
|
|
261
253
|
flwr/server/superlink/__init__.py,sha256=8tHYCfodUlRD8PCP9fHgvu8cz5N31A2QoRVL0jDJ15E,707
|
|
262
254
|
flwr/server/superlink/driver/__init__.py,sha256=5soEK5QSvxNjmJQ-CGTWROc4alSAeU0e9Ad9RDhsd3E,717
|
|
263
255
|
flwr/server/superlink/driver/serverappio_grpc.py,sha256=oTogZLkfeThKdx9Q_bw6OMGHnLIryxQOHxbWi0qgaRM,2185
|
|
264
|
-
flwr/server/superlink/driver/serverappio_servicer.py,sha256=
|
|
256
|
+
flwr/server/superlink/driver/serverappio_servicer.py,sha256=nUQgQlxUfCYIvUW5NBq0ZysEL2cFoF2iQJIFabGodNE,10458
|
|
265
257
|
flwr/server/superlink/ffs/__init__.py,sha256=FAY-zShcfPmOxosok2QyT6hTNMNctG8cH9s_nIl8jkI,840
|
|
266
258
|
flwr/server/superlink/ffs/disk_ffs.py,sha256=yCN6CCzegnJIOaHr5nIu49wZQa4g5BByiSKshz50RKU,3296
|
|
267
259
|
flwr/server/superlink/ffs/ffs.py,sha256=qLI1UfosJugu2BKOJWqHIhafTm-YiuKqGf3OGWPH0NM,2395
|
|
@@ -321,8 +313,8 @@ flwr/superexec/exec_grpc.py,sha256=OuhBAk7hiky9rjGceinLGIXqchtzGPQThZnwyYv6Ei0,2
|
|
|
321
313
|
flwr/superexec/exec_servicer.py,sha256=M3R3q5rg2kYz-gFN-nmiXkvjels4QbieEA0K5wks0kQ,4972
|
|
322
314
|
flwr/superexec/executor.py,sha256=zH3_53il6Jh0ZscIVEB9f4GNnXMeBbCGyCoBCxLgiG0,3114
|
|
323
315
|
flwr/superexec/simulation.py,sha256=WQDon15oqpMopAZnwRZoTICYCfHqtkvFSqiTQ2hLD_g,4088
|
|
324
|
-
flwr_nightly-1.14.0.
|
|
325
|
-
flwr_nightly-1.14.0.
|
|
326
|
-
flwr_nightly-1.14.0.
|
|
327
|
-
flwr_nightly-1.14.0.
|
|
328
|
-
flwr_nightly-1.14.0.
|
|
316
|
+
flwr_nightly-1.14.0.dev20241204.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
317
|
+
flwr_nightly-1.14.0.dev20241204.dist-info/METADATA,sha256=JKj9ml38e8ierd6xHKY74h2jSsjXJ49CqYyoRCkdbPQ,15679
|
|
318
|
+
flwr_nightly-1.14.0.dev20241204.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
319
|
+
flwr_nightly-1.14.0.dev20241204.dist-info/entry_points.txt,sha256=JlNxX3qhaV18_2yj5a3kJW1ESxm31cal9iS_N_pf1Rk,538
|
|
320
|
+
flwr_nightly-1.14.0.dev20241204.dist-info/RECORD,,
|
flwr/proto/common_pb2.py
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# source: flwr/proto/common.proto
|
|
4
|
-
# Protobuf Python Version: 4.25.0
|
|
5
|
-
"""Generated protocol buffer code."""
|
|
6
|
-
from google.protobuf import descriptor as _descriptor
|
|
7
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
-
from google.protobuf.internal import builder as _builder
|
|
10
|
-
# @@protoc_insertion_point(imports)
|
|
11
|
-
|
|
12
|
-
_sym_db = _symbol_database.Default()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66lwr/proto/common.proto\x12\nflwr.proto\"\x1a\n\nDoubleList\x12\x0c\n\x04vals\x18\x01 \x03(\x01\"\x1a\n\nSint64List\x12\x0c\n\x04vals\x18\x01 \x03(\x12\"\x18\n\x08\x42oolList\x12\x0c\n\x04vals\x18\x01 \x03(\x08\"\x1a\n\nStringList\x12\x0c\n\x04vals\x18\x01 \x03(\t\"\x19\n\tBytesList\x12\x0c\n\x04vals\x18\x01 \x03(\x0c\"\xd9\x02\n\x12\x43onfigsRecordValue\x12\x10\n\x06\x64ouble\x18\x01 \x01(\x01H\x00\x12\x10\n\x06sint64\x18\x02 \x01(\x12H\x00\x12\x0e\n\x04\x62ool\x18\x03 \x01(\x08H\x00\x12\x10\n\x06string\x18\x04 \x01(\tH\x00\x12\x0f\n\x05\x62ytes\x18\x05 \x01(\x0cH\x00\x12-\n\x0b\x64ouble_list\x18\x15 \x01(\x0b\x32\x16.flwr.proto.DoubleListH\x00\x12-\n\x0bsint64_list\x18\x16 \x01(\x0b\x32\x16.flwr.proto.Sint64ListH\x00\x12)\n\tbool_list\x18\x17 \x01(\x0b\x32\x14.flwr.proto.BoolListH\x00\x12-\n\x0bstring_list\x18\x18 \x01(\x0b\x32\x16.flwr.proto.StringListH\x00\x12+\n\nbytes_list\x18\x19 \x01(\x0b\x32\x15.flwr.proto.BytesListH\x00\x42\x07\n\x05valueb\x06proto3')
|
|
18
|
-
|
|
19
|
-
_globals = globals()
|
|
20
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.common_pb2', _globals)
|
|
22
|
-
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
|
-
DESCRIPTOR._options = None
|
|
24
|
-
_globals['_DOUBLELIST']._serialized_start=39
|
|
25
|
-
_globals['_DOUBLELIST']._serialized_end=65
|
|
26
|
-
_globals['_SINT64LIST']._serialized_start=67
|
|
27
|
-
_globals['_SINT64LIST']._serialized_end=93
|
|
28
|
-
_globals['_BOOLLIST']._serialized_start=95
|
|
29
|
-
_globals['_BOOLLIST']._serialized_end=119
|
|
30
|
-
_globals['_STRINGLIST']._serialized_start=121
|
|
31
|
-
_globals['_STRINGLIST']._serialized_end=147
|
|
32
|
-
_globals['_BYTESLIST']._serialized_start=149
|
|
33
|
-
_globals['_BYTESLIST']._serialized_end=174
|
|
34
|
-
_globals['_CONFIGSRECORDVALUE']._serialized_start=177
|
|
35
|
-
_globals['_CONFIGSRECORDVALUE']._serialized_end=522
|
|
36
|
-
# @@protoc_insertion_point(module_scope)
|
flwr/proto/common_pb2.pyi
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
-
isort:skip_file
|
|
4
|
-
"""
|
|
5
|
-
import builtins
|
|
6
|
-
import google.protobuf.descriptor
|
|
7
|
-
import google.protobuf.internal.containers
|
|
8
|
-
import google.protobuf.message
|
|
9
|
-
import typing
|
|
10
|
-
import typing_extensions
|
|
11
|
-
|
|
12
|
-
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
13
|
-
|
|
14
|
-
class DoubleList(google.protobuf.message.Message):
|
|
15
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
-
VALS_FIELD_NUMBER: builtins.int
|
|
17
|
-
@property
|
|
18
|
-
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ...
|
|
19
|
-
def __init__(self,
|
|
20
|
-
*,
|
|
21
|
-
vals: typing.Optional[typing.Iterable[builtins.float]] = ...,
|
|
22
|
-
) -> None: ...
|
|
23
|
-
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
24
|
-
global___DoubleList = DoubleList
|
|
25
|
-
|
|
26
|
-
class Sint64List(google.protobuf.message.Message):
|
|
27
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
28
|
-
VALS_FIELD_NUMBER: builtins.int
|
|
29
|
-
@property
|
|
30
|
-
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
|
|
31
|
-
def __init__(self,
|
|
32
|
-
*,
|
|
33
|
-
vals: typing.Optional[typing.Iterable[builtins.int]] = ...,
|
|
34
|
-
) -> None: ...
|
|
35
|
-
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
36
|
-
global___Sint64List = Sint64List
|
|
37
|
-
|
|
38
|
-
class BoolList(google.protobuf.message.Message):
|
|
39
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
40
|
-
VALS_FIELD_NUMBER: builtins.int
|
|
41
|
-
@property
|
|
42
|
-
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bool]: ...
|
|
43
|
-
def __init__(self,
|
|
44
|
-
*,
|
|
45
|
-
vals: typing.Optional[typing.Iterable[builtins.bool]] = ...,
|
|
46
|
-
) -> None: ...
|
|
47
|
-
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
48
|
-
global___BoolList = BoolList
|
|
49
|
-
|
|
50
|
-
class StringList(google.protobuf.message.Message):
|
|
51
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
52
|
-
VALS_FIELD_NUMBER: builtins.int
|
|
53
|
-
@property
|
|
54
|
-
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
|
|
55
|
-
def __init__(self,
|
|
56
|
-
*,
|
|
57
|
-
vals: typing.Optional[typing.Iterable[typing.Text]] = ...,
|
|
58
|
-
) -> None: ...
|
|
59
|
-
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
60
|
-
global___StringList = StringList
|
|
61
|
-
|
|
62
|
-
class BytesList(google.protobuf.message.Message):
|
|
63
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
64
|
-
VALS_FIELD_NUMBER: builtins.int
|
|
65
|
-
@property
|
|
66
|
-
def vals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
|
|
67
|
-
def __init__(self,
|
|
68
|
-
*,
|
|
69
|
-
vals: typing.Optional[typing.Iterable[builtins.bytes]] = ...,
|
|
70
|
-
) -> None: ...
|
|
71
|
-
def ClearField(self, field_name: typing_extensions.Literal["vals",b"vals"]) -> None: ...
|
|
72
|
-
global___BytesList = BytesList
|
|
73
|
-
|
|
74
|
-
class ConfigsRecordValue(google.protobuf.message.Message):
|
|
75
|
-
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
76
|
-
DOUBLE_FIELD_NUMBER: builtins.int
|
|
77
|
-
SINT64_FIELD_NUMBER: builtins.int
|
|
78
|
-
BOOL_FIELD_NUMBER: builtins.int
|
|
79
|
-
STRING_FIELD_NUMBER: builtins.int
|
|
80
|
-
BYTES_FIELD_NUMBER: builtins.int
|
|
81
|
-
DOUBLE_LIST_FIELD_NUMBER: builtins.int
|
|
82
|
-
SINT64_LIST_FIELD_NUMBER: builtins.int
|
|
83
|
-
BOOL_LIST_FIELD_NUMBER: builtins.int
|
|
84
|
-
STRING_LIST_FIELD_NUMBER: builtins.int
|
|
85
|
-
BYTES_LIST_FIELD_NUMBER: builtins.int
|
|
86
|
-
double: builtins.float
|
|
87
|
-
"""Single element"""
|
|
88
|
-
|
|
89
|
-
sint64: builtins.int
|
|
90
|
-
bool: builtins.bool
|
|
91
|
-
string: typing.Text
|
|
92
|
-
bytes: builtins.bytes
|
|
93
|
-
@property
|
|
94
|
-
def double_list(self) -> global___DoubleList:
|
|
95
|
-
"""List types"""
|
|
96
|
-
pass
|
|
97
|
-
@property
|
|
98
|
-
def sint64_list(self) -> global___Sint64List: ...
|
|
99
|
-
@property
|
|
100
|
-
def bool_list(self) -> global___BoolList: ...
|
|
101
|
-
@property
|
|
102
|
-
def string_list(self) -> global___StringList: ...
|
|
103
|
-
@property
|
|
104
|
-
def bytes_list(self) -> global___BytesList: ...
|
|
105
|
-
def __init__(self,
|
|
106
|
-
*,
|
|
107
|
-
double: builtins.float = ...,
|
|
108
|
-
sint64: builtins.int = ...,
|
|
109
|
-
bool: builtins.bool = ...,
|
|
110
|
-
string: typing.Text = ...,
|
|
111
|
-
bytes: builtins.bytes = ...,
|
|
112
|
-
double_list: typing.Optional[global___DoubleList] = ...,
|
|
113
|
-
sint64_list: typing.Optional[global___Sint64List] = ...,
|
|
114
|
-
bool_list: typing.Optional[global___BoolList] = ...,
|
|
115
|
-
string_list: typing.Optional[global___StringList] = ...,
|
|
116
|
-
bytes_list: typing.Optional[global___BytesList] = ...,
|
|
117
|
-
) -> None: ...
|
|
118
|
-
def HasField(self, field_name: typing_extensions.Literal["bool",b"bool","bool_list",b"bool_list","bytes",b"bytes","bytes_list",b"bytes_list","double",b"double","double_list",b"double_list","sint64",b"sint64","sint64_list",b"sint64_list","string",b"string","string_list",b"string_list","value",b"value"]) -> builtins.bool: ...
|
|
119
|
-
def ClearField(self, field_name: typing_extensions.Literal["bool",b"bool","bool_list",b"bool_list","bytes",b"bytes","bytes_list",b"bytes_list","double",b"double","double_list",b"double_list","sint64",b"sint64","sint64_list",b"sint64_list","string",b"string","string_list",b"string_list","value",b"value"]) -> None: ...
|
|
120
|
-
def WhichOneof(self, oneof_group: typing_extensions.Literal["value",b"value"]) -> typing.Optional[typing_extensions.Literal["double","sint64","bool","string","bytes","double_list","sint64_list","bool_list","string_list","bytes_list"]]: ...
|
|
121
|
-
global___ConfigsRecordValue = ConfigsRecordValue
|
flwr/proto/common_pb2_grpc.py
DELETED
flwr/proto/common_pb2_grpc.pyi
DELETED
flwr/proto/control_pb2.py
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
-
# source: flwr/proto/control.proto
|
|
4
|
-
# Protobuf Python Version: 4.25.0
|
|
5
|
-
"""Generated protocol buffer code."""
|
|
6
|
-
from google.protobuf import descriptor as _descriptor
|
|
7
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
-
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
-
from google.protobuf.internal import builder as _builder
|
|
10
|
-
# @@protoc_insertion_point(imports)
|
|
11
|
-
|
|
12
|
-
_sym_db = _symbol_database.Default()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x66lwr/proto/control.proto\x12\nflwr.proto\x1a\x14\x66lwr/proto/run.proto2\x88\x02\n\x07\x43ontrol\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\x12S\n\x0cGetRunStatus\x12\x1f.flwr.proto.GetRunStatusRequest\x1a .flwr.proto.GetRunStatusResponse\"\x00\x12\\\n\x0fUpdateRunStatus\x12\".flwr.proto.UpdateRunStatusRequest\x1a#.flwr.proto.UpdateRunStatusResponse\"\x00\x62\x06proto3')
|
|
19
|
-
|
|
20
|
-
_globals = globals()
|
|
21
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
22
|
-
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.control_pb2', _globals)
|
|
23
|
-
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
-
DESCRIPTOR._options = None
|
|
25
|
-
_globals['_CONTROL']._serialized_start=63
|
|
26
|
-
_globals['_CONTROL']._serialized_end=327
|
|
27
|
-
# @@protoc_insertion_point(module_scope)
|
flwr/proto/control_pb2.pyi
DELETED
flwr/proto/control_pb2_grpc.py
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
-
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
-
import grpc
|
|
4
|
-
|
|
5
|
-
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class ControlStub(object):
|
|
9
|
-
"""Missing associated documentation comment in .proto file."""
|
|
10
|
-
|
|
11
|
-
def __init__(self, channel):
|
|
12
|
-
"""Constructor.
|
|
13
|
-
|
|
14
|
-
Args:
|
|
15
|
-
channel: A grpc.Channel.
|
|
16
|
-
"""
|
|
17
|
-
self.CreateRun = channel.unary_unary(
|
|
18
|
-
'/flwr.proto.Control/CreateRun',
|
|
19
|
-
request_serializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
|
|
20
|
-
response_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
|
|
21
|
-
)
|
|
22
|
-
self.GetRunStatus = channel.unary_unary(
|
|
23
|
-
'/flwr.proto.Control/GetRunStatus',
|
|
24
|
-
request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
|
|
25
|
-
response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
26
|
-
)
|
|
27
|
-
self.UpdateRunStatus = channel.unary_unary(
|
|
28
|
-
'/flwr.proto.Control/UpdateRunStatus',
|
|
29
|
-
request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
|
|
30
|
-
response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class ControlServicer(object):
|
|
35
|
-
"""Missing associated documentation comment in .proto file."""
|
|
36
|
-
|
|
37
|
-
def CreateRun(self, request, context):
|
|
38
|
-
"""Request to create a new run
|
|
39
|
-
"""
|
|
40
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
41
|
-
context.set_details('Method not implemented!')
|
|
42
|
-
raise NotImplementedError('Method not implemented!')
|
|
43
|
-
|
|
44
|
-
def GetRunStatus(self, request, context):
|
|
45
|
-
"""Get the status of a given run
|
|
46
|
-
"""
|
|
47
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
48
|
-
context.set_details('Method not implemented!')
|
|
49
|
-
raise NotImplementedError('Method not implemented!')
|
|
50
|
-
|
|
51
|
-
def UpdateRunStatus(self, request, context):
|
|
52
|
-
"""Update the status of a given run
|
|
53
|
-
"""
|
|
54
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
55
|
-
context.set_details('Method not implemented!')
|
|
56
|
-
raise NotImplementedError('Method not implemented!')
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def add_ControlServicer_to_server(servicer, server):
|
|
60
|
-
rpc_method_handlers = {
|
|
61
|
-
'CreateRun': grpc.unary_unary_rpc_method_handler(
|
|
62
|
-
servicer.CreateRun,
|
|
63
|
-
request_deserializer=flwr_dot_proto_dot_run__pb2.CreateRunRequest.FromString,
|
|
64
|
-
response_serializer=flwr_dot_proto_dot_run__pb2.CreateRunResponse.SerializeToString,
|
|
65
|
-
),
|
|
66
|
-
'GetRunStatus': grpc.unary_unary_rpc_method_handler(
|
|
67
|
-
servicer.GetRunStatus,
|
|
68
|
-
request_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.FromString,
|
|
69
|
-
response_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.SerializeToString,
|
|
70
|
-
),
|
|
71
|
-
'UpdateRunStatus': grpc.unary_unary_rpc_method_handler(
|
|
72
|
-
servicer.UpdateRunStatus,
|
|
73
|
-
request_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.FromString,
|
|
74
|
-
response_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.SerializeToString,
|
|
75
|
-
),
|
|
76
|
-
}
|
|
77
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
78
|
-
'flwr.proto.Control', rpc_method_handlers)
|
|
79
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
# This class is part of an EXPERIMENTAL API.
|
|
83
|
-
class Control(object):
|
|
84
|
-
"""Missing associated documentation comment in .proto file."""
|
|
85
|
-
|
|
86
|
-
@staticmethod
|
|
87
|
-
def CreateRun(request,
|
|
88
|
-
target,
|
|
89
|
-
options=(),
|
|
90
|
-
channel_credentials=None,
|
|
91
|
-
call_credentials=None,
|
|
92
|
-
insecure=False,
|
|
93
|
-
compression=None,
|
|
94
|
-
wait_for_ready=None,
|
|
95
|
-
timeout=None,
|
|
96
|
-
metadata=None):
|
|
97
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Control/CreateRun',
|
|
98
|
-
flwr_dot_proto_dot_run__pb2.CreateRunRequest.SerializeToString,
|
|
99
|
-
flwr_dot_proto_dot_run__pb2.CreateRunResponse.FromString,
|
|
100
|
-
options, channel_credentials,
|
|
101
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
102
|
-
|
|
103
|
-
@staticmethod
|
|
104
|
-
def GetRunStatus(request,
|
|
105
|
-
target,
|
|
106
|
-
options=(),
|
|
107
|
-
channel_credentials=None,
|
|
108
|
-
call_credentials=None,
|
|
109
|
-
insecure=False,
|
|
110
|
-
compression=None,
|
|
111
|
-
wait_for_ready=None,
|
|
112
|
-
timeout=None,
|
|
113
|
-
metadata=None):
|
|
114
|
-
return grpc.experimental.unary_unary(request, target, '/flwr.proto.Control/GetRunStatus',
|
|
115
|
-
flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
|
|
116
|
-
flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
|
|
117
|
-
options, channel_credentials,
|
|
118
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
119
|
-
|
|
120
|
-
@staticmethod
|
|
121
|
-
def UpdateRunStatus(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.Control/UpdateRunStatus',
|
|
132
|
-
flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
|
|
133
|
-
flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
|
|
134
|
-
options, channel_credentials,
|
|
135
|
-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
flwr/proto/control_pb2_grpc.pyi
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
@generated by mypy-protobuf. Do not edit manually!
|
|
3
|
-
isort:skip_file
|
|
4
|
-
"""
|
|
5
|
-
import abc
|
|
6
|
-
import flwr.proto.run_pb2
|
|
7
|
-
import grpc
|
|
8
|
-
|
|
9
|
-
class ControlStub:
|
|
10
|
-
def __init__(self, channel: grpc.Channel) -> None: ...
|
|
11
|
-
CreateRun: grpc.UnaryUnaryMultiCallable[
|
|
12
|
-
flwr.proto.run_pb2.CreateRunRequest,
|
|
13
|
-
flwr.proto.run_pb2.CreateRunResponse]
|
|
14
|
-
"""Request to create a new run"""
|
|
15
|
-
|
|
16
|
-
GetRunStatus: grpc.UnaryUnaryMultiCallable[
|
|
17
|
-
flwr.proto.run_pb2.GetRunStatusRequest,
|
|
18
|
-
flwr.proto.run_pb2.GetRunStatusResponse]
|
|
19
|
-
"""Get the status of a given run"""
|
|
20
|
-
|
|
21
|
-
UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
|
|
22
|
-
flwr.proto.run_pb2.UpdateRunStatusRequest,
|
|
23
|
-
flwr.proto.run_pb2.UpdateRunStatusResponse]
|
|
24
|
-
"""Update the status of a given run"""
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class ControlServicer(metaclass=abc.ABCMeta):
|
|
28
|
-
@abc.abstractmethod
|
|
29
|
-
def CreateRun(self,
|
|
30
|
-
request: flwr.proto.run_pb2.CreateRunRequest,
|
|
31
|
-
context: grpc.ServicerContext,
|
|
32
|
-
) -> flwr.proto.run_pb2.CreateRunResponse:
|
|
33
|
-
"""Request to create a new run"""
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
@abc.abstractmethod
|
|
37
|
-
def GetRunStatus(self,
|
|
38
|
-
request: flwr.proto.run_pb2.GetRunStatusRequest,
|
|
39
|
-
context: grpc.ServicerContext,
|
|
40
|
-
) -> flwr.proto.run_pb2.GetRunStatusResponse:
|
|
41
|
-
"""Get the status of a given run"""
|
|
42
|
-
pass
|
|
43
|
-
|
|
44
|
-
@abc.abstractmethod
|
|
45
|
-
def UpdateRunStatus(self,
|
|
46
|
-
request: flwr.proto.run_pb2.UpdateRunStatusRequest,
|
|
47
|
-
context: grpc.ServicerContext,
|
|
48
|
-
) -> flwr.proto.run_pb2.UpdateRunStatusResponse:
|
|
49
|
-
"""Update the status of a given run"""
|
|
50
|
-
pass
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def add_ControlServicer_to_server(servicer: ControlServicer, server: grpc.Server) -> None: ...
|
{flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/LICENSE
RENAMED
|
File without changes
|
{flwr_nightly-1.14.0.dev20241130.dist-info → flwr_nightly-1.14.0.dev20241204.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|