From 53c29e53e8ba54bdbb098b18415be1604e9e8a4a Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 19 Nov 2026 17:26:47 +1100 Subject: [PATCH 1/2] Pin jax at 0.12.1, the shared baseline's new version The lecture baseline (QuantEcon/lectures' _base/environment-update.yml) moves jax from 0.11.0 to 0.12.1: 0.11.0 was kept because 0.11.1 hangs numpy_vs_numba_vs_jax's lax.fori_loop cells, and a test build on 0.12.1 ran them without a hang. The three GPU workflows and the lecture's own install line move together, so the lecture's cell stays satisfied. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL --- .github/workflows/cache.yml | 12 ++++++------ .github/workflows/ci.yml | 12 ++++++------ .github/workflows/publish.yml | 12 ++++++------ lectures/numpy_vs_numba_vs_jax.md | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 620855e1..8a4ff43c 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -21,13 +21,13 @@ jobs: - name: Install JAX and Numpyro shell: bash -l {0} run: | - # Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's + # Pinned to the lecture baseline, QuantEcon/lectures' + # _base/environment-update.yml. jax 0.11.1 hung numpy_vs_numba_vs_jax's # lax.fori_loop cells -- they jit with device=cpu, so the CPU-path - # regression bites even on these GPU runners. 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[cuda13]==0.11.0" + # regression bit even on these GPU runners (QuantEcon/workspace-lectures#49); + # 0.12.1 runs them. The lecture's own install cell names the same + # version, so it is satisfied and reinstalls nothing. + pip install "jax[cuda13]==0.12.1" pip install numpyro python scripts/test-jax-install.py - name: Build matplotlib's font cache diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6718ff34..e64f71a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,13 @@ jobs: - name: Install JAX and Numpyro shell: bash -l {0} run: | - # Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's + # Pinned to the lecture baseline, QuantEcon/lectures' + # _base/environment-update.yml. jax 0.11.1 hung numpy_vs_numba_vs_jax's # lax.fori_loop cells -- they jit with device=cpu, so the CPU-path - # regression bites even on these GPU runners. 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[cuda13]==0.11.0" + # regression bit even on these GPU runners (QuantEcon/workspace-lectures#49); + # 0.12.1 runs them. The lecture's own install cell names the same + # version, so it is satisfied and reinstalls nothing. + pip install "jax[cuda13]==0.12.1" pip install numpyro python scripts/test-jax-install.py - name: Build matplotlib's font cache diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7186c74f..90f131f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,13 +38,13 @@ jobs: - name: Install JAX and Numpyro shell: bash -l {0} run: | - # Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's + # Pinned to the lecture baseline, QuantEcon/lectures' + # _base/environment-update.yml. jax 0.11.1 hung numpy_vs_numba_vs_jax's # lax.fori_loop cells -- they jit with device=cpu, so the CPU-path - # regression bites even on these GPU runners. 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[cuda13]==0.11.0" + # regression bit even on these GPU runners (QuantEcon/workspace-lectures#49); + # 0.12.1 runs them. The lecture's own install cell names the same + # version, so it is satisfied and reinstalls nothing. + pip install "jax[cuda13]==0.12.1" pip install numpyro python scripts/test-jax-install.py - name: Build matplotlib's font cache diff --git a/lectures/numpy_vs_numba_vs_jax.md b/lectures/numpy_vs_numba_vs_jax.md index d73a1245..ef588b75 100644 --- a/lectures/numpy_vs_numba_vs_jax.md +++ b/lectures/numpy_vs_numba_vs_jax.md @@ -45,7 +45,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie --- tags: [hide-output] --- -!pip install quantecon "jax==0.11.0" +!pip install quantecon "jax==0.12.1" ``` ```{include} _admonition/gpu.md From 5ff419fc140b919c6fe3d4f68f10ad29528f5920 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 19 Nov 2026 17:53:01 +1100 Subject: [PATCH 2/2] Pin jax at 0.12.1 in the CPU execution workflows too Copilot's review: the Linux, macOS and Windows execution checks still installed jax[CPU]==0.11.0, so the lecture's 0.12.1 line would upgrade jax partway through their builds. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL --- .github/workflows/execution-linux.yml | 17 ++++++++--------- .github/workflows/execution-osx.yml | 17 ++++++++--------- .github/workflows/execution-win.yml | 17 ++++++++--------- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.github/workflows/execution-linux.yml b/.github/workflows/execution-linux.yml index 8e9d5984..36cfdaaf 100644 --- a/.github/workflows/execution-linux.yml +++ b/.github/workflows/execution-linux.yml @@ -31,15 +31,14 @@ jobs: - name: Install Jax [CPU] shell: bash -l {0} run: | - # Pinned: jax 0.11.1 (2026-08-17) regresses XLA:CPU execution -- - # numpy_vs_numba_vs_jax's lax.fori_loop and lax.scan cells go - # quadratic in n, so this -W build dies on CellTimeoutError. Matches - # the pin already in cache/ci/publish.yml; evidence and the exposure - # map are 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[CPU]==0.11.0" + # Pinned to the lecture baseline, QuantEcon/lectures' + # _base/environment-update.yml, as in cache/ci/publish.yml. jax 0.11.1 + # regressed XLA:CPU execution -- numpy_vs_numba_vs_jax's lax.fori_loop + # and lax.scan cells went quadratic in n, so this -W build died on + # CellTimeoutError (QuantEcon/workspace-lectures#49); 0.12.1 runs them. + # The lecture's own install cell names the same version, so it is + # satisfied and reinstalls nothing. + pip install "jax[CPU]==0.12.1" - name: Build Lectures (+ Execution Checks) shell: bash -l {0} run: jb build lectures --path-output=./ -W --keep-going diff --git a/.github/workflows/execution-osx.yml b/.github/workflows/execution-osx.yml index 897b49a2..50677db0 100644 --- a/.github/workflows/execution-osx.yml +++ b/.github/workflows/execution-osx.yml @@ -31,15 +31,14 @@ jobs: - name: Install Jax [CPU] shell: bash -l {0} run: | - # Pinned: jax 0.11.1 (2026-08-17) regresses XLA:CPU execution -- - # numpy_vs_numba_vs_jax's lax.fori_loop and lax.scan cells go - # quadratic in n, so this -W build dies on CellTimeoutError. Matches - # the pin already in cache/ci/publish.yml; evidence and the exposure - # map are 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[CPU]==0.11.0" + # Pinned to the lecture baseline, QuantEcon/lectures' + # _base/environment-update.yml, as in cache/ci/publish.yml. jax 0.11.1 + # regressed XLA:CPU execution -- numpy_vs_numba_vs_jax's lax.fori_loop + # and lax.scan cells went quadratic in n, so this -W build died on + # CellTimeoutError (QuantEcon/workspace-lectures#49); 0.12.1 runs them. + # The lecture's own install cell names the same version, so it is + # satisfied and reinstalls nothing. + pip install "jax[CPU]==0.12.1" - name: Build Lectures (+ Execution Checks) shell: bash -l {0} run: jb build lectures --path-output=./ -W --keep-going diff --git a/.github/workflows/execution-win.yml b/.github/workflows/execution-win.yml index b6c20e84..1d259d23 100644 --- a/.github/workflows/execution-win.yml +++ b/.github/workflows/execution-win.yml @@ -35,15 +35,14 @@ jobs: - name: Install Jax [CPU] shell: bash -l {0} run: | - # Pinned: jax 0.11.1 (2026-08-17) regresses XLA:CPU execution -- - # numpy_vs_numba_vs_jax's lax.fori_loop and lax.scan cells go - # quadratic in n, so this -W build dies on CellTimeoutError. Matches - # the pin already in cache/ci/publish.yml; evidence and the exposure - # map are 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[CPU]==0.11.0" + # Pinned to the lecture baseline, QuantEcon/lectures' + # _base/environment-update.yml, as in cache/ci/publish.yml. jax 0.11.1 + # regressed XLA:CPU execution -- numpy_vs_numba_vs_jax's lax.fori_loop + # and lax.scan cells went quadratic in n, so this -W build died on + # CellTimeoutError (QuantEcon/workspace-lectures#49); 0.12.1 runs them. + # The lecture's own install cell names the same version, so it is + # satisfied and reinstalls nothing. + pip install "jax[CPU]==0.12.1" - name: Build Lectures (+ Execution Checks) shell: powershell run: jb build lectures --path-output=./ -W --keep-going