Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove flwr_example and flwr_experimental from packages #869

Merged
merged 9 commits into from
Dec 30, 2021
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
python -m pip install -U poetry==1.1.12
poetry config virtualenvs.create false
- name: Install dependencies (mandatory only)
run: python -m poetry install --extras "baseline examples-tensorflow examples-pytorch http-logger ops simulation"
run: python -m poetry install --extras "simulation"
- name: Build and deploy docs
env:
AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }}
Expand All @@ -48,7 +48,7 @@ jobs:
python -m pip install -U poetry==1.1.12
poetry config virtualenvs.create false
- name: Install dependencies (mandatory only)
run: python -m poetry install --extras "baseline examples-tensorflow examples-pytorch http-logger ops simulation"
run: python -m poetry install --extras "simulation"
- name: Build and deploy docs
env:
AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }}
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/flower.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,72 +33,3 @@ jobs:
run: ./dev/check-protos.sh
- name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest)
run: ./dev/test.sh

test_baseline:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7.12
- name: Install build tools
run: |
python -m pip install -U pip==21.3.1
python -m pip install -U setuptools==59.6.0
python -m pip install -U poetry==1.1.12
poetry config virtualenvs.create false
- name: Install dependencies (mandatory + optional)
run: |
python -m poetry install --extras "baseline"
python -m pip install -U tensorflow-cpu==2.6.2
- name: Cache Datasets
uses: actions/cache@v2
with:
path: "~/.keras"
key: keras-datasets
- name: Download Datasets
run: |
python -c "import tensorflow as tf; tf.keras.datasets.cifar10.load_data()"
- name: Lint + Test (isort/black/mypy/pylint/pytest)
run: ./dev/test-baseline.sh

test_example_pytorch:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7.12
- name: Install build tools
run: |
python -m pip install -U pip==21.3.1
python -m pip install -U setuptools==59.6.0
python -m pip install -U poetry==1.1.12
poetry config virtualenvs.create false
- name: Install dependencies (mandatory + optional)
run: |
python -m poetry install --extras "examples-pytorch"
- name: Lint + Test (isort/black/mypy/pylint/pytest)
run: ./dev/test-example-pytorch.sh

test_example_tensorflow:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7.12
- name: Install build tools
run: |
python -m pip install -U pip==21.3.1
python -m pip install -U setuptools==59.6.0
python -m pip install -U poetry==1.1.12
poetry config virtualenvs.create false
- name: Install dependencies (mandatory + optional)
run: |
python -m poetry install --extras "examples-tensorflow"
- name: Lint + Test (isort/black/mypy/pylint/pytest)
run: ./dev/test-example-tensorflow.sh
34 changes: 0 additions & 34 deletions .github/workflows/flower_ops.yml

This file was deleted.

5 changes: 0 additions & 5 deletions dev/fnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,4 @@ echo "Format code and run all test scripts"
./dev/test.sh
./baselines/dev/test.sh

./dev/test-baseline.sh
./dev/test-example-pytorch.sh
./dev/test-example-tensorflow.sh
./dev/test-logserver.sh
./dev/test-ops.sh
./dev/test-tool.sh
1 change: 0 additions & 1 deletion dev/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../
python -m isort --skip src/py/flwr/proto src/py
python -m black -q --exclude src/py/flwr/proto src/py
python -m docformatter -i -r src/py/flwr -e src/py/flwr/proto
python -m docformatter -i -r src/py/flwr_experimental

# Protos
find src/proto/flwr/proto -name *.proto | grep "\.proto" | xargs clang-format-10 -i
Expand Down
12 changes: 0 additions & 12 deletions dev/test-baseline.sh

This file was deleted.

12 changes: 0 additions & 12 deletions dev/test-example-pytorch.sh

This file was deleted.

12 changes: 0 additions & 12 deletions dev/test-example-tensorflow.sh

This file was deleted.

12 changes: 0 additions & 12 deletions dev/test-logserver.sh

This file was deleted.

12 changes: 0 additions & 12 deletions dev/test-ops.sh

This file was deleted.

11 changes: 10 additions & 1 deletion doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ What's new?
* Update num_examples caclulation in PyTorch code examples in (`#909 <https://github.com/adap/flower/pull/909>`_)
* Expose Flower version through "flwr.__version__" (`#952 <https://github.com/adap/flower/pull/952>`_)


Incompatible changes:
~~~~~~~~~~~~~~~~~~~~~

* **Removed** :code:`flwr_example` **and** :code:`flwr_experimental` **from release build** (`#869 <https://github.com/adap/flower/pull/869>`_)

The packages :code:`flwr_example` and :code:`flwr_experimental` have been deprecated since Flower 0.12.0 and they are not longer included in Flower release builds. The associated extras (:code:`baseline`, :code:`examples-pytorch`, :code:`examples-tensorflow`, :code:`http-logger`, :code:`ops`) are now no-op and will be removed in an upcoming release.


v0.17.0 (2021-09-24)
--------------------

Expand Down Expand Up @@ -217,7 +226,7 @@ Important changes:

* Added an example for embedded devices (`#507 <https://github.com/adap/flower/pull/507>`_)
* Added a new NumPyClient (in addition to the existing KerasClient) (`#504 <https://github.com/adap/flower/pull/504>`_ `#508 <https://github.com/adap/flower/pull/508>`_)
* Deprecated `flwr_examples` package and started to migrate examples into the top-level `examples` directory (`#494 <https://github.com/adap/flower/pull/494>`_ `#512 <https://github.com/adap/flower/pull/512>`_)
* Deprecated `flwr_example` package and started to migrate examples into the top-level `examples` directory (`#494 <https://github.com/adap/flower/pull/494>`_ `#512 <https://github.com/adap/flower/pull/512>`_)


v0.11.0 (2020-11-30)
Expand Down
31 changes: 6 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ classifiers = [
]
packages = [
{ include = "flwr", from = "src/py" },
{ include = "flwr_example", from = "src/py" },
{ include = "flwr_experimental", from = "src/py" },
]
exclude = [
"src/py/**/*_test.py",
Expand All @@ -56,24 +54,15 @@ importlib-metadata = { version = "^1.0", python = "<3.8" }
protobuf = "^3.12.1"
dataclasses = { version = "==0.6", markers = "python_version < '3.7'" }
# Optional dependencies
tensorflow-cpu = { version = "==2.6.2", optional = true }
torch = { version = "^1.10.1", optional = true }
torchvision = { version = "^0.11.2", optional = true }
boto3 = { version = "^1.12.36", optional = true }
boto3_type_annotations = { version = "^0.3.1", optional = true }
paramiko = { version = "^2.7.1", optional = true }
docker = { version = "^4.2.0", optional = true }
matplotlib = { version = "^3.2.1", optional = true }
tqdm = { version = "^4.48.2", optional = true }
ray = { extras = ["default"], version = "==1.6.0", optional = true }

[tool.poetry.extras]
simulation = ["ray"]
baseline = ["tensorflow-cpu", "boto3", "boto3_type_annotations", "paramiko", "docker", "matplotlib"]
examples-pytorch = ["torch", "torchvision", "tqdm"]
examples-tensorflow = ["tensorflow-cpu"]
http-logger = ["boto3", "boto3_type_annotations", "tensorflow-cpu", "boto3", "boto3_type_annotations", "paramiko", "docker", "matplotlib"]
ops = ["boto3", "boto3_type_annotations", "paramiko", "docker"]
baseline = []
examples-pytorch = []
examples-tensorflow = []
http-logger = []
ops = []

[tool.poetry.dev-dependencies]
types-protobuf = "^3.17.4"
Expand Down Expand Up @@ -102,7 +91,7 @@ multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
known_first_party = ["flwr", "flwr_example", "flwr_experimental", "flwr_tool"]
known_first_party = ["flwr", "flwr_tool"]

[tool.black]
line-length = 88
Expand All @@ -123,14 +112,6 @@ testpaths = [
ignore_missing_imports = true
strict = true

[[tool.mypy.overrides]]
module = "flwr_example.*"
ignore_errors = true

[[tool.mypy.overrides]]
module = "flwr_experimental.*"
ignore_errors = true

[[tool.mypy.overrides]]
module = "torch.*"
follow_imports = "skip"
Expand Down