Skip to content

Pin jax to 0.11.0 in CI — jax 0.11.1 hangs the fori_loop cells on CPU #35

Pin jax to 0.11.0 in CI — jax 0.11.1 hangs the fori_loop cells on CPU

Pin jax to 0.11.0 in CI — jax 0.11.1 hangs the fori_loop cells on CPU #35

Workflow file for this run

name: Build Project [using jupyter-book]
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
preview:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup Anaconda
uses: conda-incubator/setup-miniconda@v4
with:
auto-update-conda: true
auto-activate-base: true
miniconda-version: 'latest'
python-version: "3.13"
environment-file: environment.yml
activate-environment: quantecon
- name: Install JAX (CPU, pinned)
shell: bash -l {0}
run: |
# Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's
# lax.fori_loop cells on the CPU path -- context is recorded in
# QuantEcon/workspace-lectures#49. With jax already present, the
# lecture's unpinned `!pip install quantecon jax` cell is satisfied
# and does not upgrade.
pip install "jax==0.11.0"
- name: Display Conda Environment Versions
shell: bash -l {0}
run: conda list
- name: Display Pip Versions
shell: bash -l {0}
run: pip list
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v21
with:
workflow: cache.yml
branch: main
name: build-cache
path: _build
- name: Clear stale Sphinx environment
shell: bash -l {0}
run: rm -rf _build/.doctrees
# HTML only for now — no PDF or notebook assets
- name: Build HTML
shell: bash -l {0}
run: |
jb build lectures --path-output ./ -n -W --keep-going
- name: Upload Execution Reports
uses: actions/upload-artifact@v7
if: failure()
with:
name: execution-reports
path: _build/html/reports
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Preview Deploy to Netlify
uses: quantecon/actions/preview-netlify@v0.8.0
with:
netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
netlify-site-id: ${{ secrets.NETLIFY_SITE_ID }}
build-dir: _build/html