Skip to content

Commit

Permalink
Add test against JAX nightly
Browse files Browse the repository at this point in the history
This will catch potential incompatibilities introduced in JAX before they make it into a release.

PiperOrigin-RevId: 715011865
  • Loading branch information
Jake VanderPlas authored and ChexDev committed Jan 13, 2025
1 parent 6f59425 commit 47c13e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ on:
schedule:
- cron: '30 2 * * *'

permissions:
contents: read
actions: write # to cancel previous workflows

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} jax=${{ matrix.jax-version}}"
Expand All @@ -21,11 +29,14 @@ jobs:
include:
- python-version: "3.9"
os: "ubuntu-latest"
jax-version: "0.4.27" # Keep this in sync with version in pyproject.toml
jax-version: "0.4.27" # Keep this in sync with version in requirements.txt
- python-version: "3.12"
os: "ubuntu-latest"
jax-version: "nightly"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v4"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "${{ matrix.python-version }}"
cache: "pip"
Expand Down
2 changes: 2 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ if [ "$JAX_VERSION" = "" ]; then
: # use version installed in requirements above
elif [ "$JAX_VERSION" = "newest" ]; then
pip install -U jax jaxlib
elif [ "$JAX_VERSION" = "nightly" ]; then
pip install -U --pre jax jaxlib -f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html
else
pip install "jax==${JAX_VERSION}" "jaxlib==${JAX_VERSION}"
fi
Expand Down

0 comments on commit 47c13e9

Please sign in to comment.