Skip to content

Commit ad2be6a

Browse files
mmckyclaude
andauthored
Pin jax 0.12.1, the new lecture baseline (#665)
Moves programming's jax pin from 0.11.0 to the new baseline, 0.12.1: jax[cuda13] in cache.yml, ci.yml and publish.yml, jax[CPU] in the Linux, macOS and Windows execution checks, and numpy_vs_numba_vs_jax's own install line. 0.12.1 runs that lecture's lax.fori_loop cells without the slowdown that made 0.11.1 time out. Content reviewed by a person: @mmcky, who answered "Reviewed, merge" to this exact diff in the organiser session. A full site validation (fresh no-cache GPU builds of main on 0.11.0 and this PR on 0.12.1, and the three CPU execution checks) found no new warning and no regression; the summary is the PR's validation comment. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6ddf088 commit ad2be6a

7 files changed

Lines changed: 43 additions & 46 deletions

File tree

‎.github/workflows/cache.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
- name: Install JAX and Numpyro
2222
shell: bash -l {0}
2323
run: |
24-
# Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's
24+
# Pinned to the lecture baseline, QuantEcon/lectures'
25+
# _base/environment-update.yml. jax 0.11.1 hung numpy_vs_numba_vs_jax's
2526
# lax.fori_loop cells -- they jit with device=cpu, so the CPU-path
26-
# regression bites even on these GPU runners. Context is recorded in
27-
# QuantEcon/workspace-lectures#49. With jax already present, the
28-
# lecture's unpinned `!pip install quantecon jax` cell is satisfied
29-
# and does not upgrade.
30-
pip install "jax[cuda13]==0.11.0"
27+
# regression bit even on these GPU runners (QuantEcon/workspace-lectures#49);
28+
# 0.12.1 runs them. The lecture's own install cell names the same
29+
# version, so it is satisfied and reinstalls nothing.
30+
pip install "jax[cuda13]==0.12.1"
3131
pip install numpyro
3232
python scripts/test-jax-install.py
3333
- name: Build matplotlib's font cache

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
- name: Install JAX and Numpyro
2727
shell: bash -l {0}
2828
run: |
29-
# Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's
29+
# Pinned to the lecture baseline, QuantEcon/lectures'
30+
# _base/environment-update.yml. jax 0.11.1 hung numpy_vs_numba_vs_jax's
3031
# lax.fori_loop cells -- they jit with device=cpu, so the CPU-path
31-
# regression bites even on these GPU runners. Context is recorded in
32-
# QuantEcon/workspace-lectures#49. With jax already present, the
33-
# lecture's unpinned `!pip install quantecon jax` cell is satisfied
34-
# and does not upgrade.
35-
pip install "jax[cuda13]==0.11.0"
32+
# regression bit even on these GPU runners (QuantEcon/workspace-lectures#49);
33+
# 0.12.1 runs them. The lecture's own install cell names the same
34+
# version, so it is satisfied and reinstalls nothing.
35+
pip install "jax[cuda13]==0.12.1"
3636
pip install numpyro
3737
python scripts/test-jax-install.py
3838
- name: Build matplotlib's font cache

‎.github/workflows/execution-linux.yml‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@ jobs:
3131
- name: Install Jax [CPU]
3232
shell: bash -l {0}
3333
run: |
34-
# Pinned: jax 0.11.1 (2026-08-17) regresses XLA:CPU execution --
35-
# numpy_vs_numba_vs_jax's lax.fori_loop and lax.scan cells go
36-
# quadratic in n, so this -W build dies on CellTimeoutError. Matches
37-
# the pin already in cache/ci/publish.yml; evidence and the exposure
38-
# map are recorded in QuantEcon/workspace-lectures#49. With jax
39-
# already present, the lecture's unpinned
40-
# `!pip install quantecon jax` cell is satisfied and does not
41-
# upgrade.
42-
pip install "jax[CPU]==0.11.0"
34+
# Pinned to the lecture baseline, QuantEcon/lectures'
35+
# _base/environment-update.yml, as in cache/ci/publish.yml. jax 0.11.1
36+
# regressed XLA:CPU execution -- numpy_vs_numba_vs_jax's lax.fori_loop
37+
# and lax.scan cells went quadratic in n, so this -W build died on
38+
# CellTimeoutError (QuantEcon/workspace-lectures#49); 0.12.1 runs them.
39+
# The lecture's own install cell names the same version, so it is
40+
# satisfied and reinstalls nothing.
41+
pip install "jax[CPU]==0.12.1"
4342
- name: Build Lectures (+ Execution Checks)
4443
shell: bash -l {0}
4544
run: jb build lectures --path-output=./ -W --keep-going

‎.github/workflows/execution-osx.yml‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,14 @@ jobs:
3131
- name: Install Jax [CPU]
3232
shell: bash -l {0}
3333
run: |
34-
# Pinned: jax 0.11.1 (2026-08-17) regresses XLA:CPU execution --
35-
# numpy_vs_numba_vs_jax's lax.fori_loop and lax.scan cells go
36-
# quadratic in n, so this -W build dies on CellTimeoutError. Matches
37-
# the pin already in cache/ci/publish.yml; evidence and the exposure
38-
# map are recorded in QuantEcon/workspace-lectures#49. With jax
39-
# already present, the lecture's unpinned
40-
# `!pip install quantecon jax` cell is satisfied and does not
41-
# upgrade.
42-
pip install "jax[CPU]==0.11.0"
34+
# Pinned to the lecture baseline, QuantEcon/lectures'
35+
# _base/environment-update.yml, as in cache/ci/publish.yml. jax 0.11.1
36+
# regressed XLA:CPU execution -- numpy_vs_numba_vs_jax's lax.fori_loop
37+
# and lax.scan cells went quadratic in n, so this -W build died on
38+
# CellTimeoutError (QuantEcon/workspace-lectures#49); 0.12.1 runs them.
39+
# The lecture's own install cell names the same version, so it is
40+
# satisfied and reinstalls nothing.
41+
pip install "jax[CPU]==0.12.1"
4342
- name: Build Lectures (+ Execution Checks)
4443
shell: bash -l {0}
4544
run: jb build lectures --path-output=./ -W --keep-going

‎.github/workflows/execution-win.yml‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,14 @@ jobs:
3535
- name: Install Jax [CPU]
3636
shell: bash -l {0}
3737
run: |
38-
# Pinned: jax 0.11.1 (2026-08-17) regresses XLA:CPU execution --
39-
# numpy_vs_numba_vs_jax's lax.fori_loop and lax.scan cells go
40-
# quadratic in n, so this -W build dies on CellTimeoutError. Matches
41-
# the pin already in cache/ci/publish.yml; evidence and the exposure
42-
# map are recorded in QuantEcon/workspace-lectures#49. With jax
43-
# already present, the lecture's unpinned
44-
# `!pip install quantecon jax` cell is satisfied and does not
45-
# upgrade.
46-
pip install "jax[CPU]==0.11.0"
38+
# Pinned to the lecture baseline, QuantEcon/lectures'
39+
# _base/environment-update.yml, as in cache/ci/publish.yml. jax 0.11.1
40+
# regressed XLA:CPU execution -- numpy_vs_numba_vs_jax's lax.fori_loop
41+
# and lax.scan cells went quadratic in n, so this -W build died on
42+
# CellTimeoutError (QuantEcon/workspace-lectures#49); 0.12.1 runs them.
43+
# The lecture's own install cell names the same version, so it is
44+
# satisfied and reinstalls nothing.
45+
pip install "jax[CPU]==0.12.1"
4746
- name: Build Lectures (+ Execution Checks)
4847
shell: powershell
4948
run: jb build lectures --path-output=./ -W --keep-going

‎.github/workflows/publish.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
- name: Install JAX and Numpyro
3939
shell: bash -l {0}
4040
run: |
41-
# Pinned: jax 0.11.1 (2026-08-17) hangs numpy_vs_numba_vs_jax's
41+
# Pinned to the lecture baseline, QuantEcon/lectures'
42+
# _base/environment-update.yml. jax 0.11.1 hung numpy_vs_numba_vs_jax's
4243
# lax.fori_loop cells -- they jit with device=cpu, so the CPU-path
43-
# regression bites even on these GPU runners. Context is recorded in
44-
# QuantEcon/workspace-lectures#49. With jax already present, the
45-
# lecture's unpinned `!pip install quantecon jax` cell is satisfied
46-
# and does not upgrade.
47-
pip install "jax[cuda13]==0.11.0"
44+
# regression bit even on these GPU runners (QuantEcon/workspace-lectures#49);
45+
# 0.12.1 runs them. The lecture's own install cell names the same
46+
# version, so it is satisfied and reinstalls nothing.
47+
pip install "jax[cuda13]==0.12.1"
4848
pip install numpyro
4949
python scripts/test-jax-install.py
5050
- name: Build matplotlib's font cache

‎lectures/numpy_vs_numba_vs_jax.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie
4545
---
4646
tags: [hide-output]
4747
---
48-
!pip install quantecon "jax==0.11.0"
48+
!pip install quantecon "jax==0.12.1"
4949
```
5050

5151
```{include} _admonition/gpu.md

0 commit comments

Comments
 (0)