/
githubmirror
/
keras
Обзор
Документация
Войти
/
githubmirror
/
keras
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
.github/workflows/tpu_tests.yml
88 строк
3 KB
dependabot[bot]
Build(deps): Bump the github-actions group with 6 updates (#23372)
04 авг 2026, 03:52
Не верифицирован
04 авг 2026, 03:52
55bc3f0
Код
Авторство
О чём код?
name: Keras TPU Tests on: push: branches: [master] pull_request: types: [unlabeled] release: types: [created] permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: test-in-container: # Only run on pushes to master, releases or "kokoro:force-run" unlabel if: | github.event_name == 'push' || github.event_name == 'release' || (github.event.action == 'unlabeled' && github.event.label.name == 'kokoro:force-run') strategy: fail-fast: false matrix: include: - backend: jax multi_device: false runner: linux-x86-ct6e-44-1tpu name: Run tests on TPU - backend: jax multi_device: true runner: linux-x86-ct5lp-112-4tpu name: Run tests on multi-TPU container: image: python:3.11-slim name: ${{ matrix.name }} runs-on: ${{ matrix.runner }} timeout-minutes: 120 env: KERAS_HOME: .github/workflows/config/${{ matrix.backend }} steps: - name: Checkout ${{ github.ref }} uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install binary dependencies # curl, git, gpg are for codecov/codecov-action run: | apt-get update apt-get -y install curl apt-get -y install git apt-get -y install gnupg - name: Install Python dependencies run: pip install --no-cache-dir -r requirements-${{ matrix.backend }}-tpu.txt - name: Verify JAX Installation run: python3 -c "import jax; print('JAX devices:', jax.devices(), jax.devices()[0].device_kind); assert jax.default_backend() == 'tpu'" - name: Run Tests if: ${{ !matrix.multi_device }} run: pytest keras --ignore keras/src/applications --cov=keras --cov-config=pyproject.toml - name: Run Multi-device Tests if: ${{ matrix.multi_device }} run: pytest keras -m multi_device --cov=keras --cov-config=pyproject.toml --cov-append - name: Convert Coverage run: coverage xml --omit='keras/src/applications/*,keras/api' -o core-coverage.xml - name: Upload Coverage uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 with: env_vars: KERAS_HOME flags: keras,keras-tpu,keras-${{ matrix.backend }}${{ matrix.multi_device == 'true' && '-multi' || '' }} files: core-coverage.xml token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: false