Skip to content

Commit

Permalink
Merge branch 'main' into upgrade-fed-prox
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq authored Feb 24, 2025
2 parents 85376c1 + 72aab3f commit 7884dd1
Show file tree
Hide file tree
Showing 65 changed files with 4,065 additions and 3,526 deletions.
2 changes: 1 addition & 1 deletion baselines/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
author = "The Flower Authors"

# The full version, including alpha/beta/rc tags
release = "1.15.2"
release = "1.16.0"


# -- General configuration ---------------------------------------------------
Expand Down
41 changes: 30 additions & 11 deletions dev/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,31 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../

echo "=== test.sh ==="


# Default value (true)
RUN_FULL_TEST=${1:true}
echo "RUN_FULL_TEST: $RUN_FULL_TEST"

echo "- Start Python checks"

echo "- clang-format: start"
clang-format --Werror --dry-run src/proto/flwr/proto/*
echo "- clang-format: done"

echo "- isort: start"
python -m isort --check-only --skip src/py/flwr/proto src/py/flwr benchmarks e2e
if $RUN_FULL_TEST; then
python -m isort --check-only --skip src/py/flwr/proto src/py/flwr benchmarks e2e
else
python -m isort --check-only --skip src/py/flwr/proto src/py/flwr
fi
echo "- isort: done"

echo "- black: start"
python -m black --exclude "src\/py\/flwr\/proto" --check src/py/flwr benchmarks examples e2e
if $RUN_FULL_TEST; then
python -m black --exclude "src\/py\/flwr\/proto" --check src/py/flwr benchmarks examples e2e
else
python -m black --exclude "src\/py\/flwr\/proto" --check src/py/flwr
fi
echo "- black: done"

echo "- init_py_check: start"
Expand Down Expand Up @@ -54,9 +67,11 @@ echo "- All Python checks passed"

echo "- Start Markdown checks"

echo "- mdformat: start"
python -m mdformat --check --number framework/docs/source examples
echo "- mdformat: done"
if $RUN_FULL_TEST; then
echo "- mdformat: start"
python -m mdformat --check --number framework/docs/source examples
echo "- mdformat: done"
fi

echo "- All Markdown checks passed"

Expand All @@ -70,17 +85,21 @@ echo "- All TOML checks passed"

echo "- Start rST checks"

echo "- docstrfmt: start"
docstrfmt --check framework/docs/source
echo "- docstrfmt: done"
if $RUN_FULL_TEST; then
echo "- docstrfmt: start"
docstrfmt --check framework/docs/source
echo "- docstrfmt: done"
fi

echo "- All rST checks passed"

echo "- Start license checks"

echo "- copyright: start"
python -m flwr_tool.check_copyright src/py/flwr
echo "- copyright: done"
if $RUN_FULL_TEST; then
echo "- copyright: start"
python -m flwr_tool.check_copyright src/py/flwr
echo "- copyright: done"
fi

echo "- licensecheck: start"
python -m licensecheck -u poetry --fail-licenses gpl --zero
Expand Down
2 changes: 1 addition & 1 deletion e2e/strategies/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Keras Federated Learning Quickstart with Flower"
authors = ["The Flower Authors <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = { path = "../../", develop = true, extras = ["simulation"] }
tensorflow-cpu = "^2.9.1, !=2.11.1"
tensorflow-io-gcs-filesystem = "<0.35.0"
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/android-kotlin/gen_tflite/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = ""
authors = ["Steven Hé (Sīchàng) <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
numpy = ">=1.23,<2.0"
tensorflow-cpu = ">=2.12,<3.0"
pandas = ">=2.0,<3.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/android-kotlin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ description = ""
authors = ["Steven Hé (Sīchàng) <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = ">=1.0,<2.0"
2 changes: 1 addition & 1 deletion examples/android/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Android Example"
authors = ["The Flower Authors <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = ">=1.0,<2.0"
tensorflow-cpu = { version = ">=2.9.1,<2.11.1 || >2.11.1", markers = "platform_machine == \"x86_64\"" }
tensorflow-macos = { version = ">=2.9.1,<2.11.1 || >2.11.1", markers = "sys_platform == \"darwin\" and platform_machine == \"arm64\"" }
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/custom-mods/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Multi-Tenant Federated Learning with Flower and PyTorch"
authors = ["The Flower Authors <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = { path = "../../", develop = true, extras = ["simulation"] }
tensorboard = "2.18.0"
torch = "2.5.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
author = "The Flower Authors"

# The full version, including alpha/beta/rc tags
release = "1.15.2"
release = "1.16.0"


# -- General configuration ---------------------------------------------------
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
2 changes: 1 addition & 1 deletion examples/flowertune-llm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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",
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/ios/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ description = "Example Server for Flower iOS/CoreML"
authors = ["The Flower Authors <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = ">=1.0,<2.0"
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "PyTorch: From Centralized To Federated with Flower"
authors = ["The Flower Authors <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = ">=1.0,<2.0"
flwr-datasets = { extras = ["vision"], version = ">=0.0.2,<1.0.0" }
torch = "2.2.0"
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-mlcube/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Keras Federated Learning Quickstart with Flower"
authors = ["The Flower Authors <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
python = ">=3.9.2,<3.11"
flwr = ">=1.0,<2.0" # For development: { path = "../../", develop = true }
tensorflow-cpu = { version = ">=2.9.1,<2.11.1 || >2.11.1", markers = "platform_machine == \"x86_64\"" }
tensorflow-macos = { version = ">=2.9.1,<2.11.1 || >2.11.1", markers = "sys_platform == \"darwin\" and platform_machine == \"arm64\"" }
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
Loading

0 comments on commit 7884dd1

Please sign in to comment.