flwr-nightly 1.10.0.dev20240707__py3-none-any.whl → 1.10.0.dev20240709__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/client/app.py +9 -6
- flwr/client/grpc_adapter_client/connection.py +2 -1
- flwr/client/grpc_client/connection.py +2 -1
- flwr/client/grpc_rere_client/connection.py +9 -3
- flwr/client/node_state.py +1 -1
- flwr/client/rest_client/connection.py +10 -4
- flwr/common/config.py +75 -2
- flwr/common/context.py +14 -3
- flwr/common/typing.py +1 -0
- flwr/proto/common_pb2.py +24 -0
- flwr/proto/common_pb2.pyi +7 -0
- flwr/proto/common_pb2_grpc.py +4 -0
- flwr/proto/common_pb2_grpc.pyi +4 -0
- flwr/proto/driver_pb2.py +23 -19
- flwr/proto/driver_pb2.pyi +18 -1
- flwr/proto/exec_pb2.py +15 -11
- flwr/proto/exec_pb2.pyi +19 -1
- flwr/proto/run_pb2.py +11 -7
- flwr/proto/run_pb2.pyi +19 -1
- flwr/server/compat/legacy_context.py +1 -1
- flwr/server/driver/grpc_driver.py +77 -139
- flwr/server/run_serverapp.py +37 -15
- flwr/server/server_app.py +1 -1
- flwr/server/superlink/driver/driver_servicer.py +5 -1
- flwr/server/superlink/state/in_memory_state.py +10 -2
- flwr/server/superlink/state/sqlite_state.py +22 -7
- flwr/server/superlink/state/state.py +7 -2
- flwr/simulation/run_simulation.py +1 -1
- flwr/superexec/app.py +1 -0
- flwr/superexec/deployment.py +16 -5
- flwr/superexec/exec_servicer.py +4 -1
- flwr/superexec/executor.py +2 -3
- {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240709.dist-info}/METADATA +1 -1
- {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240709.dist-info}/RECORD +37 -33
- {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240709.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240709.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240709.dist-info}/entry_points.txt +0 -0
flwr/client/app.py
CHANGED
|
@@ -41,6 +41,7 @@ from flwr.common.constant import (
|
|
|
41
41
|
from flwr.common.logger import log, warn_deprecated_feature
|
|
42
42
|
from flwr.common.message import Error
|
|
43
43
|
from flwr.common.retry_invoker import RetryInvoker, RetryState, exponential
|
|
44
|
+
from flwr.common.typing import Run
|
|
44
45
|
|
|
45
46
|
from .grpc_adapter_client.connection import grpc_adapter
|
|
46
47
|
from .grpc_client.connection import grpc_connection
|
|
@@ -235,7 +236,7 @@ def _start_client_internal(
|
|
|
235
236
|
The maximum duration before the client stops trying to
|
|
236
237
|
connect to the server in case of connection error.
|
|
237
238
|
If set to None, there is no limit to the total time.
|
|
238
|
-
|
|
239
|
+
partition_id: Optional[int] (default: None)
|
|
239
240
|
The data partition index associated with this node. Better suited for
|
|
240
241
|
prototyping purposes.
|
|
241
242
|
"""
|
|
@@ -315,8 +316,7 @@ def _start_client_internal(
|
|
|
315
316
|
)
|
|
316
317
|
|
|
317
318
|
node_state = NodeState(partition_id=partition_id)
|
|
318
|
-
|
|
319
|
-
run_info: Dict[int, Tuple[str, str]] = {}
|
|
319
|
+
run_info: Dict[int, Run] = {}
|
|
320
320
|
|
|
321
321
|
while not app_state_tracker.interrupt:
|
|
322
322
|
sleep_duration: int = 0
|
|
@@ -371,7 +371,7 @@ def _start_client_internal(
|
|
|
371
371
|
run_info[run_id] = get_run(run_id)
|
|
372
372
|
# If get_run is None, i.e., in grpc-bidi mode
|
|
373
373
|
else:
|
|
374
|
-
run_info[run_id] = ("", "")
|
|
374
|
+
run_info[run_id] = Run(run_id, "", "", {})
|
|
375
375
|
|
|
376
376
|
# Register context for this run
|
|
377
377
|
node_state.register_context(run_id=run_id)
|
|
@@ -388,7 +388,10 @@ def _start_client_internal(
|
|
|
388
388
|
# Handle app loading and task message
|
|
389
389
|
try:
|
|
390
390
|
# Load ClientApp instance
|
|
391
|
-
|
|
391
|
+
run: Run = run_info[run_id]
|
|
392
|
+
client_app: ClientApp = load_client_app_fn(
|
|
393
|
+
run.fab_id, run.fab_version
|
|
394
|
+
)
|
|
392
395
|
|
|
393
396
|
# Execute ClientApp
|
|
394
397
|
reply_message = client_app(message=message, context=context)
|
|
@@ -573,7 +576,7 @@ def _init_connection(transport: Optional[str], server_address: str) -> Tuple[
|
|
|
573
576
|
Callable[[Message], None],
|
|
574
577
|
Optional[Callable[[], None]],
|
|
575
578
|
Optional[Callable[[], None]],
|
|
576
|
-
Optional[Callable[[int],
|
|
579
|
+
Optional[Callable[[int], Run]],
|
|
577
580
|
]
|
|
578
581
|
],
|
|
579
582
|
],
|
|
@@ -27,6 +27,7 @@ from flwr.common import GRPC_MAX_MESSAGE_LENGTH
|
|
|
27
27
|
from flwr.common.logger import log
|
|
28
28
|
from flwr.common.message import Message
|
|
29
29
|
from flwr.common.retry_invoker import RetryInvoker
|
|
30
|
+
from flwr.common.typing import Run
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
@contextmanager
|
|
@@ -45,7 +46,7 @@ def grpc_adapter( # pylint: disable=R0913
|
|
|
45
46
|
Callable[[Message], None],
|
|
46
47
|
Optional[Callable[[], None]],
|
|
47
48
|
Optional[Callable[[], None]],
|
|
48
|
-
Optional[Callable[[int],
|
|
49
|
+
Optional[Callable[[int], Run]],
|
|
49
50
|
]
|
|
50
51
|
]:
|
|
51
52
|
"""Primitives for request/response-based interaction with a server via GrpcAdapter.
|
|
@@ -38,6 +38,7 @@ from flwr.common.constant import MessageType, MessageTypeLegacy
|
|
|
38
38
|
from flwr.common.grpc import create_channel
|
|
39
39
|
from flwr.common.logger import log
|
|
40
40
|
from flwr.common.retry_invoker import RetryInvoker
|
|
41
|
+
from flwr.common.typing import Run
|
|
41
42
|
from flwr.proto.transport_pb2 import ( # pylint: disable=E0611
|
|
42
43
|
ClientMessage,
|
|
43
44
|
Reason,
|
|
@@ -73,7 +74,7 @@ def grpc_connection( # pylint: disable=R0913, R0915
|
|
|
73
74
|
Callable[[Message], None],
|
|
74
75
|
Optional[Callable[[], None]],
|
|
75
76
|
Optional[Callable[[], None]],
|
|
76
|
-
Optional[Callable[[int],
|
|
77
|
+
Optional[Callable[[int], Run]],
|
|
77
78
|
]
|
|
78
79
|
]:
|
|
79
80
|
"""Establish a gRPC connection to a gRPC server.
|
|
@@ -41,6 +41,7 @@ from flwr.common.logger import log
|
|
|
41
41
|
from flwr.common.message import Message, Metadata
|
|
42
42
|
from flwr.common.retry_invoker import RetryInvoker
|
|
43
43
|
from flwr.common.serde import message_from_taskins, message_to_taskres
|
|
44
|
+
from flwr.common.typing import Run
|
|
44
45
|
from flwr.proto.fleet_pb2 import ( # pylint: disable=E0611
|
|
45
46
|
CreateNodeRequest,
|
|
46
47
|
DeleteNodeRequest,
|
|
@@ -80,7 +81,7 @@ def grpc_request_response( # pylint: disable=R0913, R0914, R0915
|
|
|
80
81
|
Callable[[Message], None],
|
|
81
82
|
Optional[Callable[[], None]],
|
|
82
83
|
Optional[Callable[[], None]],
|
|
83
|
-
Optional[Callable[[int],
|
|
84
|
+
Optional[Callable[[int], Run]],
|
|
84
85
|
]
|
|
85
86
|
]:
|
|
86
87
|
"""Primitives for request/response-based interaction with a server.
|
|
@@ -266,7 +267,7 @@ def grpc_request_response( # pylint: disable=R0913, R0914, R0915
|
|
|
266
267
|
# Cleanup
|
|
267
268
|
metadata = None
|
|
268
269
|
|
|
269
|
-
def get_run(run_id: int) ->
|
|
270
|
+
def get_run(run_id: int) -> Run:
|
|
270
271
|
# Call FleetAPI
|
|
271
272
|
get_run_request = GetRunRequest(run_id=run_id)
|
|
272
273
|
get_run_response: GetRunResponse = retry_invoker.invoke(
|
|
@@ -275,7 +276,12 @@ def grpc_request_response( # pylint: disable=R0913, R0914, R0915
|
|
|
275
276
|
)
|
|
276
277
|
|
|
277
278
|
# Return fab_id and fab_version
|
|
278
|
-
return
|
|
279
|
+
return Run(
|
|
280
|
+
run_id,
|
|
281
|
+
get_run_response.run.fab_id,
|
|
282
|
+
get_run_response.run.fab_version,
|
|
283
|
+
dict(get_run_response.run.override_config.items()),
|
|
284
|
+
)
|
|
279
285
|
|
|
280
286
|
try:
|
|
281
287
|
# Yield methods
|
flwr/client/node_state.py
CHANGED
|
@@ -32,7 +32,7 @@ class NodeState:
|
|
|
32
32
|
"""Register new run context for this node."""
|
|
33
33
|
if run_id not in self.run_contexts:
|
|
34
34
|
self.run_contexts[run_id] = Context(
|
|
35
|
-
state=RecordSet(), partition_id=self._partition_id
|
|
35
|
+
state=RecordSet(), run_config={}, partition_id=self._partition_id
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
def retrieve_context(self, run_id: int) -> Context:
|
|
@@ -41,6 +41,7 @@ from flwr.common.logger import log
|
|
|
41
41
|
from flwr.common.message import Message, Metadata
|
|
42
42
|
from flwr.common.retry_invoker import RetryInvoker
|
|
43
43
|
from flwr.common.serde import message_from_taskins, message_to_taskres
|
|
44
|
+
from flwr.common.typing import Run
|
|
44
45
|
from flwr.proto.fleet_pb2 import ( # pylint: disable=E0611
|
|
45
46
|
CreateNodeRequest,
|
|
46
47
|
CreateNodeResponse,
|
|
@@ -91,7 +92,7 @@ def http_request_response( # pylint: disable=,R0913, R0914, R0915
|
|
|
91
92
|
Callable[[Message], None],
|
|
92
93
|
Optional[Callable[[], None]],
|
|
93
94
|
Optional[Callable[[], None]],
|
|
94
|
-
Optional[Callable[[int],
|
|
95
|
+
Optional[Callable[[int], Run]],
|
|
95
96
|
]
|
|
96
97
|
]:
|
|
97
98
|
"""Primitives for request/response-based interaction with a server.
|
|
@@ -344,16 +345,21 @@ def http_request_response( # pylint: disable=,R0913, R0914, R0915
|
|
|
344
345
|
res.results, # pylint: disable=no-member
|
|
345
346
|
)
|
|
346
347
|
|
|
347
|
-
def get_run(run_id: int) ->
|
|
348
|
+
def get_run(run_id: int) -> Run:
|
|
348
349
|
# Construct the request
|
|
349
350
|
req = GetRunRequest(run_id=run_id)
|
|
350
351
|
|
|
351
352
|
# Send the request
|
|
352
353
|
res = _request(req, GetRunResponse, PATH_GET_RUN)
|
|
353
354
|
if res is None:
|
|
354
|
-
return "", ""
|
|
355
|
+
return Run(run_id, "", "", {})
|
|
355
356
|
|
|
356
|
-
return
|
|
357
|
+
return Run(
|
|
358
|
+
run_id,
|
|
359
|
+
res.run.fab_id,
|
|
360
|
+
res.run.fab_version,
|
|
361
|
+
dict(res.run.override_config.items()),
|
|
362
|
+
)
|
|
357
363
|
|
|
358
364
|
try:
|
|
359
365
|
# Yield methods
|
flwr/common/config.py
CHANGED
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
|
|
17
17
|
import os
|
|
18
18
|
from pathlib import Path
|
|
19
|
-
from typing import Any, Dict, Optional, Union
|
|
19
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
20
20
|
|
|
21
21
|
import tomli
|
|
22
22
|
|
|
23
23
|
from flwr.cli.config_utils import validate_fields
|
|
24
24
|
from flwr.common.constant import APP_DIR, FAB_CONFIG_FILE, FLWR_HOME
|
|
25
|
+
from flwr.common.typing import Run
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
def get_flwr_dir(provided_path: Optional[str] = None) -> Path:
|
|
@@ -30,7 +31,7 @@ def get_flwr_dir(provided_path: Optional[str] = None) -> Path:
|
|
|
30
31
|
return Path(
|
|
31
32
|
os.getenv(
|
|
32
33
|
FLWR_HOME,
|
|
33
|
-
f"{os.getenv('XDG_DATA_HOME', os.getenv('HOME'))}
|
|
34
|
+
Path(f"{os.getenv('XDG_DATA_HOME', os.getenv('HOME'))}") / ".flwr",
|
|
34
35
|
)
|
|
35
36
|
)
|
|
36
37
|
return Path(provided_path).absolute()
|
|
@@ -71,3 +72,75 @@ def get_project_config(project_dir: Union[str, Path]) -> Dict[str, Any]:
|
|
|
71
72
|
)
|
|
72
73
|
|
|
73
74
|
return config
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _fuse_dicts(
|
|
78
|
+
main_dict: Dict[str, str], override_dict: Dict[str, str]
|
|
79
|
+
) -> Dict[str, str]:
|
|
80
|
+
fused_dict = main_dict.copy()
|
|
81
|
+
|
|
82
|
+
for key, value in override_dict.items():
|
|
83
|
+
if key in main_dict:
|
|
84
|
+
fused_dict[key] = value
|
|
85
|
+
|
|
86
|
+
return fused_dict
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def get_fused_config(run: Run, flwr_dir: Optional[Path]) -> Dict[str, str]:
|
|
90
|
+
"""Merge the overrides from a `Run` with the config from a FAB.
|
|
91
|
+
|
|
92
|
+
Get the config using the fab_id and the fab_version, remove the nesting by adding
|
|
93
|
+
the nested keys as prefixes separated by dots, and fuse it with the override dict.
|
|
94
|
+
"""
|
|
95
|
+
if not run.fab_id or not run.fab_version:
|
|
96
|
+
return {}
|
|
97
|
+
|
|
98
|
+
project_dir = get_project_dir(run.fab_id, run.fab_version, flwr_dir)
|
|
99
|
+
|
|
100
|
+
default_config = get_project_config(project_dir)["flower"].get("config", {})
|
|
101
|
+
flat_default_config = flatten_dict(default_config)
|
|
102
|
+
|
|
103
|
+
return _fuse_dicts(flat_default_config, run.override_config)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def flatten_dict(raw_dict: Dict[str, Any], parent_key: str = "") -> Dict[str, str]:
|
|
107
|
+
"""Flatten dict by joining nested keys with a given separator."""
|
|
108
|
+
items: List[Tuple[str, str]] = []
|
|
109
|
+
separator: str = "."
|
|
110
|
+
for k, v in raw_dict.items():
|
|
111
|
+
new_key = f"{parent_key}{separator}{k}" if parent_key else k
|
|
112
|
+
if isinstance(v, dict):
|
|
113
|
+
items.extend(flatten_dict(v, parent_key=new_key).items())
|
|
114
|
+
elif isinstance(v, str):
|
|
115
|
+
items.append((new_key, v))
|
|
116
|
+
else:
|
|
117
|
+
raise ValueError(
|
|
118
|
+
f"The value for key {k} needs to be a `str` or a `dict`.",
|
|
119
|
+
)
|
|
120
|
+
return dict(items)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def parse_config_args(
|
|
124
|
+
config_overrides: Optional[str],
|
|
125
|
+
separator: str = ",",
|
|
126
|
+
) -> Dict[str, str]:
|
|
127
|
+
"""Parse separator separated list of key-value pairs separated by '='."""
|
|
128
|
+
overrides: Dict[str, str] = {}
|
|
129
|
+
|
|
130
|
+
if config_overrides is None:
|
|
131
|
+
return overrides
|
|
132
|
+
|
|
133
|
+
overrides_list = config_overrides.split(separator)
|
|
134
|
+
if (
|
|
135
|
+
len(overrides_list) == 1
|
|
136
|
+
and "=" not in overrides_list
|
|
137
|
+
and overrides_list[0].endswith(".toml")
|
|
138
|
+
):
|
|
139
|
+
with Path(overrides_list[0]).open("rb") as config_file:
|
|
140
|
+
overrides = flatten_dict(tomli.load(config_file))
|
|
141
|
+
else:
|
|
142
|
+
for kv_pair in overrides_list:
|
|
143
|
+
key, value = kv_pair.split("=")
|
|
144
|
+
overrides[key] = value
|
|
145
|
+
|
|
146
|
+
return overrides
|
flwr/common/context.py
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
from dataclasses import dataclass
|
|
19
|
-
from typing import Optional
|
|
19
|
+
from typing import Dict, Optional
|
|
20
20
|
|
|
21
21
|
from .record import RecordSet
|
|
22
22
|
|
|
@@ -34,6 +34,10 @@ class Context:
|
|
|
34
34
|
executing mods. It can also be used as a memory to access
|
|
35
35
|
at different points during the lifecycle of this entity (e.g. across
|
|
36
36
|
multiple rounds)
|
|
37
|
+
run_config : Dict[str, str]
|
|
38
|
+
A config (key/value mapping) held by the entity in a given run and that will
|
|
39
|
+
stay local. It can be used at any point during the lifecycle of this entity
|
|
40
|
+
(e.g. across multiple rounds)
|
|
37
41
|
partition_id : Optional[int] (default: None)
|
|
38
42
|
An index that specifies the data partition that the ClientApp using this Context
|
|
39
43
|
object should make use of. Setting this attribute is better suited for
|
|
@@ -42,7 +46,14 @@ class Context:
|
|
|
42
46
|
|
|
43
47
|
state: RecordSet
|
|
44
48
|
partition_id: Optional[int]
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
run_config: Dict[str, str]
|
|
50
|
+
|
|
51
|
+
def __init__(
|
|
52
|
+
self,
|
|
53
|
+
state: RecordSet,
|
|
54
|
+
run_config: Dict[str, str],
|
|
55
|
+
partition_id: Optional[int] = None,
|
|
56
|
+
) -> None:
|
|
47
57
|
self.state = state
|
|
58
|
+
self.run_config = run_config
|
|
48
59
|
self.partition_id = partition_id
|
flwr/common/typing.py
CHANGED
flwr/proto/common_pb2.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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.protob\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
|
+
# @@protoc_insertion_point(module_scope)
|
flwr/proto/driver_pb2.py
CHANGED
|
@@ -17,29 +17,33 @@ from flwr.proto import task_pb2 as flwr_dot_proto_dot_task__pb2
|
|
|
17
17
|
from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66lwr/proto/driver.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\x1a\x14\x66lwr/proto/run.proto\"
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66lwr/proto/driver.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\x1a\x14\x66lwr/proto/run.proto\"\xb9\x01\n\x10\x43reateRunRequest\x12\x0e\n\x06\x66\x61\x62_id\x18\x01 \x01(\t\x12\x13\n\x0b\x66\x61\x62_version\x18\x02 \x01(\t\x12I\n\x0foverride_config\x18\x03 \x03(\x0b\x32\x30.flwr.proto.CreateRunRequest.OverrideConfigEntry\x1a\x35\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"#\n\x11\x43reateRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"@\n\x12PushTaskInsRequest\x12*\n\rtask_ins_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"\'\n\x13PushTaskInsResponse\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"F\n\x12PullTaskResRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"A\n\x13PullTaskResResponse\x12*\n\rtask_res_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskRes2\x84\x03\n\x06\x44river\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\x12G\n\x08GetNodes\x12\x1b.flwr.proto.GetNodesRequest\x1a\x1c.flwr.proto.GetNodesResponse\"\x00\x12P\n\x0bPushTaskIns\x12\x1e.flwr.proto.PushTaskInsRequest\x1a\x1f.flwr.proto.PushTaskInsResponse\"\x00\x12P\n\x0bPullTaskRes\x12\x1e.flwr.proto.PullTaskResRequest\x1a\x1f.flwr.proto.PullTaskResResponse\"\x00\x12\x41\n\x06GetRun\x12\x19.flwr.proto.GetRunRequest\x1a\x1a.flwr.proto.GetRunResponse\"\x00\x62\x06proto3')
|
|
21
21
|
|
|
22
22
|
_globals = globals()
|
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
24
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.driver_pb2', _globals)
|
|
25
25
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
26
|
DESCRIPTOR._options = None
|
|
27
|
-
_globals['
|
|
28
|
-
_globals['
|
|
29
|
-
_globals['
|
|
30
|
-
_globals['
|
|
31
|
-
_globals['
|
|
32
|
-
_globals['
|
|
33
|
-
_globals['
|
|
34
|
-
_globals['
|
|
35
|
-
_globals['
|
|
36
|
-
_globals['
|
|
37
|
-
_globals['
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
44
|
-
_globals['
|
|
27
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._options = None
|
|
28
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
29
|
+
_globals['_CREATERUNREQUEST']._serialized_start=108
|
|
30
|
+
_globals['_CREATERUNREQUEST']._serialized_end=293
|
|
31
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=240
|
|
32
|
+
_globals['_CREATERUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=293
|
|
33
|
+
_globals['_CREATERUNRESPONSE']._serialized_start=295
|
|
34
|
+
_globals['_CREATERUNRESPONSE']._serialized_end=330
|
|
35
|
+
_globals['_GETNODESREQUEST']._serialized_start=332
|
|
36
|
+
_globals['_GETNODESREQUEST']._serialized_end=365
|
|
37
|
+
_globals['_GETNODESRESPONSE']._serialized_start=367
|
|
38
|
+
_globals['_GETNODESRESPONSE']._serialized_end=418
|
|
39
|
+
_globals['_PUSHTASKINSREQUEST']._serialized_start=420
|
|
40
|
+
_globals['_PUSHTASKINSREQUEST']._serialized_end=484
|
|
41
|
+
_globals['_PUSHTASKINSRESPONSE']._serialized_start=486
|
|
42
|
+
_globals['_PUSHTASKINSRESPONSE']._serialized_end=525
|
|
43
|
+
_globals['_PULLTASKRESREQUEST']._serialized_start=527
|
|
44
|
+
_globals['_PULLTASKRESREQUEST']._serialized_end=597
|
|
45
|
+
_globals['_PULLTASKRESRESPONSE']._serialized_start=599
|
|
46
|
+
_globals['_PULLTASKRESRESPONSE']._serialized_end=664
|
|
47
|
+
_globals['_DRIVER']._serialized_start=667
|
|
48
|
+
_globals['_DRIVER']._serialized_end=1055
|
|
45
49
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/driver_pb2.pyi
CHANGED
|
@@ -16,16 +16,33 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
|
16
16
|
class CreateRunRequest(google.protobuf.message.Message):
|
|
17
17
|
"""CreateRun"""
|
|
18
18
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
19
|
+
class OverrideConfigEntry(google.protobuf.message.Message):
|
|
20
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
21
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
22
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
23
|
+
key: typing.Text
|
|
24
|
+
value: typing.Text
|
|
25
|
+
def __init__(self,
|
|
26
|
+
*,
|
|
27
|
+
key: typing.Text = ...,
|
|
28
|
+
value: typing.Text = ...,
|
|
29
|
+
) -> None: ...
|
|
30
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
31
|
+
|
|
19
32
|
FAB_ID_FIELD_NUMBER: builtins.int
|
|
20
33
|
FAB_VERSION_FIELD_NUMBER: builtins.int
|
|
34
|
+
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
|
21
35
|
fab_id: typing.Text
|
|
22
36
|
fab_version: typing.Text
|
|
37
|
+
@property
|
|
38
|
+
def override_config(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
23
39
|
def __init__(self,
|
|
24
40
|
*,
|
|
25
41
|
fab_id: typing.Text = ...,
|
|
26
42
|
fab_version: typing.Text = ...,
|
|
43
|
+
override_config: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
27
44
|
) -> None: ...
|
|
28
|
-
def ClearField(self, field_name: typing_extensions.Literal["fab_id",b"fab_id","fab_version",b"fab_version"]) -> None: ...
|
|
45
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab_id",b"fab_id","fab_version",b"fab_version","override_config",b"override_config"]) -> None: ...
|
|
29
46
|
global___CreateRunRequest = CreateRunRequest
|
|
30
47
|
|
|
31
48
|
class CreateRunResponse(google.protobuf.message.Message):
|
flwr/proto/exec_pb2.py
CHANGED
|
@@ -14,21 +14,25 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/exec.proto\x12\nflwr.proto\"
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/exec.proto\x12\nflwr.proto\"\xa4\x01\n\x0fStartRunRequest\x12\x10\n\x08\x66\x61\x62_file\x18\x01 \x01(\x0c\x12H\n\x0foverride_config\x18\x02 \x03(\x0b\x32/.flwr.proto.StartRunRequest.OverrideConfigEntry\x1a\x35\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\"\n\x10StartRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"#\n\x11StreamLogsRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"(\n\x12StreamLogsResponse\x12\x12\n\nlog_output\x18\x01 \x01(\t2\xa0\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\x62\x06proto3')
|
|
18
18
|
|
|
19
19
|
_globals = globals()
|
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
21
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.exec_pb2', _globals)
|
|
22
22
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
23
|
DESCRIPTOR._options = None
|
|
24
|
-
_globals['
|
|
25
|
-
_globals['
|
|
26
|
-
_globals['
|
|
27
|
-
_globals['
|
|
28
|
-
_globals['
|
|
29
|
-
_globals['
|
|
30
|
-
_globals['
|
|
31
|
-
_globals['
|
|
32
|
-
_globals['
|
|
33
|
-
_globals['
|
|
24
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._options = None
|
|
25
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
26
|
+
_globals['_STARTRUNREQUEST']._serialized_start=38
|
|
27
|
+
_globals['_STARTRUNREQUEST']._serialized_end=202
|
|
28
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_start=149
|
|
29
|
+
_globals['_STARTRUNREQUEST_OVERRIDECONFIGENTRY']._serialized_end=202
|
|
30
|
+
_globals['_STARTRUNRESPONSE']._serialized_start=204
|
|
31
|
+
_globals['_STARTRUNRESPONSE']._serialized_end=238
|
|
32
|
+
_globals['_STREAMLOGSREQUEST']._serialized_start=240
|
|
33
|
+
_globals['_STREAMLOGSREQUEST']._serialized_end=275
|
|
34
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_start=277
|
|
35
|
+
_globals['_STREAMLOGSRESPONSE']._serialized_end=317
|
|
36
|
+
_globals['_EXEC']._serialized_start=320
|
|
37
|
+
_globals['_EXEC']._serialized_end=480
|
|
34
38
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/exec_pb2.pyi
CHANGED
|
@@ -4,6 +4,7 @@ isort:skip_file
|
|
|
4
4
|
"""
|
|
5
5
|
import builtins
|
|
6
6
|
import google.protobuf.descriptor
|
|
7
|
+
import google.protobuf.internal.containers
|
|
7
8
|
import google.protobuf.message
|
|
8
9
|
import typing
|
|
9
10
|
import typing_extensions
|
|
@@ -12,13 +13,30 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
|
12
13
|
|
|
13
14
|
class StartRunRequest(google.protobuf.message.Message):
|
|
14
15
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
+
class OverrideConfigEntry(google.protobuf.message.Message):
|
|
17
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
18
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
19
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
20
|
+
key: typing.Text
|
|
21
|
+
value: typing.Text
|
|
22
|
+
def __init__(self,
|
|
23
|
+
*,
|
|
24
|
+
key: typing.Text = ...,
|
|
25
|
+
value: typing.Text = ...,
|
|
26
|
+
) -> None: ...
|
|
27
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
28
|
+
|
|
15
29
|
FAB_FILE_FIELD_NUMBER: builtins.int
|
|
30
|
+
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
|
16
31
|
fab_file: builtins.bytes
|
|
32
|
+
@property
|
|
33
|
+
def override_config(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
17
34
|
def __init__(self,
|
|
18
35
|
*,
|
|
19
36
|
fab_file: builtins.bytes = ...,
|
|
37
|
+
override_config: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
20
38
|
) -> None: ...
|
|
21
|
-
def ClearField(self, field_name: typing_extensions.Literal["fab_file",b"fab_file"]) -> None: ...
|
|
39
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab_file",b"fab_file","override_config",b"override_config"]) -> None: ...
|
|
22
40
|
global___StartRunRequest = StartRunRequest
|
|
23
41
|
|
|
24
42
|
class StartRunResponse(google.protobuf.message.Message):
|
flwr/proto/run_pb2.py
CHANGED
|
@@ -14,17 +14,21 @@ _sym_db = _symbol_database.Default()
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\"
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x66lwr/proto/run.proto\x12\nflwr.proto\"\xaf\x01\n\x03Run\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\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\x1a\x35\n\x13OverrideConfigEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1f\n\rGetRunRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\".\n\x0eGetRunResponse\x12\x1c\n\x03run\x18\x01 \x01(\x0b\x32\x0f.flwr.proto.Runb\x06proto3')
|
|
18
18
|
|
|
19
19
|
_globals = globals()
|
|
20
20
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
21
21
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.run_pb2', _globals)
|
|
22
22
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
23
23
|
DESCRIPTOR._options = None
|
|
24
|
-
_globals['
|
|
25
|
-
_globals['
|
|
26
|
-
_globals['
|
|
27
|
-
_globals['
|
|
28
|
-
_globals['
|
|
29
|
-
_globals['
|
|
24
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._options = None
|
|
25
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_options = b'8\001'
|
|
26
|
+
_globals['_RUN']._serialized_start=37
|
|
27
|
+
_globals['_RUN']._serialized_end=212
|
|
28
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_start=159
|
|
29
|
+
_globals['_RUN_OVERRIDECONFIGENTRY']._serialized_end=212
|
|
30
|
+
_globals['_GETRUNREQUEST']._serialized_start=214
|
|
31
|
+
_globals['_GETRUNREQUEST']._serialized_end=245
|
|
32
|
+
_globals['_GETRUNRESPONSE']._serialized_start=247
|
|
33
|
+
_globals['_GETRUNRESPONSE']._serialized_end=293
|
|
30
34
|
# @@protoc_insertion_point(module_scope)
|
flwr/proto/run_pb2.pyi
CHANGED
|
@@ -4,6 +4,7 @@ isort:skip_file
|
|
|
4
4
|
"""
|
|
5
5
|
import builtins
|
|
6
6
|
import google.protobuf.descriptor
|
|
7
|
+
import google.protobuf.internal.containers
|
|
7
8
|
import google.protobuf.message
|
|
8
9
|
import typing
|
|
9
10
|
import typing_extensions
|
|
@@ -12,19 +13,36 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
|
12
13
|
|
|
13
14
|
class Run(google.protobuf.message.Message):
|
|
14
15
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
+
class OverrideConfigEntry(google.protobuf.message.Message):
|
|
17
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
18
|
+
KEY_FIELD_NUMBER: builtins.int
|
|
19
|
+
VALUE_FIELD_NUMBER: builtins.int
|
|
20
|
+
key: typing.Text
|
|
21
|
+
value: typing.Text
|
|
22
|
+
def __init__(self,
|
|
23
|
+
*,
|
|
24
|
+
key: typing.Text = ...,
|
|
25
|
+
value: typing.Text = ...,
|
|
26
|
+
) -> None: ...
|
|
27
|
+
def ClearField(self, field_name: typing_extensions.Literal["key",b"key","value",b"value"]) -> None: ...
|
|
28
|
+
|
|
15
29
|
RUN_ID_FIELD_NUMBER: builtins.int
|
|
16
30
|
FAB_ID_FIELD_NUMBER: builtins.int
|
|
17
31
|
FAB_VERSION_FIELD_NUMBER: builtins.int
|
|
32
|
+
OVERRIDE_CONFIG_FIELD_NUMBER: builtins.int
|
|
18
33
|
run_id: builtins.int
|
|
19
34
|
fab_id: typing.Text
|
|
20
35
|
fab_version: typing.Text
|
|
36
|
+
@property
|
|
37
|
+
def override_config(self) -> google.protobuf.internal.containers.ScalarMap[typing.Text, typing.Text]: ...
|
|
21
38
|
def __init__(self,
|
|
22
39
|
*,
|
|
23
40
|
run_id: builtins.int = ...,
|
|
24
41
|
fab_id: typing.Text = ...,
|
|
25
42
|
fab_version: typing.Text = ...,
|
|
43
|
+
override_config: typing.Optional[typing.Mapping[typing.Text, typing.Text]] = ...,
|
|
26
44
|
) -> None: ...
|
|
27
|
-
def ClearField(self, field_name: typing_extensions.Literal["fab_id",b"fab_id","fab_version",b"fab_version","run_id",b"run_id"]) -> None: ...
|
|
45
|
+
def ClearField(self, field_name: typing_extensions.Literal["fab_id",b"fab_id","fab_version",b"fab_version","override_config",b"override_config","run_id",b"run_id"]) -> None: ...
|
|
28
46
|
global___Run = Run
|
|
29
47
|
|
|
30
48
|
class GetRunRequest(google.protobuf.message.Message):
|