syft-flwr 0.1.1__tar.gz → 0.1.3__tar.gz
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 syft-flwr might be problematic. Click here for more details.
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/PKG-INFO +4 -4
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/pyproject.toml +6 -6
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/__init__.py +1 -1
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/grid.py +22 -6
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/.gitignore +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/LICENSE +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/README.md +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/bootstrap.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/cli.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/config.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/flower_client.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/flower_server.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/flwr_compatibility.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/run.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/run_simulation.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/serde.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/strategy/__init__.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/strategy/fedavg.py +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/templates/main.py.tpl +0 -0
- {syft_flwr-0.1.1 → syft_flwr-0.1.3}/src/syft_flwr/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: syft-flwr
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: syft_flwr is an open source framework that facilitate federated learning projects using Flower over the SyftBox protocol
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -9,9 +9,9 @@ Requires-Dist: flwr[simulation]==1.17.0
|
|
|
9
9
|
Requires-Dist: loguru>=0.7.3
|
|
10
10
|
Requires-Dist: safetensors>=0.5.0
|
|
11
11
|
Requires-Dist: syft-core==0.2.3
|
|
12
|
-
Requires-Dist: syft-event==0.2.
|
|
13
|
-
Requires-Dist: syft-rds==0.1.
|
|
14
|
-
Requires-Dist: syft-rpc==0.2.
|
|
12
|
+
Requires-Dist: syft-event==0.2.3
|
|
13
|
+
Requires-Dist: syft-rds==0.1.3
|
|
14
|
+
Requires-Dist: syft-rpc==0.2.2
|
|
15
15
|
Requires-Dist: tomli-w>=1.2.0
|
|
16
16
|
Requires-Dist: tomli>=2.2.1
|
|
17
17
|
Requires-Dist: typing-extensions>=4.13.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "syft-flwr"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.3"
|
|
4
4
|
description = "syft_flwr is an open source framework that facilitate federated learning projects using Flower over the SyftBox protocol"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.9.2"
|
|
@@ -13,9 +13,9 @@ dependencies = [
|
|
|
13
13
|
"tomli>=2.2.1",
|
|
14
14
|
"tomli-w>=1.2.0",
|
|
15
15
|
"syft-core==0.2.3",
|
|
16
|
-
"syft-event==0.2.
|
|
17
|
-
"syft-rpc==0.2.
|
|
18
|
-
"syft-rds==0.1.
|
|
16
|
+
"syft-event==0.2.3",
|
|
17
|
+
"syft-rpc==0.2.2",
|
|
18
|
+
"syft-rds==0.1.3",
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
[project.scripts]
|
|
@@ -24,7 +24,7 @@ syft_flwr = "syft_flwr.cli:main"
|
|
|
24
24
|
[tool.uv]
|
|
25
25
|
dev-dependencies = [
|
|
26
26
|
"ipykernel>=6.29.5",
|
|
27
|
-
"ipywidgets>=8.1.
|
|
27
|
+
"ipywidgets>=8.1.7",
|
|
28
28
|
"pytest>=8.3.4",
|
|
29
29
|
"pre-commit>=4.0.1",
|
|
30
30
|
]
|
|
@@ -35,7 +35,7 @@ build-backend = "hatchling.build"
|
|
|
35
35
|
|
|
36
36
|
[tool.hatch.build.targets.wheel]
|
|
37
37
|
packages = ["src/syft_flwr"]
|
|
38
|
-
only-include = ["src"
|
|
38
|
+
only-include = ["src"]
|
|
39
39
|
exclude = ["src/**/__pycache__"]
|
|
40
40
|
|
|
41
41
|
[tool.hatch.build.targets.sdist]
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import os
|
|
1
2
|
import time
|
|
2
3
|
from typing import Iterable, cast
|
|
3
4
|
|
|
4
|
-
from loguru import logger
|
|
5
|
-
from syft_core import Client
|
|
6
|
-
from syft_rpc import rpc, rpc_db
|
|
7
|
-
from typing_extensions import Optional
|
|
8
|
-
|
|
9
5
|
from flwr.common import ConfigRecord
|
|
10
6
|
from flwr.common.constant import MessageType
|
|
11
7
|
from flwr.common.message import Message
|
|
12
8
|
from flwr.common.typing import Run
|
|
13
9
|
from flwr.proto.node_pb2 import Node # pylint: disable=E0611
|
|
10
|
+
from loguru import logger
|
|
11
|
+
from syft_core import Client
|
|
12
|
+
from syft_rpc import rpc, rpc_db
|
|
13
|
+
from typing_extensions import Optional
|
|
14
|
+
|
|
14
15
|
from syft_flwr.flwr_compatibility import (
|
|
15
16
|
Grid,
|
|
16
17
|
RecordDict,
|
|
@@ -24,6 +25,10 @@ from syft_flwr.utils import str_to_int
|
|
|
24
25
|
AGGREGATOR_NODE_ID = 1
|
|
25
26
|
|
|
26
27
|
|
|
28
|
+
# env vars
|
|
29
|
+
SYFT_FLWR_MSG_TIMEOUT = "SYFT_FLWR_MSG_TIMEOUT"
|
|
30
|
+
|
|
31
|
+
|
|
27
32
|
class SyftGrid(Grid):
|
|
28
33
|
def __init__(
|
|
29
34
|
self,
|
|
@@ -155,7 +160,7 @@ class SyftGrid(Grid):
|
|
|
155
160
|
self,
|
|
156
161
|
messages: Iterable[Message],
|
|
157
162
|
*,
|
|
158
|
-
timeout: Optional[float] =
|
|
163
|
+
timeout: Optional[float] = None,
|
|
159
164
|
) -> Iterable[Message]:
|
|
160
165
|
"""Push messages to specified node IDs and pull the reply messages.
|
|
161
166
|
|
|
@@ -163,6 +168,17 @@ class SyftGrid(Grid):
|
|
|
163
168
|
waits for the replies. It continues to pull replies until either all replies are
|
|
164
169
|
received or the specified timeout duration (in seconds) is exceeded.
|
|
165
170
|
"""
|
|
171
|
+
if os.environ.get(SYFT_FLWR_MSG_TIMEOUT) is not None:
|
|
172
|
+
timeout = float(os.environ.get(SYFT_FLWR_MSG_TIMEOUT))
|
|
173
|
+
if timeout is not None:
|
|
174
|
+
logger.debug(
|
|
175
|
+
f"syft_flwr messages timeout = {timeout}: Will move on after {timeout} (s) if no reply is received"
|
|
176
|
+
)
|
|
177
|
+
else:
|
|
178
|
+
logger.debug(
|
|
179
|
+
"syft_flwr messages timeout = None: Will wait indefinitely for replies"
|
|
180
|
+
)
|
|
181
|
+
|
|
166
182
|
# Push messages
|
|
167
183
|
msg_ids = set(self.push_messages(messages))
|
|
168
184
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|