Skip to content

Commit

Permalink
Merge branch 'main' into minor-flwr-dataset-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
gubertoli authored Feb 16, 2024
2 parents 6b148cc + 488fece commit b03e955
Show file tree
Hide file tree
Showing 382 changed files with 41,801 additions and 17,201 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN apt-get install -y curl wget gnupg python3 python-is-python3 python3-pip git
RUN python -m pip install \
pip==23.3.1 \
setuptools==68.2.2 \
poetry==1.5.1
poetry==1.7.1

USER $USERNAME
ENV PATH="/home/$USERNAME/.local/bin:${PATH}"
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Default code owners
* @danieljanes @tanertopal

# README.md
README.md @jafermarq @tanertopal @danieljanes

# Flower Baselines
/baselines @jafermarq @tanertopal @danieljanes

Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Example: The variable `rnd` was renamed to `server_round` to improve readability
<!--
Inside the following 'Changelog entry' section, you should put the description of your changes that will be added to the changelog alongside your PR title.
If the section is completely empty (without any token), the changelog will just contain the title of the PR for the changelog entry, without any description. If the 'Changelog entry' section is removed entirely, it will categorize the PR as "General improvement" and add it to the changelog accordingly. If the section contains some text other than tokens, it will use it to add a description to the change. If the section contains one of the following tokens it will ignore any other text and put the PR under the corresponding section of the changelog:
If the section is completely empty (without any token) or non-existant, the changelog will just contain the title of the PR for the changelog entry, without any description. If the section contains some text other than tokens, it will use it to add a description to the change. If the section contains one of the following tokens it will ignore any other text and put the PR under the corresponding section of the changelog:
<general> is for classifying a PR as a general improvement.
<skip> is to not add the PR to the changelog
Expand All @@ -58,7 +58,7 @@ Note that only one token should be used.

### Changelog entry

<general>


### Any other comments?

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
default: 68.2.2
poetry-version:
description: "Version of poetry to be installed using pip"
default: 1.5.1
default: 1.7.1
outputs:
python-version:
description: "Version range or exact version of Python or PyPy"
Expand All @@ -30,7 +30,7 @@ runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install build tools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
metadata: ${{ steps.meta.outputs.json }}
steps:
- name: Download digests
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
pattern: digests-${{ needs.build.outputs.build-id }}-*
path: /tmp/digests
Expand Down
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
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ jobs:
AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }}
DOCS_BUCKET: flower.ai
run: |
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./doc/build/html/ s3://flower.dev/docs/framework
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./baselines/doc/build/html/ s3://flower.dev/docs/baselines
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./examples/doc/build/html/ s3://flower.dev/docs/examples
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./datasets/doc/build/html/ s3://flower.dev/docs/datasets
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/framework
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./baselines/doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/baselines
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./examples/doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/examples
aws s3 sync --delete --exclude ".*" --exclude "v/*" --cache-control "no-cache" ./datasets/doc/build/html/ s3://${{ env.DOCS_BUCKET }}/docs/datasets
18 changes: 10 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

env:
FLWR_TELEMETRY_ENABLED: 0
ARTIFACT_BUCKET: artifact.flower.ai

jobs:
wheel:
Expand Down Expand Up @@ -43,7 +44,7 @@ jobs:
echo "SHORT_SHA=$sha_short" >> "$GITHUB_OUTPUT"
[ -z "${{ github.head_ref }}" ] && dir="${{ github.ref_name }}" || dir="pr/${{ github.head_ref }}"
echo "DIR=$dir" >> "$GITHUB_OUTPUT"
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./ s3://artifact.flower.dev/py/$dir/$sha_short --recursive
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./ s3://${{ env.ARTIFACT_BUCKET }}/py/$dir/$sha_short --recursive
outputs:
whl_path: ${{ steps.upload.outputs.WHL_PATH }}
short_sha: ${{ steps.upload.outputs.SHORT_SHA }}
Expand Down Expand Up @@ -89,11 +90,6 @@ jobs:
from torchvision.datasets import MNIST
MNIST('./data', download=True)
- directory: mxnet
dataset: |
import mxnet as mx
mx.test_utils.get_mnist()
- directory: scikit-learn
dataset: |
import openml
Expand Down Expand Up @@ -128,7 +124,7 @@ jobs:
- name: Install Flower wheel from artifact store
if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
python -m pip install https://artifact.flower.dev/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}
python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}
- name: Download dataset
if: ${{ matrix.dataset }}
run: python -c "${{ matrix.dataset }}"
Expand All @@ -138,6 +134,12 @@ jobs:
run: python simulation.py
- name: Run driver test
run: ./../test_driver.sh "${{ matrix.directory }}"
- name: Run driver test with REST
if: ${{ matrix.directory == 'bare' }}
run: ./../test_driver.sh bare rest
- name: Run driver test with SQLite database
if: ${{ matrix.directory == 'bare' }}
run: ./../test_driver.sh bare sqlite

strategies:
runs-on: ubuntu-22.04
Expand All @@ -163,7 +165,7 @@ jobs:
- name: Install Flower wheel from artifact store
if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
run: |
python -m pip install https://artifact.flower.dev/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}
python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }}
- name: Cache Datasets
uses: actions/cache@v3
with:
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/framework-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- "v*.*.*"

env:
ARTIFACT_BUCKET: artifact.flower.ai

jobs:
publish:
if: ${{ github.repository == 'adap/flower' }}
Expand All @@ -26,16 +29,16 @@ jobs:
run: |
tag_name=$(echo "${GITHUB_REF_NAME}" | cut -c2-)
echo "TAG_NAME=$tag_name" >> "$GITHUB_ENV"
wheel_name="flwr-${tag_name}-py3-none-any.whl"
echo "WHEEL_NAME=$wheel_name" >> "$GITHUB_ENV"
tar_name="flwr-${tag_name}.tar.gz"
echo "TAR_NAME=$tar_name" >> "$GITHUB_ENV"
wheel_url="https://artifact.flower.dev/py/main/${GITHUB_SHA::7}/${wheel_name}"
tar_url="https://artifact.flower.dev/py/main/${GITHUB_SHA::7}/${tar_name}"
wheel_url="https://${{ env.ARTIFACT_BUCKET }}/py/main/${GITHUB_SHA::7}/${wheel_name}"
tar_url="https://${{ env.ARTIFACT_BUCKET }}/py/main/${GITHUB_SHA::7}/${tar_name}"
curl $wheel_url --output $wheel_name
curl $tar_url --output $tar_name
- name: Upload wheel
Expand All @@ -44,14 +47,14 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.WHEEL_NAME }} s3://artifact.flower.dev/py/release/v${{ env.TAG_NAME }}/${{ env.WHEEL_NAME }}
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.TAR_NAME }} s3://artifact.flower.dev/py/release/v${{ env.TAG_NAME }}/${{ env.TAR_NAME }}
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.WHEEL_NAME }} s3://${{ env.ARTIFACT_BUCKET }}/py/release/v${{ env.TAG_NAME }}/${{ env.WHEEL_NAME }}
aws s3 cp --content-disposition "attachment" --cache-control "no-cache" ./${{ env.TAR_NAME }} s3://${{ env.ARTIFACT_BUCKET }}/py/release/v${{ env.TAG_NAME }}/${{ env.TAR_NAME }}
- name: Generate body
run: |
./dev/get-latest-changelog.sh > body.md
cat body.md
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/framework-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: Publish `flwr` release on PyPI
on:
release:
types: [released]

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true


env:
ARTIFACT_BUCKET: artifact.flower.ai

jobs:
publish:
if: ${{ github.repository == 'adap/flower' }}
Expand All @@ -28,13 +31,15 @@ jobs:
run: |
TAG_NAME=$(echo "${GITHUB_REF_NAME}" | cut -c2-)
wheel_name="flwr-${TAG_NAME}-py3-none-any.whl"
wheel_name="flwr-${TAG_NAME}-py3-none-any.whl"
tar_name="flwr-${TAG_NAME}.tar.gz"
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}"
wheel_url="https://${{ env.ARTIFACT_BUCKET }}/py/release/v${TAG_NAME}/${wheel_name}"
tar_url="https://${{ env.ARTIFACT_BUCKET }}/py/release/v${TAG_NAME}/${tar_name}"
mkdir -p dist
curl $wheel_url --output $wheel_name
curl $tar_url --output $tar_name
curl $wheel_url --output dist/$wheel_name
curl $tar_url --output dist/$tar_name
python -m poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# In case of a mismatch, the job has to download Python to install it.
# Note: Due to a bug in actions/setup-python we have to put 3.10 in
# qoutes as it will otherwise will assume 3.1
python: [3.8, 3.9, '3.10']
python: [3.8, 3.9, '3.10', '3.11']

name: Python ${{ matrix.python }}

Expand Down
Loading

0 comments on commit b03e955

Please sign in to comment.