Skip to content

Commit

Permalink
Merge branch 'main' into federated-analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
gubertoli authored Feb 6, 2024
2 parents bc59670 + 54da863 commit 04755d9
Show file tree
Hide file tree
Showing 16 changed files with 131 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
flwr-version:
description: "Version of Flower e.g. (1.6.0)."
description: "Version of Flower e.g. (1.7.0)."
required: true
type: string

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
flwr-version:
description: "Version of Flower e.g. (1.6.0)."
description: "Version of Flower e.g. (1.7.0)."
required: true
type: string
base-image-tag:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/framework-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
wheel_url="https://artifact.flower.dev/py/release/v${TAG_NAME}/${wheel_name}"
tar_url="https://artifact.flower.dev/py/release/v${TAG_NAME}/${tar_name}"
curl $wheel_url --output $wheel_name
curl $tar_url --output $tar_name
mkdir -p dist
curl $wheel_url --output dist/$wheel_name
curl $tar_url --output dist/$tar_name
python -m poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions doc/locales/pt_BR/LC_MESSAGES/framework-docs.po
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,13 @@ msgid ""
msgstr ""

#: ../../source/contributor-how-to-install-development-versions.rst:62
msgid "Upload the whl (e.g., ``flwr-1.6.0-py3-none-any.whl``)"
msgid "Upload the whl (e.g., ``flwr-1.7.0-py3-none-any.whl``)"
msgstr ""

#: ../../source/contributor-how-to-install-development-versions.rst:63
msgid ""
"Change ``!pip install -q 'flwr[simulation]' torch torchvision "
"matplotlib`` to ``!pip install -q 'flwr-1.6.0-py3-none-"
"matplotlib`` to ``!pip install -q 'flwr-1.7.0-py3-none-"
"any.whl[simulation]' torch torchvision matplotlib``"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions doc/locales/zh_Hans/LC_MESSAGES/framework-docs.po
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,13 @@ msgid ""
msgstr ""

#: ../../source/contributor-how-to-install-development-versions.rst:62
msgid "Upload the whl (e.g., ``flwr-1.6.0-py3-none-any.whl``)"
msgid "Upload the whl (e.g., ``flwr-1.7.0-py3-none-any.whl``)"
msgstr ""

#: ../../source/contributor-how-to-install-development-versions.rst:63
msgid ""
"Change ``!pip install -q 'flwr[simulation]' torch torchvision "
"matplotlib`` to ``!pip install -q 'flwr-1.6.0-py3-none-"
"matplotlib`` to ``!pip install -q 'flwr-1.7.0-py3-none-"
"any.whl[simulation]' torch torchvision matplotlib``"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
author = "The Flower Authors"

# The full version, including alpha/beta/rc tags
release = "1.7.0"
release = "1.8.0"

# -- General configuration ---------------------------------------------------

Expand Down
8 changes: 4 additions & 4 deletions doc/source/contributor-how-to-build-docker-images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ Building the server image
* - ``FLWR_VERSION``
- Version of Flower to be installed.
- Yes
- ``1.6.0``
- ``1.7.0``

The following example creates a server image with the official Flower base image py3.11-ubuntu22.04
and Flower 1.6.0:
and Flower 1.7.0:

.. code-block:: bash
$ cd src/docker/server/
$ docker build \
--build-arg BASE_IMAGE_TAG=py3.11-ubuntu22.04 \
--build-arg FLWR_VERSION=1.6.0 \
--build-arg FLWR_VERSION=1.7.0 \
-t flwr_server:0.1.0 .
The name of image is ``flwr_server`` and the tag ``0.1.0``. Remember that the build arguments as well
Expand All @@ -125,7 +125,7 @@ the tag of your image.
$ docker build \
--build-arg BASE_REPOSITORY=flwr_base \
--build-arg BASE_IMAGE_TAG=0.1.0 \
--build-arg FLWR_VERSION=1.6.0 \
--build-arg FLWR_VERSION=1.7.0 \
-t flwr_server:0.1.0 .
After creating the image, we can test whether the image is working:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Install ``flwr`` from a local copy of the Flower source code via ``pyproject.tom

Install ``flwr`` from a local wheel file via ``pyproject.toml``:

- ``flwr = { path = "../../dist/flwr-1.0.0-py3-none-any.whl" }`` (without extras)
- ``flwr = { path = "../../dist/flwr-1.0.0-py3-none-any.whl", extras = ["simulation"] }`` (with extras)
- ``flwr = { path = "../../dist/flwr-1.8.0-py3-none-any.whl" }`` (without extras)
- ``flwr = { path = "../../dist/flwr-1.8.0-py3-none-any.whl", extras = ["simulation"] }`` (with extras)

Please refer to the Poetry documentation for further details: `Poetry Dependency Specification <https://python-poetry.org/docs/dependency-specification/>`_

Expand Down Expand Up @@ -59,5 +59,5 @@ Open a development version of the same notebook from branch `branch-name` by cha
Install a `whl` on Google Colab:

1. In the vertical icon grid on the left hand side, select ``Files`` > ``Upload to session storage``
2. Upload the whl (e.g., ``flwr-1.7.0-py3-none-any.whl``)
3. Change ``!pip install -q 'flwr[simulation]' torch torchvision matplotlib`` to ``!pip install -q 'flwr-1.7.0-py3-none-any.whl[simulation]' torch torchvision matplotlib``
2. Upload the whl (e.g., ``flwr-1.8.0-py3-none-any.whl``)
3. Change ``!pip install -q 'flwr[simulation]' torch torchvision matplotlib`` to ``!pip install -q 'flwr-1.8.0-py3-none-any.whl[simulation]' torch torchvision matplotlib``
22 changes: 11 additions & 11 deletions doc/source/how-to-run-flower-using-docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ If you're looking to try out Flower, you can use the following command:

.. code-block:: bash
$ docker run --rm -p 9091:9091 -p 9092:9092 flwr/server:1.6.0-py3.11-ubuntu22.04 \
$ docker run --rm -p 9091:9091 -p 9092:9092 flwr/server:1.7.0-py3.11-ubuntu22.04 \
--insecure
The command will pull the Docker image with the tag ``1.6.0-py3.11-ubuntu22.04`` from Docker Hub.
The command will pull the Docker image with the tag ``1.7.0-py3.11-ubuntu22.04`` from Docker Hub.
The tag contains the information which Flower, Python and Ubuntu is used. In this case, it
uses Flower 1.6.0, Python 3.11 and Ubuntu 22.04. The ``--rm`` flag tells Docker to remove
uses Flower 1.7.0, Python 3.11 and Ubuntu 22.04. The ``--rm`` flag tells Docker to remove
the container after it exits.

.. note::
Expand All @@ -61,7 +61,7 @@ You can use ``--help`` to view all available flags that the server supports:

.. code-block:: bash
$ docker run --rm flwr/server:1.6.0-py3.11-ubuntu22.04 --help
$ docker run --rm flwr/server:1.7.0-py3.11-ubuntu22.04 --help
Mounting a volume to store the state on the host system
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -75,7 +75,7 @@ flag ``--database`` to specify the name of the database file.
.. code-block:: bash
$ docker run --rm \
-p 9091:9091 -p 9092:9092 -v ~/:/app/ flwr/server:1.6.0-py3.11-ubuntu22.04 \
-p 9091:9091 -p 9092:9092 -v ~/:/app/ flwr/server:1.7.0-py3.11-ubuntu22.04 \
--insecure \
--database state.db
Expand All @@ -101,7 +101,7 @@ the server with the ``--certificates`` flag.
.. code-block:: bash
$ docker run --rm \
-p 9091:9091 -p 9092:9092 -v ./certificates/:/app/ flwr/server:1.6.0-py3.11-ubuntu22.04 \
-p 9091:9091 -p 9092:9092 -v ./certificates/:/app/ flwr/server:1.7.0-py3.11-ubuntu22.04 \
--certificates ca.crt server.pem server.key
Using a different Flower or Python version
Expand All @@ -118,19 +118,19 @@ updates of system dependencies that should not change the functionality of Flowe
want to ensure that you always use the same image, you can specify the hash of the image instead of
the tag.

The following command returns the current image hash referenced by the ``server:1.6.0-py3.11-ubuntu22.04`` tag:
The following command returns the current image hash referenced by the ``server:1.7.0-py3.11-ubuntu22.04`` tag:

.. code-block:: bash
$ docker inspect --format='{{index .RepoDigests 0}}' flwr/server:1.6.0-py3.11-ubuntu22.04
flwr/server@sha256:43fc389bcb016feab2b751b2ccafc9e9a906bb0885bd92b972329801086bc017
$ docker inspect --format='{{index .RepoDigests 0}}' flwr/server:1.7.0-py3.11-ubuntu22.04
flwr/server@sha256:c4be5012f9d73e3022e98735a889a463bb2f4f434448ebc19c61379920b1b327
Next, we can pin the hash when running a new server container:

.. code-block:: bash
$ docker run \
--rm flwr/server@sha256:43fc389bcb016feab2b751b2ccafc9e9a906bb0885bd92b972329801086bc017 \
--rm flwr/server@sha256:c4be5012f9d73e3022e98735a889a463bb2f4f434448ebc19c61379920b1b327 \
--insecure
Setting environment variables
Expand All @@ -141,4 +141,4 @@ To set a variable inside a Docker container, you can use the ``-e <name>=<value>
.. code-block:: bash
$ docker run -e FLWR_TELEMETRY_ENABLED=0 \
--rm flwr/server:1.6.0-py3.11-ubuntu22.04 --insecure
--rm flwr/server:1.7.0-py3.11-ubuntu22.04 --insecure
Loading

0 comments on commit 04755d9

Please sign in to comment.