flwr-nightly 1.7.0.dev20240105__py3-none-any.whl → 1.7.0.dev20240115__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/common/recordset.py +78 -0
- flwr/simulation/app.py +14 -2
- {flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/METADATA +1 -1
- {flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/RECORD +7 -6
- {flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/entry_points.txt +0 -0
flwr/common/recordset.py
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
# Copyright 2024 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
|
+
"""RecordSet."""
|
16
|
+
|
17
|
+
from dataclasses import dataclass
|
18
|
+
from typing import Dict
|
19
|
+
|
20
|
+
|
21
|
+
@dataclass
|
22
|
+
class ParametersRecord:
|
23
|
+
"""Parameters record."""
|
24
|
+
|
25
|
+
|
26
|
+
@dataclass
|
27
|
+
class MetricsRecord:
|
28
|
+
"""Metrics record."""
|
29
|
+
|
30
|
+
|
31
|
+
@dataclass
|
32
|
+
class ConfigsRecord:
|
33
|
+
"""Configs record."""
|
34
|
+
|
35
|
+
|
36
|
+
@dataclass
|
37
|
+
class RecordSet:
|
38
|
+
"""Definition of RecordSet."""
|
39
|
+
|
40
|
+
parameters: Dict[str, ParametersRecord] = {}
|
41
|
+
metrics: Dict[str, MetricsRecord] = {}
|
42
|
+
configs: Dict[str, ConfigsRecord] = {}
|
43
|
+
|
44
|
+
def set_parameters(self, name: str, record: ParametersRecord) -> None:
|
45
|
+
"""Add a ParametersRecord."""
|
46
|
+
self.parameters[name] = record
|
47
|
+
|
48
|
+
def get_parameters(self, name: str) -> ParametersRecord:
|
49
|
+
"""Get a ParametesRecord."""
|
50
|
+
return self.parameters[name]
|
51
|
+
|
52
|
+
def del_parameters(self, name: str) -> None:
|
53
|
+
"""Delete a ParametersRecord."""
|
54
|
+
del self.parameters[name]
|
55
|
+
|
56
|
+
def set_metrics(self, name: str, record: MetricsRecord) -> None:
|
57
|
+
"""Add a MetricsRecord."""
|
58
|
+
self.metrics[name] = record
|
59
|
+
|
60
|
+
def get_metrics(self, name: str) -> MetricsRecord:
|
61
|
+
"""Get a MetricsRecord."""
|
62
|
+
return self.metrics[name]
|
63
|
+
|
64
|
+
def del_metrics(self, name: str) -> None:
|
65
|
+
"""Delete a MetricsRecord."""
|
66
|
+
del self.metrics[name]
|
67
|
+
|
68
|
+
def set_configs(self, name: str, record: ConfigsRecord) -> None:
|
69
|
+
"""Add a ConfigsRecord."""
|
70
|
+
self.configs[name] = record
|
71
|
+
|
72
|
+
def get_configs(self, name: str) -> ConfigsRecord:
|
73
|
+
"""Get a ConfigsRecord."""
|
74
|
+
return self.configs[name]
|
75
|
+
|
76
|
+
def del_configs(self, name: str) -> None:
|
77
|
+
"""Delete a ConfigsRecord."""
|
78
|
+
del self.configs[name]
|
flwr/simulation/app.py
CHANGED
@@ -314,8 +314,18 @@ def start_simulation(
|
|
314
314
|
log(ERROR, traceback.format_exc())
|
315
315
|
log(
|
316
316
|
ERROR,
|
317
|
-
"Your simulation crashed :(. This could be because of several reasons."
|
317
|
+
"Your simulation crashed :(. This could be because of several reasons. "
|
318
318
|
"The most common are: "
|
319
|
+
"\n\t > Sometimes, issues in the simulation code itself can cause crashes. "
|
320
|
+
"It's always a good idea to double-check your code for any potential bugs "
|
321
|
+
"or inconsistencies that might be contributing to the problem. "
|
322
|
+
"For example: "
|
323
|
+
"\n\t\t - You might be using a class attribute in your clients that "
|
324
|
+
"hasn't been defined."
|
325
|
+
"\n\t\t - There could be an incorrect method call to a 3rd party library "
|
326
|
+
"(e.g., PyTorch)."
|
327
|
+
"\n\t\t - The return types of methods in your clients/strategies might be "
|
328
|
+
"incorrect."
|
319
329
|
"\n\t > Your system couldn't fit a single VirtualClient: try lowering "
|
320
330
|
"`client_resources`."
|
321
331
|
"\n\t > All the actors in your pool crashed. This could be because: "
|
@@ -325,7 +335,9 @@ def start_simulation(
|
|
325
335
|
"not enough for your run). Use fewer concurrent actors. "
|
326
336
|
"\n\t\t - You were running a multi-node simulation and all worker nodes "
|
327
337
|
"disconnected. The head node might still be alive but cannot accommodate "
|
328
|
-
"any actor with resources: %s."
|
338
|
+
"any actor with resources: %s."
|
339
|
+
"\nTake a look at the Flower simulation examples for guidance "
|
340
|
+
"<https://flower.dev/docs/framework/how-to-run-simulations.html>.",
|
329
341
|
client_resources,
|
330
342
|
client_resources,
|
331
343
|
)
|
{flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/RECORD
RENAMED
@@ -31,6 +31,7 @@ flwr/common/dp.py,sha256=hF45cPElXxcQsh4AoquAyaTrNi0xCrIcKx7xOcV_1XU,1782
|
|
31
31
|
flwr/common/grpc.py,sha256=qVLB0d6bCuaBRW5YB0vEZXsR7Bo3R2lh4ONiCocqwRI,2270
|
32
32
|
flwr/common/logger.py,sha256=yGM9KCc7eU4-pvuOc_FXdLbBxalfU-ZAaepf9TbDAhY,3821
|
33
33
|
flwr/common/parameter.py,sha256=-bFAUayToYDF50FZGrBC1hQYJCQDtB2bbr3ZuVLMtdE,2095
|
34
|
+
flwr/common/recordset.py,sha256=MLeEtFtdKIFoFIT0F-K_Xk3BnuYlLkYQPTx1m8IWD2A,2324
|
34
35
|
flwr/common/retry_invoker.py,sha256=RBTiDnYyePWvhBH9GqcWZl0tQaUOVUqOVBwfGprXWEg,10810
|
35
36
|
flwr/common/secure_aggregation/__init__.py,sha256=29nHIUO2L8-KhNHQ2KmIgRo_4CPkq4LgLCUN0on5FgI,731
|
36
37
|
flwr/common/secure_aggregation/crypto/__init__.py,sha256=dz7pVx2aPrHxr_AwgO5mIiTzu4PcvUxRq9NLBbFcsf8,738
|
@@ -126,13 +127,13 @@ flwr/server/utils/__init__.py,sha256=RQVbo-bcsVtp_lJBf7dL5w01FbLrr7v3YedeGp5_YMs
|
|
126
127
|
flwr/server/utils/tensorboard.py,sha256=k0G6bqsLx7wfYbH2KtXsDYcOCfyIeE12-hefXA7lZdg,5485
|
127
128
|
flwr/server/utils/validator.py,sha256=whLz1xBEP8mG_ZuJiIR3cRk3TmrXCFl7CxIP0sRpInY,5679
|
128
129
|
flwr/simulation/__init__.py,sha256=E2eD5FlTmZZ80u21FmWCkacrM7O4mrEHD8iXqeCaBUQ,1278
|
129
|
-
flwr/simulation/app.py,sha256=
|
130
|
+
flwr/simulation/app.py,sha256=pbkldpm3Uc9_0M2R5-8Ako26g9WxNhZW4fLJY-4YtJY,13879
|
130
131
|
flwr/simulation/ray_transport/__init__.py,sha256=FsaAnzC4cw4DqoouBCix6496k29jACkfeIam55BvW9g,734
|
131
132
|
flwr/simulation/ray_transport/ray_actor.py,sha256=S_E-7Bk0ONWx12b0ObP3CtzJSEL3yPxpFVcYfkDx6Es,17044
|
132
133
|
flwr/simulation/ray_transport/ray_client_proxy.py,sha256=RziUVY9PmuI8fJEbra-Vk9oWwRxALDZOeF1fAW-a9wg,9430
|
133
134
|
flwr/simulation/ray_transport/utils.py,sha256=e0mkFOgOXSJHSQdiipoggF-DLBXaJZVytx9auQ35fCg,3368
|
134
|
-
flwr_nightly-1.7.0.
|
135
|
-
flwr_nightly-1.7.0.
|
136
|
-
flwr_nightly-1.7.0.
|
137
|
-
flwr_nightly-1.7.0.
|
138
|
-
flwr_nightly-1.7.0.
|
135
|
+
flwr_nightly-1.7.0.dev20240115.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
136
|
+
flwr_nightly-1.7.0.dev20240115.dist-info/METADATA,sha256=a50Ta2Iy4tohGmxn59QvGmczagzFiPLgBEH8nRHmWUw,13449
|
137
|
+
flwr_nightly-1.7.0.dev20240115.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
138
|
+
flwr_nightly-1.7.0.dev20240115.dist-info/entry_points.txt,sha256=1uLlD5tIunkzALMfMWnqjdE_D5hRUX_I1iMmOMv6tZI,181
|
139
|
+
flwr_nightly-1.7.0.dev20240115.dist-info/RECORD,,
|
{flwr_nightly-1.7.0.dev20240105.dist-info → flwr_nightly-1.7.0.dev20240115.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|
File without changes
|