From 824ccbccfabe279fc60fb11c5628ae5cb85f2024 Mon Sep 17 00:00:00 2001 From: Robert Steiner Date: Fri, 1 Nov 2024 10:47:33 +0100 Subject: [PATCH] test Signed-off-by: Robert Steiner --- .github/workflows/e2e.yml | 261 +++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 131 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index da6a02672fc5..7f3712491ae8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,6 +15,8 @@ concurrency: env: FLWR_TELEMETRY_ENABLED: 0 ARTIFACT_BUCKET: artifact.flower.ai + GRPC_VERBOSITY: debug + GRPC_TRACE: all jobs: wheel: @@ -55,9 +57,6 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 10 needs: wheel - env: - GRPC_VERBOSITY: debug - GRPC_TRACE: all strategy: fail-fast: false matrix: @@ -133,41 +132,41 @@ jobs: - directory: e2e-jax e2e: e2e_jax - - directory: e2e-pytorch - e2e: e2e_pytorch - dataset: | - from torchvision.datasets import CIFAR10 - CIFAR10('./data', download=True) + # - directory: e2e-pytorch + # e2e: e2e_pytorch + # dataset: | + # from torchvision.datasets import CIFAR10 + # CIFAR10('./data', download=True) - - directory: e2e-tensorflow - e2e: e2e_tensorflow - dataset: | - import tensorflow as tf - tf.keras.datasets.cifar10.load_data() + # - directory: e2e-tensorflow + # e2e: e2e_tensorflow + # dataset: | + # import tensorflow as tf + # tf.keras.datasets.cifar10.load_data() - - directory: e2e-opacus - e2e: e2e_opacus - dataset: | - from torchvision.datasets import CIFAR10 - CIFAR10('./data', download=True) + # - directory: e2e-opacus + # e2e: e2e_opacus + # dataset: | + # from torchvision.datasets import CIFAR10 + # CIFAR10('./data', download=True) - - directory: e2e-pytorch-lightning - e2e: e2e_pytorch_lightning - dataset: | - from torchvision.datasets import MNIST - MNIST('./data', download=True) + # - directory: e2e-pytorch-lightning + # e2e: e2e_pytorch_lightning + # dataset: | + # from torchvision.datasets import MNIST + # MNIST('./data', download=True) - - directory: e2e-scikit-learn - e2e: e2e_scikit_learn - dataset: | - import openml - openml.datasets.get_dataset(554) + # - directory: e2e-scikit-learn + # e2e: e2e_scikit_learn + # dataset: | + # import openml + # openml.datasets.get_dataset(554) - - directory: e2e-fastai - e2e: e2e_fastai - dataset: | - from fastai.vision.all import untar_data, URLs - untar_data(URLs.MNIST) + # - directory: e2e-fastai + # e2e: e2e_fastai + # dataset: | + # from fastai.vision.all import untar_data, URLs + # untar_data(URLs.MNIST) - directory: e2e-pandas e2e: e2e_pandas @@ -243,110 +242,110 @@ jobs: path: ${{ env.pythonLocation }} key: pythonloc-${{ runner.os }}-${{ matrix.directory }}-${{ env.pythonLocation }}-${{ hashFiles(format('./e2e/{0}/pyproject.toml', matrix.directory)) }} - strategies: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - needs: wheel - strategy: - matrix: - strat: ["FedMedian", "FedTrimmedAvg", "QFedAvg", "FaultTolerantFedAvg", "FedAvgM", "FedAdam", "FedAdagrad", "FedYogi"] + # strategies: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # needs: wheel + # strategy: + # matrix: + # strat: ["FedMedian", "FedTrimmedAvg", "QFedAvg", "FaultTolerantFedAvg", "FedAvgM", "FedAdam", "FedAdagrad", "FedYogi"] - name: Strategy / ${{ matrix.strat }} + # name: Strategy / ${{ matrix.strat }} - defaults: - run: - working-directory: e2e/strategies + # defaults: + # run: + # working-directory: e2e/strategies - steps: - - uses: actions/checkout@v4 - - name: Bootstrap - uses: ./.github/actions/bootstrap - - name: Install dependencies - run: | - python -m poetry install - - name: Install Flower wheel from artifact store - if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - run: | - python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} - - name: Cache Datasets - uses: actions/cache@v4 - with: - path: "~/.keras" - key: keras-datasets - - name: Download Datasets - run: | - python -c "import tensorflow as tf; tf.keras.datasets.mnist.load_data()" - - name: Test strategies - run: | - python test.py "${{ matrix.strat }}" + # steps: + # - uses: actions/checkout@v4 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # - name: Install dependencies + # run: | + # python -m poetry install + # - name: Install Flower wheel from artifact store + # if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + # run: | + # python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} + # - name: Cache Datasets + # uses: actions/cache@v4 + # with: + # path: "~/.keras" + # key: keras-datasets + # - name: Download Datasets + # run: | + # python -c "import tensorflow as tf; tf.keras.datasets.mnist.load_data()" + # - name: Test strategies + # run: | + # python test.py "${{ matrix.strat }}" - templates: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - needs: wheel - strategy: - matrix: - framework: ["numpy", "pytorch", "tensorflow", "jax", "sklearn"] + # templates: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # needs: wheel + # strategy: + # matrix: + # framework: ["numpy", "pytorch", "tensorflow", "jax", "sklearn"] - name: Template / ${{ matrix.framework }} + # name: Template / ${{ matrix.framework }} - steps: - - uses: actions/checkout@v4 - - name: Bootstrap - uses: ./.github/actions/bootstrap - - name: Install Flower from repo - if: ${{ github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' }} - run: | - python -m pip install . - - name: Install Flower wheel from artifact store - if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - run: | - python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} - - name: Create project and install it - run: | - flwr new tmp-${{ matrix.framework }} --framework ${{ matrix.framework }} --username gh_ci - cd tmp-${{ matrix.framework }} - pip install . - - name: Run project - run: | - cd tmp-${{ matrix.framework }} - flwr run --run-config num-server-rounds=1 2>&1 | tee flwr_output.log - if grep -q "ERROR" flwr_output.log; then - exit 1 - fi + # steps: + # - uses: actions/checkout@v4 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # - name: Install Flower from repo + # if: ${{ github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' }} + # run: | + # python -m pip install . + # - name: Install Flower wheel from artifact store + # if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + # run: | + # python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} + # - name: Create project and install it + # run: | + # flwr new tmp-${{ matrix.framework }} --framework ${{ matrix.framework }} --username gh_ci + # cd tmp-${{ matrix.framework }} + # pip install . + # - name: Run project + # run: | + # cd tmp-${{ matrix.framework }} + # flwr run --run-config num-server-rounds=1 2>&1 | tee flwr_output.log + # if grep -q "ERROR" flwr_output.log; then + # exit 1 + # fi - build_and_install: - runs-on: ubuntu-22.04 - timeout-minutes: 10 - needs: wheel - strategy: - matrix: - framework: ["numpy"] - python-version: ["3.9", "3.10", "3.11"] + # build_and_install: + # runs-on: ubuntu-22.04 + # timeout-minutes: 10 + # needs: wheel + # strategy: + # matrix: + # framework: ["numpy"] + # python-version: ["3.9", "3.10", "3.11"] - name: | - Build & Install / - Python ${{ matrix.python-version }} / - ${{ matrix.framework }} + # name: | + # Build & Install / + # Python ${{ matrix.python-version }} / + # ${{ matrix.framework }} - steps: - - uses: actions/checkout@v4 - - name: Bootstrap - uses: ./.github/actions/bootstrap - with: - python-version: ${{ matrix.python-version }} - poetry-skip: 'true' - - name: Install Flower from repo - if: ${{ github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' }} - run: | - python -m pip install . - - name: Install Flower wheel from artifact store - if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - run: | - python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} - - name: Create project, build, and install it - run: | - flwr new tmp-${{ matrix.framework }} --framework ${{ matrix.framework }} --username gh_ci - cd tmp-${{ matrix.framework }} - flwr build - flwr install *.fab + # steps: + # - uses: actions/checkout@v4 + # - name: Bootstrap + # uses: ./.github/actions/bootstrap + # with: + # python-version: ${{ matrix.python-version }} + # poetry-skip: 'true' + # - name: Install Flower from repo + # if: ${{ github.repository != 'adap/flower' || github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' }} + # run: | + # python -m pip install . + # - name: Install Flower wheel from artifact store + # if: ${{ github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} + # run: | + # python -m pip install https://${{ env.ARTIFACT_BUCKET }}/py/${{ needs.wheel.outputs.dir }}/${{ needs.wheel.outputs.short_sha }}/${{ needs.wheel.outputs.whl_path }} + # - name: Create project, build, and install it + # run: | + # flwr new tmp-${{ matrix.framework }} --framework ${{ matrix.framework }} --username gh_ci + # cd tmp-${{ matrix.framework }} + # flwr build + # flwr install *.fab