syft-flwr 0.1.6__tar.gz → 0.1.7__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.7/PKG-INFO +26 -0
- syft_flwr-0.1.7/README.md +10 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/pyproject.toml +9 -6
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/__init__.py +1 -1
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/flower_client.py +20 -11
- syft_flwr-0.1.6/PKG-INFO +0 -24
- syft_flwr-0.1.6/README.md +0 -8
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/.gitignore +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/LICENSE +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/bootstrap.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/cli.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/config.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/flower_server.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/flwr_compatibility.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/grid.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/mounts.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/run.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/run_simulation.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/serde.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/strategy/__init__.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/strategy/fedavg.py +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/templates/main.py.tpl +0 -0
- {syft_flwr-0.1.6 → syft_flwr-0.1.7}/src/syft_flwr/utils.py +0 -0
syft_flwr-0.1.7/PKG-INFO
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: syft-flwr
|
|
3
|
+
Version: 0.1.7
|
|
4
|
+
Summary: syft_flwr is an open source framework that facilitate federated learning projects using Flower over the SyftBox protocol
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.9.2
|
|
7
|
+
Requires-Dist: flwr-datasets[vision]>=0.5.0
|
|
8
|
+
Requires-Dist: flwr[simulation]>=1.20.0
|
|
9
|
+
Requires-Dist: loguru>=0.7.3
|
|
10
|
+
Requires-Dist: safetensors>=0.6.2
|
|
11
|
+
Requires-Dist: syft-rds==0.1.5
|
|
12
|
+
Requires-Dist: tomli-w>=1.2.0
|
|
13
|
+
Requires-Dist: tomli>=2.2.1
|
|
14
|
+
Requires-Dist: typing-extensions>=4.13.0
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# syft_flwr
|
|
18
|
+
|
|
19
|
+
`syft_flwr` is an open source framework that facilitate federated learning (FL) projects using [Flower](https://github.com/adap/flower) over the [SyftBox](https://github.com/OpenMined/syftbox) protocol
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
## Example Usages
|
|
24
|
+
Please look at the `notebooks/` folder for example use cases:
|
|
25
|
+
- [FL diabetes prediction](notebooks/fl-diabetes-prediction/README.md) shows how to train a federated model over distributed machines for multiple rounds
|
|
26
|
+
- [Federated analytics](notebooks/federated-analytics-diabetes/README.md) shows how to query statistics from private datasets from distributed machines and then aggregate them
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# syft_flwr
|
|
2
|
+
|
|
3
|
+
`syft_flwr` is an open source framework that facilitate federated learning (FL) projects using [Flower](https://github.com/adap/flower) over the [SyftBox](https://github.com/OpenMined/syftbox) protocol
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Example Usages
|
|
8
|
+
Please look at the `notebooks/` folder for example use cases:
|
|
9
|
+
- [FL diabetes prediction](notebooks/fl-diabetes-prediction/README.md) shows how to train a federated model over distributed machines for multiple rounds
|
|
10
|
+
- [Federated analytics](notebooks/federated-analytics-diabetes/README.md) shows how to query statistics from private datasets from distributed machines and then aggregate them
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "syft-flwr"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.7"
|
|
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"
|
|
7
7
|
dependencies = [
|
|
8
|
-
"flwr[simulation]
|
|
8
|
+
"flwr[simulation]>=1.20.0",
|
|
9
9
|
"flwr-datasets[vision]>=0.5.0",
|
|
10
10
|
"loguru>=0.7.3",
|
|
11
|
-
"safetensors>=0.
|
|
11
|
+
"safetensors>=0.6.2",
|
|
12
12
|
"typing-extensions>=4.13.0",
|
|
13
13
|
"tomli>=2.2.1",
|
|
14
14
|
"tomli-w>=1.2.0",
|
|
@@ -20,10 +20,13 @@ syft_flwr = "syft_flwr.cli:main"
|
|
|
20
20
|
|
|
21
21
|
[tool.uv]
|
|
22
22
|
dev-dependencies = [
|
|
23
|
-
"ipykernel>=6.
|
|
23
|
+
"ipykernel>=6.30.1",
|
|
24
24
|
"ipywidgets>=8.1.7",
|
|
25
|
-
"pytest>=8.
|
|
26
|
-
"pre-commit>=4.0
|
|
25
|
+
"pytest>=8.4.1",
|
|
26
|
+
"pre-commit>=4.3.0",
|
|
27
|
+
"torch>=2.0.0",
|
|
28
|
+
"imblearn>=0.0",
|
|
29
|
+
"jupyterlab"
|
|
27
30
|
]
|
|
28
31
|
|
|
29
32
|
[build-system]
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import traceback
|
|
3
3
|
|
|
4
|
-
from loguru import logger
|
|
5
|
-
from syft_event import SyftEvents
|
|
6
|
-
from syft_event.types import Request
|
|
7
|
-
|
|
8
4
|
from flwr.client import ClientApp
|
|
9
5
|
from flwr.common import Context
|
|
10
6
|
from flwr.common.constant import ErrorCode, MessageType
|
|
11
7
|
from flwr.common.message import Error, Message
|
|
8
|
+
from loguru import logger
|
|
9
|
+
from syft_event import SyftEvents
|
|
10
|
+
from syft_event.types import Request
|
|
11
|
+
|
|
12
12
|
from syft_flwr.flwr_compatibility import RecordDict, create_flwr_message
|
|
13
13
|
from syft_flwr.serde import bytes_to_flower_message, flower_message_to_bytes
|
|
14
14
|
|
|
@@ -57,13 +57,22 @@ def syftbox_flwr_client(client_app: ClientApp, context: Context, app_name: str):
|
|
|
57
57
|
message: Message = bytes_to_flower_message(request.body)
|
|
58
58
|
try:
|
|
59
59
|
# Handle stop signal
|
|
60
|
-
if
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
if message.metadata.message_type == MessageType.SYSTEM:
|
|
61
|
+
# Check for stop action in various possible formats
|
|
62
|
+
is_stop_signal = False
|
|
63
|
+
if (
|
|
64
|
+
"config" in message.content
|
|
65
|
+
and "action" in message.content["config"]
|
|
66
|
+
):
|
|
67
|
+
is_stop_signal = message.content["config"]["action"] == "stop"
|
|
68
|
+
elif message.metadata.group_id == "final":
|
|
69
|
+
# Alternative stop signal format
|
|
70
|
+
is_stop_signal = True
|
|
71
|
+
|
|
72
|
+
if is_stop_signal:
|
|
73
|
+
logger.info(f"Received stop message: {message}")
|
|
74
|
+
box._stop_event.set()
|
|
75
|
+
return None
|
|
67
76
|
|
|
68
77
|
return _handle_normal_message(message, client_app, context)
|
|
69
78
|
|
syft_flwr-0.1.6/PKG-INFO
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: syft-flwr
|
|
3
|
-
Version: 0.1.6
|
|
4
|
-
Summary: syft_flwr is an open source framework that facilitate federated learning projects using Flower over the SyftBox protocol
|
|
5
|
-
License-File: LICENSE
|
|
6
|
-
Requires-Python: >=3.9.2
|
|
7
|
-
Requires-Dist: flwr-datasets[vision]>=0.5.0
|
|
8
|
-
Requires-Dist: flwr[simulation]==1.17.0
|
|
9
|
-
Requires-Dist: loguru>=0.7.3
|
|
10
|
-
Requires-Dist: safetensors>=0.5.0
|
|
11
|
-
Requires-Dist: syft-rds==0.1.5
|
|
12
|
-
Requires-Dist: tomli-w>=1.2.0
|
|
13
|
-
Requires-Dist: tomli>=2.2.1
|
|
14
|
-
Requires-Dist: typing-extensions>=4.13.0
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
|
-
# syft_flwr
|
|
18
|
-
|
|
19
|
-
`syft_flwr` is an open source framework that facilitate federated learning projects using [Flower](https://github.com/adap/flower) over the [SyftBox](https://github.com/OpenMined/syftbox) protocol
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
- Install uv: `brew install uv`
|
|
23
|
-
- Create a virtual environment: `uv venv`
|
|
24
|
-
- Install `syft-flwr`: `uv pip install syft-flwr`
|
syft_flwr-0.1.6/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# syft_flwr
|
|
2
|
-
|
|
3
|
-
`syft_flwr` is an open source framework that facilitate federated learning projects using [Flower](https://github.com/adap/flower) over the [SyftBox](https://github.com/OpenMined/syftbox) protocol
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
- Install uv: `brew install uv`
|
|
7
|
-
- Create a virtual environment: `uv venv`
|
|
8
|
-
- Install `syft-flwr`: `uv pip install syft-flwr`
|
|
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
|