Skip to content

Commit

Permalink
Merge branch 'adap:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
chancejohnstone authored Feb 17, 2025
2 parents efd5f6a + b3acc5b commit 099b49e
Show file tree
Hide file tree
Showing 58 changed files with 168 additions and 96 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
images: ${{ inputs.namespace-repository }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0

- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
tags: ${{ inputs.tags }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0

- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,27 @@ jobs:
${{ matrix.engine }}
working-directory: e2e/${{ matrix.directory }}
run: ./../test_exec_api.sh "${{ matrix.connection }}" "${{ matrix.authentication}}" "${{ matrix.engine }}"
windows-compatibility:
runs-on: windows-latest
env:
PYTHONIOENCODING: utf-8
timeout-minutes: 10
needs: wheel

name: Windows compatibility test

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install build tools
run: python -m pip install -U pip==23.3.1
- name: Install dependencies
run: python -m pip install --upgrade .
- name: Run test
working-directory: ./e2e
run: ./test_windows.sh
shell: bash
2 changes: 1 addition & 1 deletion baselines/fedpft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ torch = {url = "https://download.pytorch.org/whl/cu117/torch-1.13.0%2Bcu117-cp31
scikit-learn = "1.5.0"
flwr-datasets = "0.1.0"
torchvision = {url = "https://download.pytorch.org/whl/cu117/torchvision-0.14.0%2Bcu117-cp310-cp310-linux_x86_64.whl"}
transformers = "4.39.3"
transformers = "4.48.0"
datasets = "2.18.0"

[tool.poetry.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion baselines/fedwav2vec2/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ speechbrain = "0.5.15"
pandas = "2.1.1"
torch = { url = "https://download.pytorch.org/whl/cu116/torch-1.13.1%2Bcu116-cp310-cp310-linux_x86_64.whl" }
torchaudio = { url = "https://download.pytorch.org/whl/cu116/torchaudio-0.13.1%2Bcu116-cp310-cp310-linux_x86_64.whl" }
transformers = "4.38.0"
transformers = "4.48.0"

[tool.poetry.dev-dependencies]
isort = "==5.13.2"
Expand Down
56 changes: 56 additions & 0 deletions e2e/test_windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash

# Create and install Flower app
flwr new e2e-tmp-test --framework numpy --username flwrlabs
cd e2e-tmp-test

# Modify the config file
echo -e $"\n[tool.flwr.federations.e2e]\naddress = \"127.0.0.1:9093\"\ninsecure = true" >> pyproject.toml

# Start Flower processes in the background
flower-superlink --insecure 2>&1 | tee flwr_output.log &
sleep 2

flower-supernode --insecure --superlink 127.0.0.1:9092 \
--clientappio-api-address localhost:9094 \
--max-retries 0 &
cl1_pid=$!
sleep 2

flower-supernode --insecure --superlink 127.0.0.1:9092 \
--clientappio-api-address localhost:9095 \
--max-retries 0 &
sleep 2

flwr run --run-config num-server-rounds=1 . e2e

# Trap to clean up on exit
cleanup() {
echo "Stopping Flower processes..."
taskkill //F //FI "IMAGENAME eq flower*" //T
}
trap cleanup EXIT

# Initialize a flag to track if training is successful
found_success=false
timeout=120 # Timeout after 120 seconds
elapsed=0

# Check for "Run finished" in a loop with a timeout
while [ "$found_success" = false ] && [ $elapsed -lt $timeout ]; do
if grep -q "Run finished" flwr_output.log; then
echo "Training worked correctly!"
found_success=true
exit 0;
else
echo "Waiting for training ... ($elapsed seconds elapsed)"
fi
# Sleep for a short period and increment the elapsed time
sleep 2
elapsed=$((elapsed + 2))
done

if [ "$found_success" = false ]; then
echo "Training did not finish within timeout."
exit 1;
fi
2 changes: 1 addition & 1 deletion examples/advanced-pytorch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with PyTorch and Flower (Advanced Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced-tensorflow/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with Tensorflow/Keras and Flower (Advanced Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"tensorflow-cpu>=2.9.1, != 2.11.1 ; platform_machine == \"x86_64\"",
"tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == \"darwin\" and platform_machine == \"arm64\"",
Expand Down
2 changes: 1 addition & 1 deletion examples/app-pytorch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-metrics/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version = "1.0.0"
description = "Federated Learning with Flower and Custom Metrics"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"scikit-learn>=1.6.0",
"tensorflow>=2.12.1; (platform_machine == \"x86_64\" or platform_machine == \"aarch64\")",
Expand Down
2 changes: 1 addition & 1 deletion examples/embedded-devices/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated AI with Embedded Devices using Flower"
license = "Apache-2.0"
dependencies = [
"flwr>=1.15.0",
"flwr>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/federated-kaplan-meier-fitter/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Kaplan Meier Fitter with Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets>=0.5.0",
"numpy>=1.23.2",
"pandas>=2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/fl-dp-sa/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Central Differential Privacy and Secure Aggregation in Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/fl-tabular/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Adult Census Income Tabular Dataset and Federated Learning in Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets>=0.5.0",
"torch==2.5.1",
"scikit-learn==1.6.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/flower-authentication/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with PyTorch and authenticated Flower "
license = "Apache-2.0"
dependencies = [
"flwr>=1.15.0",
"flwr>=2",
"flwr-datasets[vision]>=0.5.0",
"torch>=2.5.0,<3.0.0",
"torchvision>=0.20.1,<0.21.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/flower-secure-aggregation/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Secure Aggregation in Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.0",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/flowertune-llm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ version = "1.0.0"
description = "FlowerTune LLM: Federated LLM Fine-tuning with Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]==1.15.0",
"flwr[simulation]==1.15.2",
"flwr-datasets>=0.5.0",
"torch==2.3.1",
"trl==0.8.1",
"bitsandbytes==0.45.0",
"scipy==1.13.0",
"peft==0.6.2",
"fschat[model_worker,webui]==0.2.35",
"transformers==4.47.0",
"transformers==4.48.0",
"sentencepiece==0.2.0",
"omegaconf==2.3.0",
"hf_transfer==0.1.8",
Expand Down
2 changes: 1 addition & 1 deletion examples/flowertune-vit/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Finetuning of a Vision Transformer with Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/opacus/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Sample-level Differential Privacy with Opacus in Flower"

dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Variational Autoencoder Example with PyTorch and Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-fastai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with Fastai and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"fastai==2.7.18",
"torch==2.5.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-huggingface/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{ name = "Kaushik Amar Das", email = "[email protected]" },
]
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets>=0.5.0",
"torch==2.4.0",
"transformers>=4.30.0,<5.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-jax/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = ""
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"datasets>=2.21.0",
"jax==0.4.31",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-lerobot/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors = [
]

dependencies = [
"flwr[simulation]==1.15.0",
"flwr[simulation]==1.15.2",
"transformers>=4.30.0,<5.0",
"lerobot[pusht] @ git+https://github.com/huggingface/lerobot.git@96c7052777aca85d4e55dfba8f81586103ba8f61",
"flwr-datasets>=0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-mlx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with MLX and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"mlx==0.21.1",
]
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-monai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with MONAI and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"monai==1.3.2",
"filelock==3.15.4",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-pandas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{ name = "Ragy Haddad", email = "[email protected]" },
]
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"numpy>=2.0.2",
"pandas==2.2.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-pytorch-lightning/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with PyTorch Lightning and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"pytorch-lightning<2.0.0; sys_platform == 'darwin'",
"pytorch-lightning==1.6.0; sys_platform != 'darwin'",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-pytorch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with PyTorch and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"torch==2.5.1",
"torchvision==0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-sklearn-tabular/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with scikit-learn and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"scikit-learn>=1.6.1",
]
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart-tensorflow/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "Federated Learning with Tensorflow/Keras and Flower (Quickstart Example)"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"tensorflow>=2.9.1, != 2.11.1 ; (platform_machine == \"x86_64\" or platform_machine == \"aarch64\")",
"tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == \"darwin\" and platform_machine == \"arm64\"",
Expand Down
2 changes: 1 addition & 1 deletion examples/sklearn-logreg-mnist/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{ name = "Kaushik Amar Das", email = "[email protected]" },
]
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"numpy>=2.0.0",
"scikit-learn>=1.6.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/tensorflow-privacy/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "tensorflow-privacy-fl"
version = "1.0.0"
description = "Sample-level Differential Privacy with Tensorflow-Privacy in Flower"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets[vision]>=0.5.0",
"tensorflow-estimator~=2.4",
"tensorflow-probability~=0.22.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vertical-fl/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.0.0"
description = "PyTorch Vertical FL with Flower"
license = "Apache-2.0"
dependencies = [
"flwr[simulation]>=1.15.1",
"flwr[simulation]>=1.15.2",
"flwr-datasets>=0.5.0",
"pandas==2.2.3",
"numpy>=1.26.0",
Expand Down
Loading

0 comments on commit 099b49e

Please sign in to comment.