From caeefb7ad1e348db234989c54dea2b87f280a481 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 28 Jun 2023 15:37:27 +0200 Subject: [PATCH 01/96] Add dependency caching step to tests in CI --- .github/workflows/baselines.yml | 9 +++++++++ .github/workflows/docs.yml | 11 ++++++++++- .github/workflows/e2e.yml | 27 +++++++++++++++++++++++++++ .github/workflows/flower.yml | 8 ++++++++ .github/workflows/flower_nightly.yml | 9 +++++++++ .github/workflows/flower_tool.yml | 9 +++++++++ 6 files changed, 72 insertions(+), 1 deletion(-) diff --git a/.github/workflows/baselines.yml b/.github/workflows/baselines.yml index 5f083aa1f797..128e4f99a290 100644 --- a/.github/workflows/baselines.yml +++ b/.github/workflows/baselines.yml @@ -21,9 +21,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.8.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==23.1.2 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6f81a9899865..35c489ce84f9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,10 +16,19 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Build docs + - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.7.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | sudo apt install pandoc diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5868d2022161..86224b1e09c0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,9 +17,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.7.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install run: | python -m pip install -U pip==22.3.1 @@ -49,9 +58,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.7.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install run: | python -m pip install -U pip==22.3.1 @@ -81,9 +99,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.7.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install run: | python -m pip install -U pip==22.3.1 diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 2eb561c74fda..537803ed4c1b 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -23,6 +23,14 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==23.1.2 diff --git a/.github/workflows/flower_nightly.yml b/.github/workflows/flower_nightly.yml index babc4cb7a2d6..71d5def08ea7 100644 --- a/.github/workflows/flower_nightly.yml +++ b/.github/workflows/flower_nightly.yml @@ -13,9 +13,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.7.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==23.1.2 diff --git a/.github/workflows/flower_tool.yml b/.github/workflows/flower_tool.yml index 04979e188664..79d798b2c00d 100644 --- a/.github/workflows/flower_tool.yml +++ b/.github/workflows/flower_tool.yml @@ -21,9 +21,18 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: 3.7.15 + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==23.1.2 From 51bf749b4f6a7474d92c36dbe45615404f8822f6 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 16:57:16 +0200 Subject: [PATCH 02/96] Git add bootstrap action --- .github/actions/bootstrap.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/actions/bootstrap.yaml diff --git a/.github/actions/bootstrap.yaml b/.github/actions/bootstrap.yaml new file mode 100644 index 000000000000..d0a1b612a125 --- /dev/null +++ b/.github/actions/bootstrap.yaml @@ -0,0 +1,28 @@ +name: "Flower CI bootstrap action" +description: "Setup test environment for Flower CI" +inputs: + python-version: + description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." + required: true +runs: + using: "composite" + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} + - name: Install build tools + run: | + python -m pip install -U pip==23.1.2 + python -m pip install -U setuptools==68.0.0 + python -m pip install -U poetry==1.5.1 + poetry config virtualenvs.create false From 36d8533487774445c27fe895bfcd9225002c0854 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 18:26:19 +0200 Subject: [PATCH 03/96] Improve caching --- .github/actions/bootstrap.yaml | 28 ---------------------- .github/actions/bootstrap/action.yml | 35 ++++++++++++++++++++++++++++ .github/workflows/flower.yml | 26 ++++++++------------- 3 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 .github/actions/bootstrap.yaml create mode 100644 .github/actions/bootstrap/action.yml diff --git a/.github/actions/bootstrap.yaml b/.github/actions/bootstrap.yaml deleted file mode 100644 index d0a1b612a125..000000000000 --- a/.github/actions/bootstrap.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: "Flower CI bootstrap action" -description: "Setup test environment for Flower CI" -inputs: - python-version: - description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - required: true -runs: - using: "composite" - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install build tools - run: | - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml new file mode 100644 index 000000000000..d117ed7aaab0 --- /dev/null +++ b/.github/actions/bootstrap/action.yml @@ -0,0 +1,35 @@ +name: "Flower CI bootstrap action" +description: "Setup test environment for Flower CI" +inputs: + python-version: + description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." + pip-version: + description: "Version of pip to be installed using pip" + default: 23.1.2 + setuptools-version: + description: "Version of setuptools to be installed using pip" + default: 68.0.0 + poetry-version: + description: "Version of poetry to be installed using pip" + default: 1.5.1 +runs: + using: "composite" + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ inputs.python-version }} + - name: Cache Python dependencies + uses: actions/cache@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ python-version }}-${{ hashFiles('**/pyproject.toml') }} + - name: Install build tools + run: | + python -m pip install -U pip==${{ inputs.pip-version }} + python -m pip install -U setuptools==${{ inputs.setuptools-version }} + python -m pip install -U poetry==${{ inputs.poetry-version }} + python -m poetry config virtualenvs.create false diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 537803ed4c1b..162478783349 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,27 +16,21 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [3.7.15, 3.8.15, 3.9.16, 3.10.9] + python: [ + 3.7.15, + 3.8.15, + 3.9.16, + 3.10.9 + ] steps: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v4 + uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python }} - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install build tools - run: | - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false + pip-version: 23.1.2 + setuptools-version: 68.0.0 + poetry-version: 1.5.1 - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras - name: Check if protos need recompilation From 911d82bc732d535b6a94997ca190fb12cde2271b Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 18:26:56 +0200 Subject: [PATCH 04/96] Fix --- .github/workflows/flower.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 162478783349..32415d4e7b94 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,12 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [ - 3.7.15, - 3.8.15, - 3.9.16, - 3.10.9 - ] + python: [3.7.15,3.8.15,3.9.16,3.10.9] steps: - uses: actions/checkout@v3 - name: Set up Python From c46bfce9eebd9f3f1671374498dfd6bff0bd068a Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 18:27:14 +0200 Subject: [PATCH 05/96] Fix --- .github/workflows/flower.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 32415d4e7b94..e444d2b37450 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -19,7 +19,7 @@ jobs: python: [3.7.15,3.8.15,3.9.16,3.10.9] steps: - uses: actions/checkout@v3 - - name: Set up Python + - name: Bootstrap uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python }} From 9b6e45493b2a3b2ca693b4739ed191ab24a22cdb Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 18:30:29 +0200 Subject: [PATCH 06/96] Fix --- .github/workflows/baselines.yml | 22 +-------- .github/workflows/deprecated_baselines.yml | 12 ++--- .github/workflows/e2e.yml | 57 +++------------------- .github/workflows/flower.yml | 3 -- .github/workflows/flower_nightly.yml | 18 +------ .github/workflows/flower_tool.yml | 19 +------- 6 files changed, 15 insertions(+), 116 deletions(-) diff --git a/.github/workflows/baselines.yml b/.github/workflows/baselines.yml index 1488687fb590..eff38687b30c 100644 --- a/.github/workflows/baselines.yml +++ b/.github/workflows/baselines.yml @@ -98,28 +98,10 @@ jobs: echo "changed_dir=${dirs[0]}" >> "$GITHUB_OUTPUT" echo "baseline_changed=true" >> "$GITHUB_OUTPUT" - - name: Set up Python - id: setup-python - if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: python-version: 3.8.15 - - name: Cache Python dependencies - if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install build tools - if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' - run: | - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false - name: Install dependencies if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' run: | diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index 294830f7dd25..65374c468ee3 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -20,16 +20,10 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: - python-version: 3.8.15 - - name: Install build tools - run: | - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false + python-version: 3.7.15 - name: Install dependencies run: | python -m poetry install diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6425f4f584d5..c7937416bb1b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,25 +17,10 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: python-version: 3.7.15 - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false - name: Install dependencies run: | cd e2e/pytorch @@ -63,25 +48,10 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: python-version: 3.7.15 - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false - name: Install dependencies run: | cd e2e/tensorflow @@ -110,25 +80,10 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: python-version: 3.7.15 - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false - name: Install dependencies run: | cd e2e/bare diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index e444d2b37450..50c4372881be 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -23,9 +23,6 @@ jobs: uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python }} - pip-version: 23.1.2 - setuptools-version: 68.0.0 - poetry-version: 1.5.1 - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras - name: Check if protos need recompilation diff --git a/.github/workflows/flower_nightly.yml b/.github/workflows/flower_nightly.yml index 71d5def08ea7..227ed3d4d21a 100644 --- a/.github/workflows/flower_nightly.yml +++ b/.github/workflows/flower_nightly.yml @@ -12,24 +12,10 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: python-version: 3.7.15 - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install build tools - run: | - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - name: Release nightly env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/flower_tool.yml b/.github/workflows/flower_tool.yml index 79d798b2c00d..3d85f8f27f31 100644 --- a/.github/workflows/flower_tool.yml +++ b/.github/workflows/flower_tool.yml @@ -20,25 +20,10 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v4 + - name: Bootstrap + uses: ./.github/actions/bootstrap with: python-version: 3.7.15 - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install build tools - run: | - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false - name: Install dependencies (mandatory + optional) run: | python -m poetry install From 0eac4f8db6fed0879651afde880fcf0237882d10 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 19:07:15 +0200 Subject: [PATCH 07/96] Remove caching --- .github/actions/bootstrap/action.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index d117ed7aaab0..f1c2b0595d84 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -19,14 +19,6 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==${{ inputs.pip-version }} From d3105a80e6c95b54ff679ad2face2930869dd4f1 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 19:11:55 +0200 Subject: [PATCH 08/96] Fix --- .github/actions/bootstrap/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index f1c2b0595d84..a3246e3f3838 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -1,5 +1,5 @@ -name: "Flower CI bootstrap action" -description: "Setup test environment for Flower CI" +name: "bootstrap" +description: "Bootstrap Python environment including Python dependencies and configure optimizations." inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." From 19cfe019bf770b459e1b832f25ef8a784573a0f0 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 19:24:52 +0200 Subject: [PATCH 09/96] Add required property --- .github/workflows/flower.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 50c4372881be..c59df7b93336 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [3.7.15,3.8.15,3.9.16,3.10.9] + python: [3.8.15] steps: - uses: actions/checkout@v3 - name: Bootstrap @@ -25,7 +25,10 @@ jobs: python-version: ${{ matrix.python }} - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras + shell: bash - name: Check if protos need recompilation run: ./dev/check-protos.sh + shell: bash - name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest) run: ./dev/test.sh + shell: bash From 92f282d8f832dc6142f5c9f1168b4451251ecea8 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 19:27:31 +0200 Subject: [PATCH 10/96] Fix --- .github/actions/bootstrap/action.yml | 2 ++ .github/workflows/flower.yml | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index a3246e3f3838..c9454d507ba9 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -19,9 +19,11 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} + shell: bash - name: Install build tools run: | python -m pip install -U pip==${{ inputs.pip-version }} python -m pip install -U setuptools==${{ inputs.setuptools-version }} python -m pip install -U poetry==${{ inputs.poetry-version }} python -m poetry config virtualenvs.create false + shell: bash diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index c59df7b93336..c82a5f639b07 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -25,10 +25,7 @@ jobs: python-version: ${{ matrix.python }} - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras - shell: bash - name: Check if protos need recompilation run: ./dev/check-protos.sh - shell: bash - name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest) run: ./dev/test.sh - shell: bash From a4b0697d15a517c44b74ceb2017de7b7ccfe0300 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 19:28:41 +0200 Subject: [PATCH 11/96] fix --- .github/actions/bootstrap/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index c9454d507ba9..b940b1dc300b 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -19,7 +19,6 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} - shell: bash - name: Install build tools run: | python -m pip install -U pip==${{ inputs.pip-version }} From bd8b5afd2dbfb015d53c5966b694030416532850 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 19:41:08 +0200 Subject: [PATCH 12/96] fix --- .github/workflows/flower.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index c82a5f639b07..da37cfdafbd5 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [3.8.15] + python: [3.8.15,3.9.16,3.10.9] steps: - uses: actions/checkout@v3 - name: Bootstrap From b12ab2c7a86469b315475f52948d30c105a8a874 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 22:53:39 +0200 Subject: [PATCH 13/96] fix --- .github/workflows/deprecated_baselines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index 65374c468ee3..c4544e55ddf6 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -23,7 +23,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.7.15 + python-version: 3.8.15 - name: Install dependencies run: | python -m poetry install From a1e9371e7ec626d3491ffae58965124ae11175d3 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Tue, 11 Jul 2023 22:55:05 +0200 Subject: [PATCH 14/96] fix --- .github/workflows/flower.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index da37cfdafbd5..cafc7b009b9e 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [3.8.15,3.9.16,3.10.9] + python: [3.7.15, 3.8.15, 3.9.16, 3.10.9] steps: - uses: actions/checkout@v3 - name: Bootstrap From f359f7f4a2226e796ef47972c7a3b30a3dd3fbe3 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 01:01:08 +0200 Subject: [PATCH 15/96] fix --- .github/workflows/flower.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index cafc7b009b9e..cdcb13f422fa 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -13,7 +13,8 @@ env: jobs: test_core: - runs-on: ubuntu-22.04 + # runs-on: ubuntu-22.04 + runs-on: [self-hosted, Linux, X64] strategy: matrix: python: [3.7.15, 3.8.15, 3.9.16, 3.10.9] From 078e9b766a092df021ccb009077484babbec0174 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 01:07:38 +0200 Subject: [PATCH 16/96] fix --- .github/workflows/flower.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index cdcb13f422fa..cafc7b009b9e 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -13,8 +13,7 @@ env: jobs: test_core: - # runs-on: ubuntu-22.04 - runs-on: [self-hosted, Linux, X64] + runs-on: ubuntu-22.04 strategy: matrix: python: [3.7.15, 3.8.15, 3.9.16, 3.10.9] From 924037358d0e739dc895bd897853ce08465ac5d1 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 09:40:02 +0200 Subject: [PATCH 17/96] Fix a few more places --- .github/actions/bootstrap/action.yml | 1 + .github/workflows/baselines.yml | 2 +- .github/workflows/deprecated_baselines.yml | 2 +- .github/workflows/docs.yml | 35 ++------------ .github/workflows/e2e.yml | 54 ++++------------------ .github/workflows/flower.yml | 2 +- .github/workflows/flower_tool.yml | 2 - 7 files changed, 16 insertions(+), 82 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index b940b1dc300b..e38a761ebfae 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,6 +3,7 @@ description: "Bootstrap Python environment including Python dependencies and con inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." + default: 3.8.16 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 diff --git a/.github/workflows/baselines.yml b/.github/workflows/baselines.yml index 4bbde67a0aeb..6fda050f1c68 100644 --- a/.github/workflows/baselines.yml +++ b/.github/workflows/baselines.yml @@ -107,7 +107,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.15 + python-version: 3.8.16 - name: Install dependencies if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' run: | diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index c4544e55ddf6..df04c2a68dc9 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -23,7 +23,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.15 + python-version: 3.8.16 - name: Install dependencies run: | python -m poetry install diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 35c489ce84f9..1e877fd24988 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,26 +16,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Set up Python - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: 3.7.15 - - name: Cache Python dependencies - uses: actions/cache@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - name: Install build tools - run: | - sudo apt install pandoc - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies (mandatory only) run: python -m poetry install --extras "simulation" - name: Build and deploy docs @@ -51,17 +33,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Deploy docs - uses: actions/setup-python@v4 - with: - python-version: 3.7.15 - - name: Install build tools - run: | - sudo apt install pandoc - python -m pip install -U pip==23.1.2 - python -m pip install -U setuptools==68.0.0 - python -m pip install -U poetry==1.5.1 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies (mandatory only) run: python -m poetry install --extras "simulation" - name: Build and deploy docs diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c7937416bb1b..0f8a79c66b76 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -19,8 +19,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.7.15 - name: Install dependencies run: | cd e2e/pytorch @@ -50,8 +48,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.7.15 - name: Install dependencies run: | cd e2e/tensorflow @@ -82,8 +78,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.7.15 - name: Install dependencies run: | cd e2e/bare @@ -104,16 +98,8 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8.16 - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies run: | cd e2e/pandas @@ -144,16 +130,8 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8.16 - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies run: | cd e2e/jax @@ -174,16 +152,8 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8.16 - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies run: | cd e2e/mxnet @@ -208,16 +178,8 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8.16 - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies run: | cd e2e/scikit-learn diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index cafc7b009b9e..b3ebad78b845 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [3.7.15, 3.8.15, 3.9.16, 3.10.9] + python: [3.7.15, 3.8.16, 3.9.16, 3.10.9] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/flower_tool.yml b/.github/workflows/flower_tool.yml index 3d85f8f27f31..cdc593927b78 100644 --- a/.github/workflows/flower_tool.yml +++ b/.github/workflows/flower_tool.yml @@ -22,8 +22,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.7.15 - name: Install dependencies (mandatory + optional) run: | python -m poetry install From c6e1b28e83558e0f83e4459d6f24b00f11e619c1 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 09:41:21 +0200 Subject: [PATCH 18/96] Fix --- .github/workflows/baselines.yml | 2 -- .github/workflows/deprecated_baselines.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/baselines.yml b/.github/workflows/baselines.yml index 6fda050f1c68..cc08f892203a 100644 --- a/.github/workflows/baselines.yml +++ b/.github/workflows/baselines.yml @@ -106,8 +106,6 @@ jobs: echo "baseline_changed=true" >> "$GITHUB_OUTPUT" - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.8.16 - name: Install dependencies if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' run: | diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index df04c2a68dc9..01bd7391e845 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -22,8 +22,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.8.16 - name: Install dependencies run: | python -m poetry install From 39682f3991b2cefc560cc2f736d15c0291cedd09 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 09:48:46 +0200 Subject: [PATCH 19/96] Fix pandoc --- .github/workflows/docs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1e877fd24988..12d64a08685e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,6 +18,8 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap + - name: Install pandoc + run: sudo apt install pandoc - name: Install dependencies (mandatory only) run: python -m poetry install --extras "simulation" - name: Build and deploy docs @@ -35,6 +37,8 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap + - name: Install pandoc + run: sudo apt install pandoc - name: Install dependencies (mandatory only) run: python -m poetry install --extras "simulation" - name: Build and deploy docs From 0f3ffff2b624601450589b001c09dde054d93a83 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 09:52:18 +0200 Subject: [PATCH 20/96] Add condition back to baselines --- .github/workflows/baselines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/baselines.yml b/.github/workflows/baselines.yml index cc08f892203a..270f4a6559b3 100644 --- a/.github/workflows/baselines.yml +++ b/.github/workflows/baselines.yml @@ -105,6 +105,7 @@ jobs: echo "changed_dir=${dirs[0]}" >> "$GITHUB_OUTPUT" echo "baseline_changed=true" >> "$GITHUB_OUTPUT" - name: Bootstrap + if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' uses: ./.github/actions/bootstrap - name: Install dependencies if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' From f5d2f1383045fd86752b3d73e76e3f804b4fd123 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 10:01:35 +0200 Subject: [PATCH 21/96] fix --- .github/workflows/e2e.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0f8a79c66b76..7a6e826dbdd6 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,7 +24,7 @@ jobs: cd e2e/pytorch python -m poetry install - name: Cache Datasets - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "./e2e/pytorch/data" key: pytorch-datasets @@ -53,7 +53,7 @@ jobs: cd e2e/tensorflow python -m poetry install - name: Cache Datasets - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "~/.keras" key: keras-datasets @@ -105,7 +105,7 @@ jobs: cd e2e/pandas python -m poetry install - name: Cache Datasets - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "./e2e/pandas/data" key: pandas-datasets From 756eb4788f38d09d81ef2feead6ead761a16e3b3 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 10:48:37 +0200 Subject: [PATCH 22/96] Fix --- .github/actions/bootstrap/action.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index e38a761ebfae..4dc86d297b88 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -15,11 +15,31 @@ inputs: default: 1.5.1 runs: using: "composite" + post: + steps: + - name: Cache Python dependencies + if: github.ref == 'refs/heads/main' + uses: actions/cache/save@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ python-version }}-${{ hashFiles('**/pyproject.toml') }} + post-if: success() && github.ref == 'refs/heads/main' steps: - name: Set up Python uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} + - uses: actions/cache/restore@v3 + if: github.ref != 'refs/heads/main' + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==${{ inputs.pip-version }} From 4eca0666b82e1b1ac90984a8b9413155a030a5c6 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 10:55:46 +0200 Subject: [PATCH 23/96] Add dedicated job to populate CI cache --- .github/actions/bootstrap/action.yml | 15 ++--------- .github/workflows/ci-cache.yml | 37 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/ci-cache.yml diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 4dc86d297b88..e97085003c84 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -15,18 +15,6 @@ inputs: default: 1.5.1 runs: using: "composite" - post: - steps: - - name: Cache Python dependencies - if: github.ref == 'refs/heads/main' - uses: actions/cache/save@v3 - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ python-version }}-${{ hashFiles('**/pyproject.toml') }} - post-if: success() && github.ref == 'refs/heads/main' steps: - name: Set up Python uses: actions/setup-python@v4 @@ -39,7 +27,7 @@ runs: **/poetry.lock ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-cache-${{ inputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U pip==${{ inputs.pip-version }} @@ -47,3 +35,4 @@ runs: python -m pip install -U poetry==${{ inputs.poetry-version }} python -m poetry config virtualenvs.create false shell: bash + diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml new file mode 100644 index 000000000000..9c1faf31eb40 --- /dev/null +++ b/.github/workflows/ci-cache.yml @@ -0,0 +1,37 @@ +name: CI Cache + +on: + push: + branches: + - main + # Remove this section before merging as we + # only want to populate cache in main + pull_request: + branches: + - main + +env: + FLWR_TELEMETRY_ENABLED: 0 + +jobs: + test_core: + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: [3.7.15, 3.8.16, 3.9.16, 3.10.9] + steps: + - uses: actions/checkout@v3 + - name: Bootstrap + uses: ./.github/actions/bootstrap + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: python -m poetry install --all-extras + - name: Cache Python dependencies + uses: actions/cache/save@v3 + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} From 9fca3f0a44818839e87b7b15e851a5ddca46217e Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 11:41:41 +0200 Subject: [PATCH 24/96] Fix --- .github/workflows/e2e.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b6abcdb94382..36fb2e8dbbfa 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -202,16 +202,8 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.8.17 - - name: Install - run: | - python -m pip install -U pip==22.3.1 - python -m pip install -U setuptools==65.6.3 - python -m pip install poetry==1.3.2 - poetry config virtualenvs.create false + - name: Bootstrap + uses: ./.github/actions/bootstrap - name: Install dependencies run: | cd e2e/opacus From 4bb8d83f27eeb9452a631887ebb5de05b70958e7 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 13:03:56 +0200 Subject: [PATCH 25/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- .github/workflows/ci-cache.yml | 2 +- .github/workflows/flower.yml | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index e97085003c84..f70db550917f 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,7 +3,7 @@ description: "Bootstrap Python environment including Python dependencies and con inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - default: 3.8.16 + default: 3.8 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 9c1faf31eb40..577c24bb246c 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -15,7 +15,7 @@ env: jobs: test_core: - runs-on: ubuntu-22.04 + runs-on: ubuntu-22.04-2core strategy: matrix: python-version: [3.7.15, 3.8.16, 3.9.16, 3.10.9] diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index b3ebad78b845..8a9140f6ea04 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,7 +16,11 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python: [3.7.15, 3.8.16, 3.9.16, 3.10.9] + # Only use versions found here: + # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python + # to ensure they are loaded from the runner image hosted tool cache + # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache + python: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap From d1c5dacb92b6c0e65856e800c4b6d6288d728b02 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 13:04:30 +0200 Subject: [PATCH 26/96] fix --- .github/workflows/ci-cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 577c24bb246c..2beeef4b5a28 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-22.04-2core strategy: matrix: - python-version: [3.7.15, 3.8.16, 3.9.16, 3.10.9] + python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap From 6d6026941706bb3ae05c5290d0f7db7ffa346010 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 14:05:12 +0200 Subject: [PATCH 27/96] fix --- .github/workflows/ci-cache.yml | 6 ++++++ .github/workflows/flower.yml | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 2beeef4b5a28..80d43a1fd3a5 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -18,6 +18,12 @@ jobs: runs-on: ubuntu-22.04-2core strategy: matrix: + # Only use versions found here: + # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python + # to ensure they are loaded from the runner image hosted tool cache + # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache + # By not specifying the patch version it is ensured that a version available in + # the hosted tool cache is used python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 8a9140f6ea04..9d611b8c54cb 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,10 +16,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - # Only use versions found here: - # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python - # to ensure they are loaded from the runner image hosted tool cache - # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache + # Check comment on matrix in ci-cache.yml python: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 From a2f01f22d8a8a6d7510f1e31761c8cdd74694aea Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:04:51 +0200 Subject: [PATCH 28/96] Fix naming --- .github/workflows/ci-cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 80d43a1fd3a5..fbeee582a94e 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -14,8 +14,8 @@ env: FLWR_TELEMETRY_ENABLED: 0 jobs: - test_core: - runs-on: ubuntu-22.04-2core + build_python_cache: + runs-on: ubuntu-22.04 strategy: matrix: # Only use versions found here: From 0b8e631442aba97cddc42db9ee2ce7b56bcab50f Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:06:45 +0200 Subject: [PATCH 29/96] fix --- .github/workflows/e2e.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9bc3ae2ec697..6b98893be8da 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -24,7 +24,7 @@ jobs: cd e2e/pytorch python -m poetry install - name: Cache Datasets - uses: actions/cache@v3 + uses: actions/cache@v2 with: path: "./e2e/pytorch/data" key: pytorch-datasets @@ -53,7 +53,7 @@ jobs: cd e2e/tensorflow python -m poetry install - name: Cache Datasets - uses: actions/cache@v3 + uses: actions/cache@v2 with: path: "~/.keras" key: keras-datasets @@ -107,7 +107,7 @@ jobs: cd e2e/pandas python -m poetry install - name: Cache Datasets - uses: actions/cache@v3 + uses: actions/cache@v2 with: path: "./e2e/pandas/data" key: pandas-datasets From 89cfe656fc176d678a3c9ca65ebd1b427e0c8a7c Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:07:14 +0200 Subject: [PATCH 30/96] Fix --- .github/workflows/flower.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 9d611b8c54cb..4346b7f0647d 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -16,8 +16,10 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - # Check comment on matrix in ci-cache.yml - python: [3.7, 3.8, 3.9, 3.10] + # Latest version which comes cached in the host image can be found here: + # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python + # In case of a mismatch, the job has to download Python to install it. + python: [3.7.17, 3.8.17, 3.9.17, 3.10.12] steps: - uses: actions/checkout@v3 - name: Bootstrap From f736304dd690f143966c15328eb24f501f2f4706 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:21:50 +0200 Subject: [PATCH 31/96] Fix --- .github/workflows/ci-cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index fbeee582a94e..2689de3d4be9 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: [3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v3 - name: Bootstrap From ddbdb9b5cfe8f8831dd5ab3bef11809556781360 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:43:46 +0200 Subject: [PATCH 32/96] Fix --- .github/workflows/e2e.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e5e2b252048f..17cb21cbd027 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,11 +23,6 @@ jobs: run: | cd e2e/pytorch python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "./e2e/pytorch/data" - key: pytorch-datasets - name: Download Datasets run: | cd e2e/pytorch @@ -52,11 +47,6 @@ jobs: run: | cd e2e/tensorflow python -m poetry install - - 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()" @@ -106,11 +96,6 @@ jobs: run: | cd e2e/pandas python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "./e2e/pandas/data" - key: pandas-datasets - name: Download Datasets run: | cd e2e/pandas @@ -219,11 +204,6 @@ jobs: run: | cd e2e/opacus python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "./e2e/opacus/data" - key: pytorch-datasets - name: Download Datasets run: | cd e2e/opacus @@ -251,11 +231,6 @@ jobs: run: | cd e2e/fastai python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "~/.fastai" - key: fastai-datasets - name: Download Datasets run: | cd e2e/fastai From 387812e5973f4a4bb9f2c6a6b8c928c97afa41f9 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:44:39 +0200 Subject: [PATCH 33/96] Remove space --- .github/workflows/e2e.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 17cb21cbd027..0746ddb90009 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -59,8 +59,6 @@ jobs: cd e2e/tensorflow python simulation.py - - bare: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -81,8 +79,6 @@ jobs: cd e2e/bare python simulation.py - - pandas: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -134,8 +130,6 @@ jobs: cd e2e/jax python simulation.py - - mxnet: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -162,8 +156,6 @@ jobs: cd e2e/mxnet python simulation.py - - scikit: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -190,7 +182,6 @@ jobs: cd e2e/scikit-learn python simulation.py - opacus: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -216,7 +207,6 @@ jobs: run: | cd e2e/opacus python simulation.py - fastai: runs-on: ubuntu-22.04 From 574fae71566e4160e9cbd6b08a1da05ebb5c3b52 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:51:11 +0200 Subject: [PATCH 34/96] Fix --- .github/workflows/e2e.yml | 47 ++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0746ddb90009..6b98893be8da 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,6 +23,11 @@ jobs: run: | cd e2e/pytorch python -m poetry install + - name: Cache Datasets + uses: actions/cache@v2 + with: + path: "./e2e/pytorch/data" + key: pytorch-datasets - name: Download Datasets run: | cd e2e/pytorch @@ -47,6 +52,11 @@ jobs: run: | cd e2e/tensorflow python -m poetry install + - 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()" @@ -59,6 +69,8 @@ jobs: cd e2e/tensorflow python simulation.py + + bare: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -79,6 +91,8 @@ jobs: cd e2e/bare python simulation.py + + pandas: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -87,11 +101,16 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/pandas python -m poetry install + - name: Cache Datasets + uses: actions/cache@v2 + with: + path: "./e2e/pandas/data" + key: pandas-datasets - name: Download Datasets run: | cd e2e/pandas @@ -116,7 +135,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/jax @@ -130,6 +149,8 @@ jobs: cd e2e/jax python simulation.py + + mxnet: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -138,7 +159,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/mxnet @@ -156,6 +177,8 @@ jobs: cd e2e/mxnet python simulation.py + + scikit: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -164,7 +187,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/scikit-learn @@ -182,6 +205,7 @@ jobs: cd e2e/scikit-learn python simulation.py + opacus: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -190,11 +214,16 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/opacus python -m poetry install + - name: Cache Datasets + uses: actions/cache@v2 + with: + path: "./e2e/opacus/data" + key: pytorch-datasets - name: Download Datasets run: | cd e2e/opacus @@ -207,6 +236,7 @@ jobs: run: | cd e2e/opacus python simulation.py + fastai: runs-on: ubuntu-22.04 @@ -216,11 +246,16 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/fastai python -m poetry install + - name: Cache Datasets + uses: actions/cache@v2 + with: + path: "~/.fastai" + key: fastai-datasets - name: Download Datasets run: | cd e2e/fastai From 2162893e9ea0c475c13e5db374b5d4fb4467dafa Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:52:58 +0200 Subject: [PATCH 35/96] Fix --- .github/actions/bootstrap/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index ac124b8f2af8..a0ac06e18f38 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -4,7 +4,7 @@ inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." default: 3.7 - pip-version: + pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 setuptools-version: @@ -30,8 +30,9 @@ runs: key: ${{ runner.os }}-python-cache-${{ inputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | - python -m pip install -U pip==${{ inputs.pip-version }} - python -m pip install -U setuptools==${{ inputs.setuptools-version }} - python -m pip install -U poetry==${{ inputs.poetry-version }} + python -m pip install -U \ + pip==${{ inputs.pip-version }} \ + setuptools==${{ inputs.setuptools-version }} \ + poetry==${{ inputs.poetry-version }} python -m poetry config virtualenvs.create false shell: bash From c5de55843dc293e6c3f7f29acbae8a0d3110dce5 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 19:55:07 +0200 Subject: [PATCH 36/96] fix --- .github/workflows/e2e.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6b98893be8da..e5e2b252048f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -101,7 +101,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/pandas @@ -135,7 +135,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/jax @@ -159,7 +159,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/mxnet @@ -187,7 +187,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/scikit-learn @@ -214,7 +214,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8 - name: Install dependencies run: | cd e2e/opacus @@ -246,7 +246,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8 - name: Install dependencies run: | cd e2e/fastai From 76f4bb68c26734c15edb9c26d240baec7789b69d Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:05:49 +0200 Subject: [PATCH 37/96] fix --- .github/workflows/e2e.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e5e2b252048f..8e3b3b958994 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -19,6 +19,8 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap + with: + python-version: 3.8 - name: Install dependencies run: | cd e2e/pytorch @@ -48,6 +50,8 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap + with: + python-version: 3.8 - name: Install dependencies run: | cd e2e/tensorflow @@ -78,6 +82,8 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap + with: + python-version: 3.8 - name: Install dependencies run: | cd e2e/bare From e039e2dae04394ff9e0c8645535b838e1479b2bf Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:06:26 +0200 Subject: [PATCH 38/96] Fix --- .github/workflows/e2e.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8e3b3b958994..8bc7ae59030e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request: - branches: - - main env: FLWR_TELEMETRY_ENABLED: 0 From 28da35ad1d942592c0a38059b8fcac42ec87a351 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:06:48 +0200 Subject: [PATCH 39/96] fix --- .github/workflows/ci-cache.yml | 5 ----- .github/workflows/e2e.yml | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 2689de3d4be9..4ff29ec04b85 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -4,11 +4,6 @@ on: push: branches: - main - # Remove this section before merging as we - # only want to populate cache in main - pull_request: - branches: - - main env: FLWR_TELEMETRY_ENABLED: 0 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8bc7ae59030e..8e3b3b958994 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -4,6 +4,9 @@ on: push: branches: - main + pull_request: + branches: + - main env: FLWR_TELEMETRY_ENABLED: 0 From f174d238d20c54dd37fa306c5eabcfea64889172 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:11:37 +0200 Subject: [PATCH 40/96] fix --- .github/workflows/ci-cache.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 4ff29ec04b85..2689de3d4be9 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -4,6 +4,11 @@ on: push: branches: - main + # Remove this section before merging as we + # only want to populate cache in main + pull_request: + branches: + - main env: FLWR_TELEMETRY_ENABLED: 0 From d7a28022205e3fb8ed0b803239411e7faf618e08 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:13:31 +0200 Subject: [PATCH 41/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- .github/workflows/ci-cache.yml | 2 +- .github/workflows/flower.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index a0ac06e18f38..f33870e66a0d 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,7 +3,7 @@ description: "Bootstrap Python environment (install and configure Python version inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - default: 3.7 + default: 3.7.17 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 2689de3d4be9..54259f7c0026 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.7.17, 3.8.17, 3.9.17, 3.10.12] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 2518b9308ab0..f8007a1c701e 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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.7, 3.8, 3.9, '3.10'] + python: [3.7.17, 3.8.17, 3.9.17, 3.10.12] steps: - uses: actions/checkout@v3 - name: Bootstrap From d749060b750ef1daa056b4ecd23a65640f476ab2 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:19:20 +0200 Subject: [PATCH 42/96] Fix --- .github/actions/bootstrap/action.yml | 9 +++++++-- .github/workflows/ci-cache.yml | 5 +++-- .github/workflows/flower.yml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index f33870e66a0d..368ce2d667f8 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,7 +3,7 @@ description: "Bootstrap Python environment (install and configure Python version inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - default: 3.7.17 + default: 3.7 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 @@ -13,10 +13,15 @@ inputs: poetry-version: description: "Version of poetry to be installed using pip" default: 1.5.1 +outputs: + python-version: + description: "Random number" + value: ${{ steps.setup-python.outputs.python-version }} runs: using: "composite" steps: - name: Set up Python + id: setup-python uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} @@ -27,7 +32,7 @@ runs: **/poetry.lock ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ inputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U \ diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 54259f7c0026..ec2ce55d450b 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,10 +24,11 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7.17, 3.8.17, 3.9.17, 3.10.12] + python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python-version }} @@ -40,4 +41,4 @@ jobs: **/poetry.lock ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-cache-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index f8007a1c701e..dde2e52392af 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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.7.17, 3.8.17, 3.9.17, 3.10.12] + python: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap From 51408d182049f5013dad40386ad4ce1d38b920d0 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:21:11 +0200 Subject: [PATCH 43/96] fxi --- .github/workflows/ci-cache.yml | 2 +- .github/workflows/flower.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index ec2ce55d450b..b2811576f5d3 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: [3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index dde2e52392af..2518b9308ab0 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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.7, 3.8, 3.9, 3.10] + python: [3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v3 - name: Bootstrap From f687fa9175f1269f8519ee394e8f69f2db073904 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:33:29 +0200 Subject: [PATCH 44/96] Fix --- .github/workflows/ci-cache.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index b2811576f5d3..e22d0b8ea932 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -4,11 +4,6 @@ on: push: branches: - main - # Remove this section before merging as we - # only want to populate cache in main - pull_request: - branches: - - main env: FLWR_TELEMETRY_ENABLED: 0 From 0fde92a8e025012fb5b3a94ff8a3f25d4e751fc4 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:34:07 +0200 Subject: [PATCH 45/96] revert --- .github/workflows/e2e.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8e3b3b958994..e5e2b252048f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -19,8 +19,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - name: Install dependencies run: | cd e2e/pytorch @@ -50,8 +48,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - name: Install dependencies run: | cd e2e/tensorflow @@ -82,8 +78,6 @@ jobs: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - name: Install dependencies run: | cd e2e/bare From 2f86ec469edac7a95608ae3aa72688126e32261a Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Wed, 12 Jul 2023 20:36:50 +0200 Subject: [PATCH 46/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- .github/workflows/ci-cache.yml | 7 ++++++- .github/workflows/e2e.yml | 12 ++++++------ .github/workflows/flower.yml | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 368ce2d667f8..acafbdbbb981 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,7 +3,7 @@ description: "Bootstrap Python environment (install and configure Python version inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - default: 3.7 + default: 3.7.17 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index e22d0b8ea932..6ede643bbbf1 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -4,6 +4,11 @@ on: push: branches: - main + # Remove this section before merging as we + # only want to populate cache in main + pull_request: + branches: + - main env: FLWR_TELEMETRY_ENABLED: 0 @@ -19,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.7.17, 3.8.17, 3.9.17, 3.10.12] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e5e2b252048f..29cb17d47011 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -101,7 +101,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/pandas @@ -135,7 +135,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/jax @@ -159,7 +159,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/mxnet @@ -187,7 +187,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/scikit-learn @@ -214,7 +214,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/opacus @@ -246,7 +246,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8 + python-version: 3.8.17 - name: Install dependencies run: | cd e2e/fastai diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 2518b9308ab0..f8007a1c701e 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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.7, 3.8, 3.9, '3.10'] + python: [3.7.17, 3.8.17, 3.9.17, 3.10.12] steps: - uses: actions/checkout@v3 - name: Bootstrap From f1513d232079d5d87573adf9b1082058154d73ea Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 00:17:14 +0200 Subject: [PATCH 47/96] fix --- .github/workflows/e2e.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 29cb17d47011..fa5c353cd3ae 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,11 +23,6 @@ jobs: run: | cd e2e/pytorch python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "./e2e/pytorch/data" - key: pytorch-datasets - name: Download Datasets run: | cd e2e/pytorch @@ -52,11 +47,6 @@ jobs: run: | cd e2e/tensorflow python -m poetry install - - 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()" @@ -69,8 +59,6 @@ jobs: cd e2e/tensorflow python simulation.py - - bare: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -91,8 +79,6 @@ jobs: cd e2e/bare python simulation.py - - pandas: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -106,11 +92,6 @@ jobs: run: | cd e2e/pandas python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "./e2e/pandas/data" - key: pandas-datasets - name: Download Datasets run: | cd e2e/pandas @@ -125,8 +106,6 @@ jobs: cd e2e/pandas python simulation.py - - jax: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -177,8 +156,6 @@ jobs: cd e2e/mxnet python simulation.py - - scikit: runs-on: ubuntu-22.04 timeout-minutes: 10 @@ -219,11 +196,6 @@ jobs: run: | cd e2e/opacus python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "./e2e/opacus/data" - key: pytorch-datasets - name: Download Datasets run: | cd e2e/opacus @@ -236,7 +208,6 @@ jobs: run: | cd e2e/opacus python simulation.py - fastai: runs-on: ubuntu-22.04 @@ -251,11 +222,6 @@ jobs: run: | cd e2e/fastai python -m poetry install - - name: Cache Datasets - uses: actions/cache@v2 - with: - path: "~/.fastai" - key: fastai-datasets - name: Download Datasets run: | cd e2e/fastai From 284e2cca8ff78951e009b5fef596100736139b23 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 01:10:28 +0200 Subject: [PATCH 48/96] Fix --- .github/actions/bootstrap/action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index acafbdbbb981..eca89e0ee0dd 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -25,14 +25,14 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} - - uses: actions/cache/restore@v3 - if: github.ref != 'refs/heads/main' - with: - path: | - **/poetry.lock - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + # - uses: actions/cache/restore@v3 + # if: github.ref != 'refs/heads/main' + # with: + # path: | + # **/poetry.lock + # ~/.cache/pip + # ~/.cache/pypoetry + # key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U \ From 4d03fdc87df85d1b798a5a740898a3da80af6d56 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 09:49:59 +0200 Subject: [PATCH 49/96] Update action.yml --- .github/actions/bootstrap/action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index eca89e0ee0dd..61665ae3a78b 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -25,14 +25,14 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} - # - uses: actions/cache/restore@v3 - # if: github.ref != 'refs/heads/main' - # with: - # path: | - # **/poetry.lock - # ~/.cache/pip - # ~/.cache/pypoetry - # key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + - uses: actions/cache/restore@v3 + if: github.ref != 'refs/heads/main' + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U \ From fb590ffdeb3be12eb0b2338990c823fb5cca8135 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 09:50:56 +0200 Subject: [PATCH 50/96] Fix --- .github/actions/bootstrap/action.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index eca89e0ee0dd..61665ae3a78b 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -25,14 +25,14 @@ runs: uses: actions/setup-python@v4 with: python-version: ${{ inputs.python-version }} - # - uses: actions/cache/restore@v3 - # if: github.ref != 'refs/heads/main' - # with: - # path: | - # **/poetry.lock - # ~/.cache/pip - # ~/.cache/pypoetry - # key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + - uses: actions/cache/restore@v3 + if: github.ref != 'refs/heads/main' + with: + path: | + **/poetry.lock + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U \ From f2c99db7c2754ab3d84e9c33fa4d05fc19b1279b Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 10:08:47 +0200 Subject: [PATCH 51/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 61665ae3a78b..acafbdbbb981 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -32,7 +32,7 @@ runs: **/poetry.lock ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | python -m pip install -U \ From 998cfea6d7ac91d5a5585b84f8f92354401fedc7 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:01:27 +0200 Subject: [PATCH 52/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- .github/workflows/ci-cache.yml | 2 +- .github/workflows/e2e.yml | 12 ++++++------ .github/workflows/flower.yml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index acafbdbbb981..333d39da8f04 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,7 +3,7 @@ description: "Bootstrap Python environment (install and configure Python version inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - default: 3.7.17 + default: 3.7.16 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 6ede643bbbf1..427b97dfa6fa 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7.17, 3.8.17, 3.9.17, 3.10.12] + python-version: [3.7.16, 3.8.16, 3.9.16, 3.10.11] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index fa5c353cd3ae..9788bc83cd76 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -87,7 +87,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/pandas @@ -114,7 +114,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/jax @@ -138,7 +138,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/mxnet @@ -164,7 +164,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/scikit-learn @@ -191,7 +191,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/opacus @@ -217,7 +217,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.17 + python-version: 3.8.16 - name: Install dependencies run: | cd e2e/fastai diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index f8007a1c701e..b30980ad8ef8 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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.7.17, 3.8.17, 3.9.17, 3.10.12] + python: [3.7.16, 3.8.16, 3.9.16, 3.10.11] steps: - uses: actions/checkout@v3 - name: Bootstrap From 3eb44ef6715f3ced8544c41342046726babd4aa4 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:06:43 +0200 Subject: [PATCH 53/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 333d39da8f04..6949133b9ef2 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -32,6 +32,7 @@ runs: **/poetry.lock ~/.cache/pip ~/.cache/pypoetry + **/.venv key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | @@ -39,5 +40,4 @@ runs: pip==${{ inputs.pip-version }} \ setuptools==${{ inputs.setuptools-version }} \ poetry==${{ inputs.poetry-version }} - python -m poetry config virtualenvs.create false shell: bash From 2e3650c07d7db7b463d94e02d9fff5f9efba2e21 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:06:56 +0200 Subject: [PATCH 54/96] fix --- .github/actions/bootstrap/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 6949133b9ef2..598569a264dc 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -30,9 +30,9 @@ runs: with: path: | **/poetry.lock + **/.venv ~/.cache/pip ~/.cache/pypoetry - **/.venv key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools run: | From c88e8c503b3b32c5d09e2961edc1cbcfeea52c40 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:09:03 +0200 Subject: [PATCH 55/96] Fix --- .github/workflows/ci-cache.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 427b97dfa6fa..bb4afc2f0170 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -39,6 +39,7 @@ jobs: with: path: | **/poetry.lock + **/.venv ~/.cache/pip ~/.cache/pypoetry key: ${{ runner.os }}-python-cache-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} From 932966eb637bfff0d3e092a757a9351891619a64 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:16:23 +0200 Subject: [PATCH 56/96] Fix --- .github/actions/bootstrap/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 598569a264dc..f039171d4139 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -40,4 +40,6 @@ runs: pip==${{ inputs.pip-version }} \ setuptools==${{ inputs.setuptools-version }} \ poetry==${{ inputs.poetry-version }} + poetry config virtualenvs.create true + poetry config virtualenvs.in-project true shell: bash From 23af3e11ced1ca103c23c2aec1557c19e99b3090 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:20:03 +0200 Subject: [PATCH 57/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- .github/workflows/ci-cache.yml | 2 +- .github/workflows/e2e.yml | 12 ++++++------ .github/workflows/flower.yml | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index f039171d4139..4a91aa79b067 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -3,7 +3,7 @@ description: "Bootstrap Python environment (install and configure Python version inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." - default: 3.7.16 + default: 3.7 pip-version: description: "Version of pip to be installed using pip" default: 23.1.2 diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index bb4afc2f0170..9945a8411501 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7.16, 3.8.16, 3.9.16, 3.10.11] + python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9788bc83cd76..6531481ec38b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -87,7 +87,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/pandas @@ -114,7 +114,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/jax @@ -138,7 +138,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/mxnet @@ -164,7 +164,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/scikit-learn @@ -191,7 +191,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/opacus @@ -217,7 +217,7 @@ jobs: - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: 3.8.16 + python-version: 3.8 - name: Install dependencies run: | cd e2e/fastai diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index b30980ad8ef8..fec5f14200b5 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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.7.16, 3.8.16, 3.9.16, 3.10.11] + python: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap @@ -31,6 +31,6 @@ jobs: - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras - name: Check if protos need recompilation - run: ./dev/check-protos.sh + run: poetry run ./dev/check-protos.sh - name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest) - run: ./dev/test.sh + run: poetry run ./dev/test.sh From b4b010bdf62eee6879f0783a6390c1f5a4117d52 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:23:26 +0200 Subject: [PATCH 58/96] Fix --- .github/workflows/flower.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index fec5f14200b5..ef81d6be4889 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -31,6 +31,10 @@ jobs: - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras - name: Check if protos need recompilation - run: poetry run ./dev/check-protos.sh + run: | + source .venv/bin/activate + ./dev/check-protos.sh - name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest) - run: poetry run ./dev/test.sh + run: | + source .venv/bin/activate + ./dev/test.sh From c56fa3f13ff4305aa71db5a5a6055cdaddc76ecd Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:26:19 +0200 Subject: [PATCH 59/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 4a91aa79b067..df5cdc80e0d8 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -6,7 +6,7 @@ inputs: default: 3.7 pip-version: description: "Version of pip to be installed using pip" - default: 23.1.2 + default: 22.0.2 setuptools-version: description: "Version of setuptools to be installed using pip" default: 68.0.0 From 7311fd1b6a808232d0e387efa708710acd9d0830 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 11:26:25 +0200 Subject: [PATCH 60/96] Fix --- .github/workflows/ci-cache.yml | 9 +- .github/workflows/e2e.yml | 376 ++++++++++++++++----------------- .github/workflows/flower.yml | 9 +- 3 files changed, 202 insertions(+), 192 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 9945a8411501..c0a348d08d2c 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -9,7 +9,7 @@ on: pull_request: branches: - main - + env: FLWR_TELEMETRY_ENABLED: 0 @@ -24,7 +24,12 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: [ + 3.7, + 3.8, + # 3.9, + # 3.10 + ] steps: - uses: actions/checkout@v3 - name: Bootstrap diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6531481ec38b..24b4c530dad3 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -36,201 +36,201 @@ jobs: cd e2e/pytorch python simulation.py - tensorflow: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - - name: Install dependencies - run: | - cd e2e/tensorflow - python -m poetry install - - name: Download Datasets - run: | - python -c "import tensorflow as tf; tf.keras.datasets.cifar10.load_data()" - - name: Run edge client test - run: | - cd e2e/tensorflow - ./test.sh - - name: Run virtual client test - run: | - cd e2e/tensorflow - python simulation.py + # tensorflow: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # - name: Install dependencies + # run: | + # cd e2e/tensorflow + # python -m poetry install + # - name: Download Datasets + # run: | + # python -c "import tensorflow as tf; tf.keras.datasets.cifar10.load_data()" + # - name: Run edge client test + # run: | + # cd e2e/tensorflow + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/tensorflow + # python simulation.py - bare: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - - name: Install dependencies - run: | - cd e2e/bare - python -m poetry install - - name: Run edge client test - run: | - cd e2e/bare - ./test.sh - - name: Run virtual client test - run: | - cd e2e/bare - python simulation.py + # bare: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # - name: Install dependencies + # run: | + # cd e2e/bare + # python -m poetry install + # - name: Run edge client test + # run: | + # cd e2e/bare + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/bare + # python simulation.py - pandas: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: | - cd e2e/pandas - python -m poetry install - - name: Download Datasets - run: | - cd e2e/pandas - mkdir -p data - python -c "from sklearn.datasets import load_iris; load_iris(as_frame=True)['data'].to_csv('./data/client.csv')" - - name: Run edge client test - run: | - cd e2e/pandas - ./test.sh - - name: Run virtual client test - run: | - cd e2e/pandas - python simulation.py + # pandas: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: | + # cd e2e/pandas + # python -m poetry install + # - name: Download Datasets + # run: | + # cd e2e/pandas + # mkdir -p data + # python -c "from sklearn.datasets import load_iris; load_iris(as_frame=True)['data'].to_csv('./data/client.csv')" + # - name: Run edge client test + # run: | + # cd e2e/pandas + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/pandas + # python simulation.py - jax: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: | - cd e2e/jax - python -m poetry install - - name: Run edge client test - run: | - cd e2e/jax - ./test.sh - - name: Run virtual client test - run: | - cd e2e/jax - python simulation.py + # jax: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: | + # cd e2e/jax + # python -m poetry install + # - name: Run edge client test + # run: | + # cd e2e/jax + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/jax + # python simulation.py - mxnet: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: | - cd e2e/mxnet - python -m poetry install - - name: Download Datasets - run: | - cd e2e/mxnet - python -c "import mxnet as mx; mx.test_utils.get_mnist()" - - name: Run edge client test - run: | - cd e2e/mxnet - ./test.sh - - name: Run virtual client test - run: | - cd e2e/mxnet - python simulation.py + # mxnet: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: | + # cd e2e/mxnet + # python -m poetry install + # - name: Download Datasets + # run: | + # cd e2e/mxnet + # python -c "import mxnet as mx; mx.test_utils.get_mnist()" + # - name: Run edge client test + # run: | + # cd e2e/mxnet + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/mxnet + # python simulation.py - scikit: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: | - cd e2e/scikit-learn - python -m poetry install - - name: Download Datasets - run: | - cd e2e/scikit-learn - python -c "import openml; openml.datasets.get_dataset(554)" - - name: Run edge client test - run: | - cd e2e/scikit-learn - ./test.sh - - name: Run virtual client test - run: | - cd e2e/scikit-learn - python simulation.py + # scikit: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: | + # cd e2e/scikit-learn + # python -m poetry install + # - name: Download Datasets + # run: | + # cd e2e/scikit-learn + # python -c "import openml; openml.datasets.get_dataset(554)" + # - name: Run edge client test + # run: | + # cd e2e/scikit-learn + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/scikit-learn + # python simulation.py - opacus: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: | - cd e2e/opacus - python -m poetry install - - name: Download Datasets - run: | - cd e2e/opacus - python -c "from torchvision.datasets import CIFAR10; CIFAR10('./data', download=True)" - - name: Run edge client test - run: | - cd e2e/opacus - ./test.sh - - name: Run virtual client test - run: | - cd e2e/opacus - python simulation.py + # opacus: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: | + # cd e2e/opacus + # python -m poetry install + # - name: Download Datasets + # run: | + # cd e2e/opacus + # python -c "from torchvision.datasets import CIFAR10; CIFAR10('./data', download=True)" + # - name: Run edge client test + # run: | + # cd e2e/opacus + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/opacus + # python simulation.py - fastai: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: | - cd e2e/fastai - python -m poetry install - - name: Download Datasets - run: | - cd e2e/fastai - python -c "from fastai.vision.all import *; untar_data(URLs.MNIST)" - - name: Run edge client test - run: | - cd e2e/fastai - ./test.sh - - name: Run virtual client test - run: | - cd e2e/fastai - python simulation.py + # fastai: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: | + # cd e2e/fastai + # python -m poetry install + # - name: Download Datasets + # run: | + # cd e2e/fastai + # python -c "from fastai.vision.all import *; untar_data(URLs.MNIST)" + # - name: Run edge client test + # run: | + # cd e2e/fastai + # ./test.sh + # - name: Run virtual client test + # run: | + # cd e2e/fastai + # python simulation.py diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index ef81d6be4889..c9eb5780371f 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,13 +21,18 @@ 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.7, 3.8, 3.9, 3.10] + python-version: [ + 3.7, + 3.8, + # 3.9, + # 3.10 + ] steps: - uses: actions/checkout@v3 - name: Bootstrap uses: ./.github/actions/bootstrap with: - python-version: ${{ matrix.python }} + python-version: ${{ matrix.python-version }} - name: Install dependencies (mandatory only) run: python -m poetry install --all-extras - name: Check if protos need recompilation From 88b2f356e0cf359d430fda1b38a5b75c3bc280b0 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:13:25 +0200 Subject: [PATCH 61/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index df5cdc80e0d8..d3d5ed91d7f1 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -15,7 +15,7 @@ inputs: default: 1.5.1 outputs: python-version: - description: "Random number" + description: "Exact Python or PyPy version which was used." value: ${{ steps.setup-python.outputs.python-version }} runs: using: "composite" From 43d7a082a40dbe50d58d58d6ec46125d7337a69b Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:15:47 +0200 Subject: [PATCH 62/96] Fix --- .github/workflows/e2e.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6ee306379733..5a115b2f522e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -77,8 +77,8 @@ jobs: run: python -m poetry install - name: Download dataset if: ${{matrix.dataset}} - run: python -c "${{ matrix.dataset }}" + run: poetry run python -c "${{ matrix.dataset }}" - name: Run edge client test - run: ./test.sh + run: poetry run ./test.sh - name: Run virtual client test - run: python simulation.py + run: poetry run python simulation.py From 82e636e1d20b038edfd204954ad57738bbfc46a5 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:17:48 +0200 Subject: [PATCH 63/96] Fix --- .github/workflows/deprecated_baselines.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index c039ef6e6cd1..1a020698ee28 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -25,7 +25,6 @@ jobs: with: python-version: 3.8 - name: Install dependencies - run: | - python -m poetry install + run: poetry run python -m poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) - run: ./dev/test.sh + run: poetry run ./dev/test.sh From 4a355bcfe764af0569e285d6f7d94aa7a1808b52 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:26:24 +0200 Subject: [PATCH 64/96] Fix --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 12d64a08685e..d47fe433c91d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,7 +27,7 @@ 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 }} - run: ./dev/build-docs.sh + run: poetry run ./dev/build-docs.sh deploy_docs: needs: build_docs @@ -46,4 +46,4 @@ 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 }} - run: ./dev/deploy-docs.sh + run: poetry run ./dev/deploy-docs.sh From b05d23dd371545f0684bb35fb4151682c76d7b41 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:37:34 +0200 Subject: [PATCH 65/96] Fix --- .github/workflows/baselines.yml | 2 +- .github/workflows/ci-cache.yml | 61 ++++++++++++++++++---- .github/workflows/deprecated_baselines.yml | 2 +- .github/workflows/docs.yml | 4 +- .github/workflows/e2e.yml | 2 +- .github/workflows/flower.yml | 10 ++-- .github/workflows/flower_tool.yml | 2 +- 7 files changed, 61 insertions(+), 22 deletions(-) diff --git a/.github/workflows/baselines.yml b/.github/workflows/baselines.yml index c0d1df1e6e8f..73ce3aa7e08f 100644 --- a/.github/workflows/baselines.yml +++ b/.github/workflows/baselines.yml @@ -114,7 +114,7 @@ jobs: run: | changed_dir="${{ steps.validate_changed_baselines_dirs.outputs.changed_dir }}" cd "${changed_dir}" - python -m poetry install + poetry install - name: Test if: steps.validate_changed_baselines_dirs.outputs.baseline_changed == 'true' run: | diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index c0a348d08d2c..8fa1b73cfc37 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -14,22 +14,64 @@ env: FLWR_TELEMETRY_ENABLED: 0 jobs: - build_python_cache: + build_framework_cache: runs-on: ubuntu-22.04 strategy: matrix: # Only use versions found here: - # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python - # to ensure they are loaded from the runner image hosted tool cache - # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache - # By not specifying the patch version it is ensured that a version available in - # the hosted tool cache is used - python-version: [ + # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python + # to ensure they are loaded from the runner image hosted tool cache + # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache + # By not specifying the patch version it is ensured that a version available in + # the hosted tool cache is used + python-version: [ 3.7, 3.8, # 3.9, # 3.10 - ] + ] + name: "Cache Framework" + + steps: + - uses: actions/checkout@v3 + - name: Bootstrap + id: bootstrap + uses: ./.github/actions/bootstrap + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: poetry install --all-extras + - name: Cache Python dependencies + uses: actions/cache/save@v3 + with: + path: | + **/poetry.lock + **/.venv + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-python-cache-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + + build_e2e_cache: + runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - directory: bare + - directory: jax + - directory: pytorch + - directory: tensorflow + - directory: opacus + - directory: mxnet + - directory: scikit-learn + - directory: fastai + - directory: pandas + + name: "Cache E2E ${{matrix.directory}}" + + defaults: + run: + working-directory: e2e/${{ matrix.directory }} + steps: - uses: actions/checkout@v3 - name: Bootstrap @@ -38,7 +80,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: python -m poetry install --all-extras + run: poetry install --all-extras - name: Cache Python dependencies uses: actions/cache/save@v3 with: @@ -48,3 +90,4 @@ jobs: ~/.cache/pip ~/.cache/pypoetry key: ${{ runner.os }}-python-cache-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + \ No newline at end of file diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index 1a020698ee28..f0b5af1735ee 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -25,6 +25,6 @@ jobs: with: python-version: 3.8 - name: Install dependencies - run: poetry run python -m poetry install + run: poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) run: poetry run ./dev/test.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d47fe433c91d..bbd31d0bb0cc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,7 +21,7 @@ jobs: - name: Install pandoc run: sudo apt install pandoc - name: Install dependencies (mandatory only) - run: python -m poetry install --extras "simulation" + run: poetry install --extras "simulation" - name: Build and deploy docs env: AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }} @@ -40,7 +40,7 @@ jobs: - name: Install pandoc run: sudo apt install pandoc - name: Install dependencies (mandatory only) - run: python -m poetry install --extras "simulation" + run: poetry install --extras "simulation" - name: Build and deploy docs env: AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5a115b2f522e..60835a0e0382 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -74,7 +74,7 @@ jobs: with: python-version: 3.8 - name: Install dependencies - run: python -m poetry install + run: poetry install - name: Download dataset if: ${{matrix.dataset}} run: poetry run python -c "${{ matrix.dataset }}" diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index c9eb5780371f..49491c0565c5 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -34,12 +34,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies (mandatory only) - run: python -m poetry install --all-extras + run: poetry install --all-extras - name: Check if protos need recompilation - run: | - source .venv/bin/activate - ./dev/check-protos.sh + run: poetry run ./dev/check-protos.sh - name: Lint + Test (isort/black/docformatter/mypy/pylint/flake8/pytest) - run: | - source .venv/bin/activate - ./dev/test.sh + run: poetry run ./dev/test.sh diff --git a/.github/workflows/flower_tool.yml b/.github/workflows/flower_tool.yml index cdc593927b78..58fa01731801 100644 --- a/.github/workflows/flower_tool.yml +++ b/.github/workflows/flower_tool.yml @@ -24,6 +24,6 @@ jobs: uses: ./.github/actions/bootstrap - name: Install dependencies (mandatory + optional) run: | - python -m poetry install + poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) run: ./dev/test-tool.sh From 754c23254dd42169a1617bc147e1307d92b26f5e Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:44:21 +0200 Subject: [PATCH 66/96] Fix --- .github/workflows/ci-cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 8fa1b73cfc37..4917027aa773 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -78,7 +78,7 @@ jobs: id: bootstrap uses: ./.github/actions/bootstrap with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 - name: Install dependencies run: poetry install --all-extras - name: Cache Python dependencies From cc8492b0aa59650a355b4e0a3a36d1e558859747 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 14:51:56 +0200 Subject: [PATCH 67/96] Fix --- .github/workflows/ci-cache.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 4917027aa773..c7bb2941fc94 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -49,7 +49,7 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} build_e2e_cache: runs-on: ubuntu-22.04 @@ -89,5 +89,5 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-e2e-${{ matrix.directory }}-cache-${{ hashFiles('pyproject.toml') }} \ No newline at end of file From 832f8152d8e0e654c2be81d64a9bde6bce40caa8 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 15:22:06 +0200 Subject: [PATCH 68/96] Fix --- .github/actions/bootstrap/action.yml | 5 ++++- .github/workflows/ci-cache.yml | 12 ++++++++++-- .github/workflows/e2e.yml | 10 ++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index d3d5ed91d7f1..1006be5e8b4f 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -13,6 +13,9 @@ inputs: poetry-version: description: "Version of poetry to be installed using pip" default: 1.5.1 + cache-hash-files: + description: "Input to hashFiles when determining the cache key" + default: "pyproject.toml" outputs: python-version: description: "Exact Python or PyPy version which was used." @@ -33,7 +36,7 @@ runs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles(inputs.cache-hash-files) }} - name: Install build tools run: | python -m pip install -U \ diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index c7bb2941fc94..ddfce2128785 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -57,14 +57,23 @@ jobs: matrix: include: - directory: bare + cache-hash-files: e2e/bare/pyproject.toml - directory: jax + cache-hash-files: e2e/jax/pyproject.toml - directory: pytorch + cache-hash-files: e2e/pytorch/pyproject.toml - directory: tensorflow + cache-hash-files: e2e/tensorflow/pyproject.toml - directory: opacus + cache-hash-files: e2e/opacus/pyproject.toml - directory: mxnet + cache-hash-files: e2e/mxnet/pyproject.toml - directory: scikit-learn + cache-hash-files: e2e/scikit-learn/pyproject.toml - directory: fastai + cache-hash-files: e2e/fastai/pyproject.toml - directory: pandas + cache-hash-files: e2e/pandas/pyproject.toml name: "Cache E2E ${{matrix.directory}}" @@ -89,5 +98,4 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-e2e-${{ matrix.directory }}-cache-${{ hashFiles('pyproject.toml') }} - \ No newline at end of file + key: ${{ runner.os }}-e2e-${{ matrix.directory }}-cache-${{ hashFiles(matrix.cache-hash-files) }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 60835a0e0382..23bc77f26a82 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -21,40 +21,49 @@ jobs: matrix: include: - directory: bare + cache-hash-files: e2e/bare/pyproject.toml - directory: jax + cache-hash-files: e2e/jax/pyproject.toml - directory: pytorch + cache-hash-files: e2e/pytorch/pyproject.toml dataset: | from torchvision.datasets import CIFAR10 CIFAR10('./data', download=True) - directory: tensorflow + cache-hash-files: e2e/tensorflow/pyproject.toml dataset: | import tensorflow as tf tf.keras.datasets.cifar10.load_data() - directory: opacus + cache-hash-files: e2e/opacus/pyproject.toml dataset: | from torchvision.datasets import CIFAR10 CIFAR10('./data', download=True) - directory: mxnet + cache-hash-files: e2e/mxnet/pyproject.toml dataset: | import mxnet as mx mx.test_utils.get_mnist() - directory: scikit-learn + cache-hash-files: e2e/lear/pyproject.toml dataset: | import openml openml.datasets.get_dataset(554) - directory: fastai + cache-hash-files: e2e/fastai/pyproject.toml dataset: | from fastai.vision.all import untar_data, URLs untar_data(URLs.MNIST) - directory: pandas + cache-hash-files: e2e/pandas/pyproject.toml dataset: | from pathlib import Path from sklearn.datasets import load_iris @@ -73,6 +82,7 @@ jobs: uses: ./.github/actions/bootstrap with: python-version: 3.8 + cache-hash-files: ${{ matrix.cache-hash-files }} - name: Install dependencies run: poetry install - name: Download dataset From ec129a0ff3f47f810383d992484b75f3ed26105c Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 15:59:39 +0200 Subject: [PATCH 69/96] Fix --- .github/workflows/ci-cache.yml | 7 +------ .github/workflows/flower.yml | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index ddfce2128785..9be9d90755f2 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,12 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [ - 3.7, - 3.8, - # 3.9, - # 3.10 - ] + python-version: [3.7, 3.8, 3.9, 3.10] name: "Cache Framework" steps: diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index 49491c0565c5..e49ecef52bf6 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,12 +21,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-version: [ - 3.7, - 3.8, - # 3.9, - # 3.10 - ] + python-version: [3.7, 3.8, 3.9, 3.10] steps: - uses: actions/checkout@v3 - name: Bootstrap From 4a263f235f871133a32b02517559bbc1434b812c Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 16:00:41 +0200 Subject: [PATCH 70/96] Fix --- .github/workflows/ci-cache.yml | 2 +- .github/workflows/flower.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 9be9d90755f2..c76fa1d77561 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -24,7 +24,7 @@ jobs: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache # By not specifying the patch version it is ensured that a version available in # the hosted tool cache is used - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: [3.7, 3.8, 3.9, '3.10'] name: "Cache Framework" steps: diff --git a/.github/workflows/flower.yml b/.github/workflows/flower.yml index e49ecef52bf6..79879f3707fd 100644 --- a/.github/workflows/flower.yml +++ b/.github/workflows/flower.yml @@ -21,7 +21,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-version: [3.7, 3.8, 3.9, 3.10] + python-version: [3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v3 - name: Bootstrap From 5636f27053913bd6ca1a1e045f938e1215654a76 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 16:07:39 +0200 Subject: [PATCH 71/96] Fix --- .github/workflows/ci-cache.yml | 90 +++++++++++++++++----------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index c76fa1d77561..614b76c2f17b 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -46,51 +46,51 @@ jobs: ~/.cache/pypoetry key: ${{ runner.os }}-python-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - build_e2e_cache: - runs-on: ubuntu-22.04 - strategy: - matrix: - include: - - directory: bare - cache-hash-files: e2e/bare/pyproject.toml - - directory: jax - cache-hash-files: e2e/jax/pyproject.toml - - directory: pytorch - cache-hash-files: e2e/pytorch/pyproject.toml - - directory: tensorflow - cache-hash-files: e2e/tensorflow/pyproject.toml - - directory: opacus - cache-hash-files: e2e/opacus/pyproject.toml - - directory: mxnet - cache-hash-files: e2e/mxnet/pyproject.toml - - directory: scikit-learn - cache-hash-files: e2e/scikit-learn/pyproject.toml - - directory: fastai - cache-hash-files: e2e/fastai/pyproject.toml - - directory: pandas - cache-hash-files: e2e/pandas/pyproject.toml + # build_e2e_cache: + # runs-on: ubuntu-22.04 + # strategy: + # matrix: + # include: + # - directory: bare + # cache-hash-files: e2e/bare/pyproject.toml + # - directory: jax + # cache-hash-files: e2e/jax/pyproject.toml + # - directory: pytorch + # cache-hash-files: e2e/pytorch/pyproject.toml + # - directory: tensorflow + # cache-hash-files: e2e/tensorflow/pyproject.toml + # - directory: opacus + # cache-hash-files: e2e/opacus/pyproject.toml + # - directory: mxnet + # cache-hash-files: e2e/mxnet/pyproject.toml + # - directory: scikit-learn + # cache-hash-files: e2e/scikit-learn/pyproject.toml + # - directory: fastai + # cache-hash-files: e2e/fastai/pyproject.toml + # - directory: pandas + # cache-hash-files: e2e/pandas/pyproject.toml - name: "Cache E2E ${{matrix.directory}}" + # name: "Cache E2E ${{matrix.directory}}" - defaults: - run: - working-directory: e2e/${{ matrix.directory }} + # defaults: + # run: + # working-directory: e2e/${{ matrix.directory }} - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - id: bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - - name: Install dependencies - run: poetry install --all-extras - - name: Cache Python dependencies - uses: actions/cache/save@v3 - with: - path: | - **/poetry.lock - **/.venv - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-e2e-${{ matrix.directory }}-cache-${{ hashFiles(matrix.cache-hash-files) }} + # steps: + # - uses: actions/checkout@v3 + # - name: Bootstrap + # id: bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: 3.8 + # - name: Install dependencies + # run: poetry install --all-extras + # - name: Cache Python dependencies + # uses: actions/cache/save@v3 + # with: + # path: | + # **/poetry.lock + # **/.venv + # ~/.cache/pip + # ~/.cache/pypoetry + # key: ${{ runner.os }}-e2e-${{ matrix.directory }}-cache-${{ hashFiles(matrix.cache-hash-files) }} From 58c91d02f0ffdc599d3aae5d71953a952b0a384b Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 16:12:31 +0200 Subject: [PATCH 72/96] Fix --- .github/actions/bootstrap/action.yml | 5 +++++ .github/workflows/ci-cache.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 1006be5e8b4f..cc84a7f86e81 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -20,6 +20,9 @@ outputs: python-version: description: "Exact Python or PyPy version which was used." value: ${{ steps.setup-python.outputs.python-version }} + cache-hit: + description: "A boolean value to indicate an exact match was found for the primary key" + value: ${{ steps.cache-restore.outputs.cache-hit }} runs: using: "composite" steps: @@ -29,6 +32,7 @@ runs: with: python-version: ${{ inputs.python-version }} - uses: actions/cache/restore@v3 + id: cache-restore if: github.ref != 'refs/heads/main' with: path: | @@ -38,6 +42,7 @@ runs: ~/.cache/pypoetry key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles(inputs.cache-hash-files) }} - name: Install build tools + if: steps.cache-restore.outputs.cache-hit != 'true' run: | python -m pip install -U \ pip==${{ inputs.pip-version }} \ diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 614b76c2f17b..b6f5a90f680c 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -35,8 +35,10 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies + if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install --all-extras - name: Cache Python dependencies + if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 with: path: | From 0983e255d650f963c1877bfc2fa271e38f8f8a91 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 17:04:01 +0200 Subject: [PATCH 73/96] Fix --- .github/workflows/deprecated_baselines.yml | 1 + .github/workflows/devtools.yml | 1 + .github/workflows/docs.yml | 2 ++ .github/workflows/e2e.yml | 1 + .github/workflows/framework.yml | 1 + .github/workflows/release.yml | 1 + 6 files changed, 7 insertions(+) diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index f0b5af1735ee..7515f2455a5b 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -21,6 +21,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap with: python-version: 3.8 diff --git a/.github/workflows/devtools.yml b/.github/workflows/devtools.yml index 5f531fe761ce..32df063bae20 100644 --- a/.github/workflows/devtools.yml +++ b/.github/workflows/devtools.yml @@ -22,6 +22,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap - name: Install dependencies (mandatory + optional) run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b5eb009bbe97..793d75637e3d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,6 +18,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap - name: Install pandoc run: sudo apt install pandoc @@ -38,6 +39,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap - name: Install pandoc run: sudo apt install pandoc diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 23bc77f26a82..1f22362965bc 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -79,6 +79,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap with: python-version: 3.8 diff --git a/.github/workflows/framework.yml b/.github/workflows/framework.yml index 1b57ec28d9d6..59a923585cbd 100644 --- a/.github/workflows/framework.yml +++ b/.github/workflows/framework.yml @@ -25,6 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d1faa2c49dc..b80e425fa906 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Bootstrap + id: bootstrap uses: ./.github/actions/bootstrap - name: Release nightly env: From 7bea333e1f430350e03552b7a35e8cc909929747 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 17:06:35 +0200 Subject: [PATCH 74/96] Fix --- .github/workflows/deprecated_baselines.yml | 1 + .github/workflows/devtools.yml | 4 ++-- .github/workflows/docs.yml | 1 + .github/workflows/framework.yml | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index 7515f2455a5b..0c5761790e64 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -26,6 +26,7 @@ jobs: with: python-version: 3.8 - name: Install dependencies + if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) run: poetry run ./dev/test.sh diff --git a/.github/workflows/devtools.yml b/.github/workflows/devtools.yml index 32df063bae20..bd80405e82de 100644 --- a/.github/workflows/devtools.yml +++ b/.github/workflows/devtools.yml @@ -25,7 +25,7 @@ jobs: id: bootstrap uses: ./.github/actions/bootstrap - name: Install dependencies (mandatory + optional) - run: | - poetry install + if: steps.bootstrap.outputs.cache-hit != 'true' + run: poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) run: ./dev/test-tool.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 793d75637e3d..23cf4e68619a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,6 +44,7 @@ jobs: - name: Install pandoc run: sudo apt install pandoc - name: Install dependencies (mandatory only) + if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install --extras "simulation" - name: Build and deploy docs env: diff --git a/.github/workflows/framework.yml b/.github/workflows/framework.yml index 59a923585cbd..84411ba435dc 100644 --- a/.github/workflows/framework.yml +++ b/.github/workflows/framework.yml @@ -30,6 +30,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies (mandatory only) + if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install --all-extras - name: Check if protos need recompilation run: poetry run ./dev/check-protos.sh From 9820de26ab9fdd474f593c392e7b52ef9e659b3f Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 17:21:48 +0200 Subject: [PATCH 75/96] Fix --- .github/actions/bootstrap/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index cc84a7f86e81..5ad4a4629e28 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -51,3 +51,4 @@ runs: poetry config virtualenvs.create true poetry config virtualenvs.in-project true shell: bash + From ffc12804cbbd31ee3e363da26c87d556ebaecd19 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 17:26:36 +0200 Subject: [PATCH 76/96] Fix --- .github/actions/bootstrap/action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 5ad4a4629e28..31688d0e2f67 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -13,9 +13,6 @@ inputs: poetry-version: description: "Version of poetry to be installed using pip" default: 1.5.1 - cache-hash-files: - description: "Input to hashFiles when determining the cache key" - default: "pyproject.toml" outputs: python-version: description: "Exact Python or PyPy version which was used." @@ -40,7 +37,7 @@ runs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-cache-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles(inputs.cache-hash-files) }} + key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools if: steps.cache-restore.outputs.cache-hit != 'true' run: | From 18109727c218497222d61f16a305d55319e95330 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 17:26:52 +0200 Subject: [PATCH 77/96] fix --- .github/workflows/ci-cache.yml | 9 --------- .github/workflows/e2e.yml | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index b6f5a90f680c..6926bcfc3978 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -54,23 +54,14 @@ jobs: # matrix: # include: # - directory: bare - # cache-hash-files: e2e/bare/pyproject.toml # - directory: jax - # cache-hash-files: e2e/jax/pyproject.toml # - directory: pytorch - # cache-hash-files: e2e/pytorch/pyproject.toml # - directory: tensorflow - # cache-hash-files: e2e/tensorflow/pyproject.toml # - directory: opacus - # cache-hash-files: e2e/opacus/pyproject.toml # - directory: mxnet - # cache-hash-files: e2e/mxnet/pyproject.toml # - directory: scikit-learn - # cache-hash-files: e2e/scikit-learn/pyproject.toml # - directory: fastai - # cache-hash-files: e2e/fastai/pyproject.toml # - directory: pandas - # cache-hash-files: e2e/pandas/pyproject.toml # name: "Cache E2E ${{matrix.directory}}" diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 1f22362965bc..c63b3c0d11f5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -21,49 +21,40 @@ jobs: matrix: include: - directory: bare - cache-hash-files: e2e/bare/pyproject.toml - directory: jax - cache-hash-files: e2e/jax/pyproject.toml - directory: pytorch - cache-hash-files: e2e/pytorch/pyproject.toml dataset: | from torchvision.datasets import CIFAR10 CIFAR10('./data', download=True) - directory: tensorflow - cache-hash-files: e2e/tensorflow/pyproject.toml dataset: | import tensorflow as tf tf.keras.datasets.cifar10.load_data() - directory: opacus - cache-hash-files: e2e/opacus/pyproject.toml dataset: | from torchvision.datasets import CIFAR10 CIFAR10('./data', download=True) - directory: mxnet - cache-hash-files: e2e/mxnet/pyproject.toml dataset: | import mxnet as mx mx.test_utils.get_mnist() - directory: scikit-learn - cache-hash-files: e2e/lear/pyproject.toml dataset: | import openml openml.datasets.get_dataset(554) - directory: fastai - cache-hash-files: e2e/fastai/pyproject.toml dataset: | from fastai.vision.all import untar_data, URLs untar_data(URLs.MNIST) - directory: pandas - cache-hash-files: e2e/pandas/pyproject.toml dataset: | from pathlib import Path from sklearn.datasets import load_iris @@ -83,7 +74,6 @@ jobs: uses: ./.github/actions/bootstrap with: python-version: 3.8 - cache-hash-files: ${{ matrix.cache-hash-files }} - name: Install dependencies run: poetry install - name: Download dataset From 460a269cad0b56dede9cd345a1c2029877bda7fb Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 17:28:28 +0200 Subject: [PATCH 78/96] Fix --- .github/actions/bootstrap/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 31688d0e2f67..135916e10dbe 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -48,4 +48,3 @@ runs: poetry config virtualenvs.create true poetry config virtualenvs.in-project true shell: bash - From c33c005379771637925736310cad05778c8e9ea9 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 21:04:24 +0200 Subject: [PATCH 79/96] Fix --- .github/workflows/ci-cache.yml | 52 +++++++--------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 6926bcfc3978..d1dd584c890a 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -36,7 +36,17 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies if: steps.bootstrap.outputs.cache-hit != 'true' - run: poetry install --all-extras + run: | + poetry install --all-extras + (cd e2e/bare && poetry install --all-extras) + (cd e2e/jax && poetry install --all-extras) + (cd e2e/pytorch && poetry install --all-extras) + (cd e2e/tensorflow && poetry install --all-extras) + (cd e2e/opacus && poetry install --all-extras) + (cd e2e/mxnet && poetry install --all-extras) + (cd e2e/scikit-learn && poetry install --all-extras) + (cd e2e/fastai && poetry install --all-extras) + (cd e2e/pandas && poetry install --all-extras) - name: Cache Python dependencies if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 @@ -47,43 +57,3 @@ jobs: ~/.cache/pip ~/.cache/pypoetry key: ${{ runner.os }}-python-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - # build_e2e_cache: - # runs-on: ubuntu-22.04 - # strategy: - # matrix: - # include: - # - directory: bare - # - directory: jax - # - directory: pytorch - # - directory: tensorflow - # - directory: opacus - # - directory: mxnet - # - directory: scikit-learn - # - directory: fastai - # - directory: pandas - - # name: "Cache E2E ${{matrix.directory}}" - - # defaults: - # run: - # working-directory: e2e/${{ matrix.directory }} - - # steps: - # - uses: actions/checkout@v3 - # - name: Bootstrap - # id: bootstrap - # uses: ./.github/actions/bootstrap - # with: - # python-version: 3.8 - # - name: Install dependencies - # run: poetry install --all-extras - # - name: Cache Python dependencies - # uses: actions/cache/save@v3 - # with: - # path: | - # **/poetry.lock - # **/.venv - # ~/.cache/pip - # ~/.cache/pypoetry - # key: ${{ runner.os }}-e2e-${{ matrix.directory }}-cache-${{ hashFiles(matrix.cache-hash-files) }} From 8b7d05e61169433486b8d87f193767077866d917 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 22:12:44 +0200 Subject: [PATCH 80/96] Fix --- .github/actions/bootstrap/action.yml | 5 ++- .github/workflows/ci-cache.yml | 47 ++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 135916e10dbe..3aa7a4bcf1e5 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -13,6 +13,9 @@ inputs: poetry-version: description: "Version of poetry to be installed using pip" default: 1.5.1 + cache-extra-key: + description: The cache-key to be used + default: outputs: python-version: description: "Exact Python or PyPy version which was used." @@ -37,7 +40,7 @@ runs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}${{ inputs.cache-extra-key }} - name: Install build tools if: steps.cache-restore.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index d1dd584c890a..471825a459e1 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -34,19 +34,45 @@ jobs: uses: ./.github/actions/bootstrap with: python-version: ${{ matrix.python-version }} + - name: Install dependencies + if: steps.bootstrap.outputs.cache-hit != 'true' + run: poetry install --all-extras + - name: Cache Python dependencies + if: steps.bootstrap.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: | + **/poetry.lock + **/.venv + ~/.cache/pip + ~/.cache/pypoetry + key: ${{ runner.os }}-py-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + + build_e2e_cache: + runs-on: ubuntu-22.04 + + name: "Cache Framework" + + steps: + - uses: actions/checkout@v3 + - name: Bootstrap + id: bootstrap + uses: ./.github/actions/bootstrap + with: + python-version: 3.8 + cache-extra-key: -e2e - name: Install dependencies if: steps.bootstrap.outputs.cache-hit != 'true' run: | - poetry install --all-extras (cd e2e/bare && poetry install --all-extras) - (cd e2e/jax && poetry install --all-extras) - (cd e2e/pytorch && poetry install --all-extras) - (cd e2e/tensorflow && poetry install --all-extras) - (cd e2e/opacus && poetry install --all-extras) - (cd e2e/mxnet && poetry install --all-extras) - (cd e2e/scikit-learn && poetry install --all-extras) - (cd e2e/fastai && poetry install --all-extras) - (cd e2e/pandas && poetry install --all-extras) + # (cd e2e/jax && poetry install --all-extras) + # (cd e2e/pytorch && poetry install --all-extras) + # (cd e2e/tensorflow && poetry install --all-extras) + # (cd e2e/opacus && poetry install --all-extras) + # (cd e2e/mxnet && poetry install --all-extras) + # (cd e2e/scikit-learn && poetry install --all-extras) + # (cd e2e/fastai && poetry install --all-extras) + # (cd e2e/pandas && poetry install --all-extras) - name: Cache Python dependencies if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 @@ -56,4 +82,5 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-py-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-e2e + \ No newline at end of file From f7e5567ea69dd0454440954a156fde82a38a8a03 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 22:44:50 +0200 Subject: [PATCH 81/96] Fix --- .github/workflows/ci-cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 471825a459e1..10095eae6306 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -51,7 +51,7 @@ jobs: build_e2e_cache: runs-on: ubuntu-22.04 - name: "Cache Framework" + name: "Cache E2E" steps: - uses: actions/checkout@v3 From e53545f877066c873943bd8e5481c26d64d50b67 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 22:51:30 +0200 Subject: [PATCH 82/96] Fix --- .github/workflows/ci-cache.yml | 16 ++++++++-------- .github/workflows/e2e.yml | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 10095eae6306..4b87d03ae0c4 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -65,14 +65,14 @@ jobs: if: steps.bootstrap.outputs.cache-hit != 'true' run: | (cd e2e/bare && poetry install --all-extras) - # (cd e2e/jax && poetry install --all-extras) - # (cd e2e/pytorch && poetry install --all-extras) - # (cd e2e/tensorflow && poetry install --all-extras) - # (cd e2e/opacus && poetry install --all-extras) - # (cd e2e/mxnet && poetry install --all-extras) - # (cd e2e/scikit-learn && poetry install --all-extras) - # (cd e2e/fastai && poetry install --all-extras) - # (cd e2e/pandas && poetry install --all-extras) + (cd e2e/jax && poetry install --all-extras) + (cd e2e/pytorch && poetry install --all-extras) + (cd e2e/tensorflow && poetry install --all-extras) + (cd e2e/opacus && poetry install --all-extras) + (cd e2e/mxnet && poetry install --all-extras) + (cd e2e/scikit-learn && poetry install --all-extras) + (cd e2e/fastai && poetry install --all-extras) + (cd e2e/pandas && poetry install --all-extras) - name: Cache Python dependencies if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c63b3c0d11f5..a067f6f9161d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -74,6 +74,7 @@ jobs: uses: ./.github/actions/bootstrap with: python-version: 3.8 + cache-extra-key: -e2e - name: Install dependencies run: poetry install - name: Download dataset From f24e6f8b75e26142f56af2915ad2cfa5f7b02b82 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 23:26:44 +0200 Subject: [PATCH 83/96] Fix --- .github/workflows/ci-cache.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 4b87d03ae0c4..d1fa49412835 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -64,15 +64,7 @@ jobs: - name: Install dependencies if: steps.bootstrap.outputs.cache-hit != 'true' run: | - (cd e2e/bare && poetry install --all-extras) - (cd e2e/jax && poetry install --all-extras) (cd e2e/pytorch && poetry install --all-extras) - (cd e2e/tensorflow && poetry install --all-extras) - (cd e2e/opacus && poetry install --all-extras) - (cd e2e/mxnet && poetry install --all-extras) - (cd e2e/scikit-learn && poetry install --all-extras) - (cd e2e/fastai && poetry install --all-extras) - (cd e2e/pandas && poetry install --all-extras) - name: Cache Python dependencies if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 From 6b338f72b0b19c7af521069a2b22faa200d386e3 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 23:42:30 +0200 Subject: [PATCH 84/96] Fix --- .github/workflows/ci-cache.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index d1fa49412835..c85e09c4b35e 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -65,6 +65,7 @@ jobs: if: steps.bootstrap.outputs.cache-hit != 'true' run: | (cd e2e/pytorch && poetry install --all-extras) + (cd e2e/fastai && poetry install --all-extras) - name: Cache Python dependencies if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 From a6421c952f162e780875730aaf124152104b8176 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Thu, 13 Jul 2023 23:47:13 +0200 Subject: [PATCH 85/96] Fix --- .github/actions/bootstrap/action.yml | 2 +- .github/workflows/ci-cache.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 3aa7a4bcf1e5..670613b9b67f 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -40,7 +40,7 @@ runs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}${{ inputs.cache-extra-key }} + key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}${{ inputs.cache-extra-key }} - name: Install build tools if: steps.cache-restore.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index c85e09c4b35e..8151b11245ad 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -46,7 +46,7 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-py-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} build_e2e_cache: runs-on: ubuntu-22.04 @@ -75,5 +75,5 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-py-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-e2e + key: ${{ runner.os }}-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-e2e \ No newline at end of file From 97d6795a09638a9fb277011bfd57b6d9c73b8a2d Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:03:26 +0200 Subject: [PATCH 86/96] Trigger --- .github/actions/bootstrap/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 670613b9b67f..4011945b8d65 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -51,3 +51,4 @@ runs: poetry config virtualenvs.create true poetry config virtualenvs.in-project true shell: bash + From 1c3eae8983afc7c58c9f161d19b9fa0b5ccac14f Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:15:00 +0200 Subject: [PATCH 87/96] Fix --- .github/actions/bootstrap/action.yml | 5 +---- .github/workflows/ci-cache.yml | 30 ---------------------------- .github/workflows/e2e.yml | 1 - 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 4011945b8d65..024406dc8c16 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -13,9 +13,6 @@ inputs: poetry-version: description: "Version of poetry to be installed using pip" default: 1.5.1 - cache-extra-key: - description: The cache-key to be used - default: outputs: python-version: description: "Exact Python or PyPy version which was used." @@ -40,7 +37,7 @@ runs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}${{ inputs.cache-extra-key }} + key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - name: Install build tools if: steps.cache-restore.outputs.cache-hit != 'true' run: | diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 8151b11245ad..a627e9665fc2 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -47,33 +47,3 @@ jobs: ~/.cache/pip ~/.cache/pypoetry key: ${{ runner.os }}-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} - - build_e2e_cache: - runs-on: ubuntu-22.04 - - name: "Cache E2E" - - steps: - - uses: actions/checkout@v3 - - name: Bootstrap - id: bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: 3.8 - cache-extra-key: -e2e - - name: Install dependencies - if: steps.bootstrap.outputs.cache-hit != 'true' - run: | - (cd e2e/pytorch && poetry install --all-extras) - (cd e2e/fastai && poetry install --all-extras) - - name: Cache Python dependencies - if: steps.bootstrap.outputs.cache-hit != 'true' - uses: actions/cache/save@v3 - with: - path: | - **/poetry.lock - **/.venv - ~/.cache/pip - ~/.cache/pypoetry - key: ${{ runner.os }}-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-e2e - \ No newline at end of file diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a067f6f9161d..c63b3c0d11f5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -74,7 +74,6 @@ jobs: uses: ./.github/actions/bootstrap with: python-version: 3.8 - cache-extra-key: -e2e - name: Install dependencies run: poetry install - name: Download dataset From 35e76586bf1f223fdf7fca9e5a9d75430e674dc8 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:16:11 +0200 Subject: [PATCH 88/96] Fix --- .github/actions/bootstrap/action.yml | 3 +-- .github/workflows/ci-cache.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 024406dc8c16..b8006f052e11 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -37,7 +37,7 @@ runs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }} - name: Install build tools if: steps.cache-restore.outputs.cache-hit != 'true' run: | @@ -48,4 +48,3 @@ runs: poetry config virtualenvs.create true poetry config virtualenvs.in-project true shell: bash - diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index a627e9665fc2..0d7a1241f85e 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -46,4 +46,4 @@ jobs: **/.venv ~/.cache/pip ~/.cache/pypoetry - key: ${{ runner.os }}-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-${{ steps.bootstrap.outputs.python-version }}-${{ hashFiles('pyproject.toml') }} From b1a6789e307f9e57165a3efaf19fe6235abfb8d1 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:48:17 +0200 Subject: [PATCH 89/96] Fix --- .github/actions/bootstrap/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index b8006f052e11..fea97935e8d9 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -48,3 +48,4 @@ runs: poetry config virtualenvs.create true poetry config virtualenvs.in-project true shell: bash + From 40f12f1c5b9b59adccd51609c956232e5706f97e Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:50:15 +0200 Subject: [PATCH 90/96] Fix --- .github/actions/bootstrap/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index fea97935e8d9..b8006f052e11 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -48,4 +48,3 @@ runs: poetry config virtualenvs.create true poetry config virtualenvs.in-project true shell: bash - From 7fea2c45cb0a521dbabf87031cc821c27bc863c1 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:55:50 +0200 Subject: [PATCH 91/96] Fix --- .github/actions/bootstrap/action.yml | 1 - .github/workflows/ci-cache.yml | 2 -- .github/workflows/deprecated_baselines.yml | 1 - .github/workflows/devtools.yml | 1 - .github/workflows/docs.yml | 1 - .github/workflows/framework.yml | 1 - 6 files changed, 7 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index b8006f052e11..9bfacb993aff 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -39,7 +39,6 @@ runs: ~/.cache/pypoetry key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }} - name: Install build tools - if: steps.cache-restore.outputs.cache-hit != 'true' run: | python -m pip install -U \ pip==${{ inputs.pip-version }} \ diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index 0d7a1241f85e..b2adf065ef86 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -35,10 +35,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install --all-extras - name: Cache Python dependencies - if: steps.bootstrap.outputs.cache-hit != 'true' uses: actions/cache/save@v3 with: path: | diff --git a/.github/workflows/deprecated_baselines.yml b/.github/workflows/deprecated_baselines.yml index 0c5761790e64..7515f2455a5b 100644 --- a/.github/workflows/deprecated_baselines.yml +++ b/.github/workflows/deprecated_baselines.yml @@ -26,7 +26,6 @@ jobs: with: python-version: 3.8 - name: Install dependencies - if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) run: poetry run ./dev/test.sh diff --git a/.github/workflows/devtools.yml b/.github/workflows/devtools.yml index bd80405e82de..fd41e7ace2e9 100644 --- a/.github/workflows/devtools.yml +++ b/.github/workflows/devtools.yml @@ -25,7 +25,6 @@ jobs: id: bootstrap uses: ./.github/actions/bootstrap - name: Install dependencies (mandatory + optional) - if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install - name: Lint + Test (isort/black/mypy/pylint/pytest) run: ./dev/test-tool.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 23cf4e68619a..793d75637e3d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -44,7 +44,6 @@ jobs: - name: Install pandoc run: sudo apt install pandoc - name: Install dependencies (mandatory only) - if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install --extras "simulation" - name: Build and deploy docs env: diff --git a/.github/workflows/framework.yml b/.github/workflows/framework.yml index 84411ba435dc..59a923585cbd 100644 --- a/.github/workflows/framework.yml +++ b/.github/workflows/framework.yml @@ -30,7 +30,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies (mandatory only) - if: steps.bootstrap.outputs.cache-hit != 'true' run: poetry install --all-extras - name: Check if protos need recompilation run: poetry run ./dev/check-protos.sh From 43ad10084d0316530f9da4ebf0d904987d633c3f Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 00:57:13 +0200 Subject: [PATCH 92/96] Fix --- .github/actions/bootstrap/action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 9bfacb993aff..ab15ff3a5083 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -17,9 +17,6 @@ outputs: python-version: description: "Exact Python or PyPy version which was used." value: ${{ steps.setup-python.outputs.python-version }} - cache-hit: - description: "A boolean value to indicate an exact match was found for the primary key" - value: ${{ steps.cache-restore.outputs.cache-hit }} runs: using: "composite" steps: From fefc9b77c4f60b695d98a1c86436ccfa9c781e15 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 01:04:22 +0200 Subject: [PATCH 93/96] Fix --- .github/workflows/ci-cache.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci-cache.yml b/.github/workflows/ci-cache.yml index b2adf065ef86..9f7f67814d81 100644 --- a/.github/workflows/ci-cache.yml +++ b/.github/workflows/ci-cache.yml @@ -4,11 +4,6 @@ on: push: branches: - main - # Remove this section before merging as we - # only want to populate cache in main - pull_request: - branches: - - main env: FLWR_TELEMETRY_ENABLED: 0 From 2b9de6912de5be6c54118d3ccb109deec51fd542 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 14:11:22 +0200 Subject: [PATCH 94/96] Update framework.yml --- .github/workflows/framework.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/framework.yml b/.github/workflows/framework.yml index 59a923585cbd..ea885e30e546 100644 --- a/.github/workflows/framework.yml +++ b/.github/workflows/framework.yml @@ -22,6 +22,9 @@ jobs: # 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-version: [3.7, 3.8, 3.9, '3.10'] + + name: Python ${{ matrix.python }} + steps: - uses: actions/checkout@v3 - name: Bootstrap From 146d361b73daf5f7b1b6dc8df8f3b15207925245 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 14:11:53 +0200 Subject: [PATCH 95/96] Update framework.yml --- .github/workflows/framework.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/framework.yml b/.github/workflows/framework.yml index ea885e30e546..b46dc5d0eb94 100644 --- a/.github/workflows/framework.yml +++ b/.github/workflows/framework.yml @@ -23,8 +23,7 @@ jobs: # qoutes as it will otherwise will assume 3.1 python-version: [3.7, 3.8, 3.9, '3.10'] - name: Python ${{ matrix.python }} - + name: Python ${{ matrix.python }} steps: - uses: actions/checkout@v3 - name: Bootstrap From cbacfd1685507471a009bad4629805f55124f757 Mon Sep 17 00:00:00 2001 From: Taner Topal Date: Fri, 14 Jul 2023 14:13:55 +0200 Subject: [PATCH 96/96] Update framework.yml --- .github/workflows/framework.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/framework.yml b/.github/workflows/framework.yml index b46dc5d0eb94..96f80af7703a 100644 --- a/.github/workflows/framework.yml +++ b/.github/workflows/framework.yml @@ -23,7 +23,7 @@ jobs: # qoutes as it will otherwise will assume 3.1 python-version: [3.7, 3.8, 3.9, '3.10'] - name: Python ${{ matrix.python }} + name: Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v3 - name: Bootstrap