update default parameters for discrete consistency model (#629) #1704
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Multi-Backend Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test: | |
| name: Run Multi-Backend Tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.10"] # we usually only need to test the oldest python version | |
| backend: ["jax", "tensorflow", "torch"] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| KERAS_BACKEND: ${{ matrix.backend }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install -U pip setuptools wheel | |
| pip install .[test] | |
| - name: Install JAX | |
| if: ${{ matrix.backend == 'jax' }} | |
| run: | | |
| pip install -U jax | |
| - name: Install TensorFlow | |
| if: ${{ matrix.backend == 'tensorflow' }} | |
| run: | | |
| pip install -U tensorflow | |
| - name: Install PyTorch | |
| if: ${{ matrix.backend == 'torch' }} | |
| run: | | |
| pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
| - name: Show Environment Info | |
| run: | | |
| python --version | |
| pip --version | |
| printenv | sort | |
| pip list | |
| - name: Run Tests | |
| run: | | |
| pytest -x -m "not slow" | |
| - name: Run Slow Tests | |
| # Run slow tests, such as full integration notebooks: | |
| # - only on Ubuntu, Python 3.10, JAX Backend | |
| # - only on workflow_dispatch or pushes/PR to main branch | |
| if: | | |
| ${{ | |
| matrix.os == 'ubuntu-latest' | |
| && matrix.python-version == '3.10' | |
| && matrix.backend == 'jax' | |
| && ( | |
| github.event.name == 'workflow_dispatch' | |
| || (github.event.name == 'push' && github.ref_name == 'main') | |
| || (github.event.name == 'pull_request' && github.base_ref == 'main') | |
| ) | |
| }} | |
| run: | | |
| pytest -m "slow" | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Create Coverage Report | |
| run: | | |
| coverage xml | |
| - name: Upload Coverage Reports to CodeCov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| # do not use the files attribute here, otherwise the reports are not merged correctly | |
| token: ${{ secrets.CODECOV_TOKEN }} |