From 057f5a100c6f6af52c60384c1257885c10ec7efb Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Wed, 6 Sep 2023 15:02:02 +0200 Subject: [PATCH 1/5] Upgrade examples and E2E tests to Python 3.8 --- e2e/bare/pyproject.toml | 2 +- e2e/fastai/pyproject.toml | 2 +- e2e/pytorch-lightning/pyproject.toml | 2 +- e2e/pytorch/pyproject.toml | 2 +- e2e/strategies/pyproject.toml | 2 +- e2e/tensorflow/pyproject.toml | 2 +- examples/ios/pyproject.toml | 2 +- examples/quickstart-fastai/pyproject.toml | 2 +- examples/quickstart-pytorch-lightning/pyproject.toml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e2e/bare/pyproject.toml b/e2e/bare/pyproject.toml index 8f82d57f319..b9a4028806c 100644 --- a/e2e/bare/pyproject.toml +++ b/e2e/bare/pyproject.toml @@ -9,5 +9,5 @@ description = "Bare Federated Learning test with Flower" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" flwr = { path = "../../", develop = true, extras = ["simulation"] } diff --git a/e2e/fastai/pyproject.toml b/e2e/fastai/pyproject.toml index 0b2ef608132..88d9bc85e56 100644 --- a/e2e/fastai/pyproject.toml +++ b/e2e/fastai/pyproject.toml @@ -9,6 +9,6 @@ description = "Fastai Federated Learning E2E test with Flower" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = ">=3.7,<3.10" +python = ">=3.8,<3.10" flwr = { path = "../../", develop = true, extras = ["simulation"] } fastai = "^2.7.10" diff --git a/e2e/pytorch-lightning/pyproject.toml b/e2e/pytorch-lightning/pyproject.toml index 5e99a02849e..e79eb72a56d 100644 --- a/e2e/pytorch-lightning/pyproject.toml +++ b/e2e/pytorch-lightning/pyproject.toml @@ -9,7 +9,7 @@ description = "Federated Learning E2E test with Flower and PyTorch Lightning" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" flwr = { path = "../../", develop = true, extras = ["simulation"] } pytorch-lightning = "1.6.0" torchvision = "0.14.1" diff --git a/e2e/pytorch/pyproject.toml b/e2e/pytorch/pyproject.toml index 08c4e41f2da..4aa326330c6 100644 --- a/e2e/pytorch/pyproject.toml +++ b/e2e/pytorch/pyproject.toml @@ -9,7 +9,7 @@ description = "PyTorch Federated Learning Quickstart with Flower" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" flwr = { path = "../../", develop = true, extras = ["simulation"] } torch = "^1.12.0" torchvision = "^0.14.1" diff --git a/e2e/strategies/pyproject.toml b/e2e/strategies/pyproject.toml index da99b47efe0..611325ce721 100644 --- a/e2e/strategies/pyproject.toml +++ b/e2e/strategies/pyproject.toml @@ -9,6 +9,6 @@ description = "Keras Federated Learning Quickstart with Flower" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.8,<3.11" flwr = { path = "../../", develop = true, extras = ["simulation"] } tensorflow-cpu = "^2.9.1, !=2.11.1" diff --git a/e2e/tensorflow/pyproject.toml b/e2e/tensorflow/pyproject.toml index 22c60fbd7e8..c66ffc30fdf 100644 --- a/e2e/tensorflow/pyproject.toml +++ b/e2e/tensorflow/pyproject.toml @@ -9,6 +9,6 @@ description = "Keras Federated Learning Quickstart with Flower" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.8,<3.11" flwr = { path = "../../", develop = true, extras = ["simulation"] } tensorflow-cpu = "^2.9.1, !=2.11.1" diff --git a/examples/ios/pyproject.toml b/examples/ios/pyproject.toml index 821451fdfd2..531e9253e0d 100644 --- a/examples/ios/pyproject.toml +++ b/examples/ios/pyproject.toml @@ -9,5 +9,5 @@ description = "Example Server for Flower iOS/CoreML" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.8,<3.11" flwr = "^1.0.0" diff --git a/examples/quickstart-fastai/pyproject.toml b/examples/quickstart-fastai/pyproject.toml index cf3a11ec272..ffaa9726749 100644 --- a/examples/quickstart-fastai/pyproject.toml +++ b/examples/quickstart-fastai/pyproject.toml @@ -9,6 +9,6 @@ description = "Fastai Federated Learning Quickstart with Flower" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = ">=3.7,<3.10" +python = ">=3.8,<3.10" flwr = "^1.0.0" fastai = "^2.7.10" diff --git a/examples/quickstart-pytorch-lightning/pyproject.toml b/examples/quickstart-pytorch-lightning/pyproject.toml index b5c14c5c041..0a1e1376b8c 100644 --- a/examples/quickstart-pytorch-lightning/pyproject.toml +++ b/examples/quickstart-pytorch-lightning/pyproject.toml @@ -9,7 +9,7 @@ description = "Federated Learning Quickstart with Flower and PyTorch Lightning" authors = ["The Flower Authors "] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" flwr = ">=1.0,<2.0" # flwr = { path = "../../", develop = true } # Development pytorch-lightning = "1.6.0" From 895a32d102139c44629b3971495ea6011e7b60d5 Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Wed, 6 Sep 2023 15:03:41 +0200 Subject: [PATCH 2/5] Update changelog --- doc/source/ref-changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/ref-changelog.md b/doc/source/ref-changelog.md index a86893c0be0..3186058afc6 100644 --- a/doc/source/ref-changelog.md +++ b/doc/source/ref-changelog.md @@ -6,7 +6,7 @@ ### Incompatible changes -- **Remove support for Python 3.7** ([#2280](https://github.com/adap/flower/pull/2280), [#2299](https://github.com/adap/flower/pull/2299)) +- **Remove support for Python 3.7** ([#2280](https://github.com/adap/flower/pull/2280), [#2299](https://github.com/adap/flower/pull/2299), [2304](https://github.com/adap/flower/pull/2304)) Python 3.7 support was deprecated in Flower 1.5, and this release removes support. Flower now requires Python 3.8. From 106c0cf935d2ad4e164aab058042c5e6c0b0fcbf Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 6 Sep 2023 15:15:07 +0200 Subject: [PATCH 3/5] Update pyproject.toml --- e2e/fastai/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/fastai/pyproject.toml b/e2e/fastai/pyproject.toml index 88d9bc85e56..5eb8710e415 100644 --- a/e2e/fastai/pyproject.toml +++ b/e2e/fastai/pyproject.toml @@ -11,4 +11,4 @@ authors = ["The Flower Authors "] [tool.poetry.dependencies] python = ">=3.8,<3.10" flwr = { path = "../../", develop = true, extras = ["simulation"] } -fastai = "^2.7.10" +fastai = "^2.7.12" From b689bc8c752ea133d5f174cb52e0e5901da6d0e3 Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Wed, 6 Sep 2023 15:58:30 +0200 Subject: [PATCH 4/5] Test with CPU forced --- .github/workflows/e2e.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ded3aa61119..f5938fea2cd 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -61,7 +61,9 @@ jobs: - directory: fastai dataset: | + import fastai from fastai.vision.all import untar_data, URLs + fastai.torch_core.defaults.device = 'cpu' untar_data(URLs.MNIST) - directory: pandas @@ -87,7 +89,7 @@ jobs: run: python -m poetry install - name: Download dataset if: ${{ matrix.dataset }} - run: python -c "${{ matrix.dataset }}" + run: CUDA_VISIBLE_DEVICES="" python -c "${{ matrix.dataset }}" - name: Run edge client test run: ./../test.sh "${{ matrix.directory }}" - name: Run virtual client test From 5eb97893de6f906df56aaddafbc8f825176355c4 Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Wed, 6 Sep 2023 16:06:16 +0200 Subject: [PATCH 5/5] Remove problematic version of torch --- .github/workflows/e2e.yml | 4 +--- e2e/fastai/pyproject.toml | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f5938fea2cd..ded3aa61119 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -61,9 +61,7 @@ jobs: - directory: fastai dataset: | - import fastai from fastai.vision.all import untar_data, URLs - fastai.torch_core.defaults.device = 'cpu' untar_data(URLs.MNIST) - directory: pandas @@ -89,7 +87,7 @@ jobs: run: python -m poetry install - name: Download dataset if: ${{ matrix.dataset }} - run: CUDA_VISIBLE_DEVICES="" python -c "${{ matrix.dataset }}" + run: python -c "${{ matrix.dataset }}" - name: Run edge client test run: ./../test.sh "${{ matrix.directory }}" - name: Run virtual client test diff --git a/e2e/fastai/pyproject.toml b/e2e/fastai/pyproject.toml index 5eb8710e415..ebc19f6328e 100644 --- a/e2e/fastai/pyproject.toml +++ b/e2e/fastai/pyproject.toml @@ -12,3 +12,4 @@ authors = ["The Flower Authors "] python = ">=3.8,<3.10" flwr = { path = "../../", develop = true, extras = ["simulation"] } fastai = "^2.7.12" +torch = ">=2.0.0, !=2.0.1"