Repository navigation
Raise the build stack to the shared baseline, pin jax 0.12.1, drop --upgrade from install lines - #1135
Conversation
…upgrade from install lines The fourth of six pull requests, one per series, that bring the lecture series to one up-to-date baseline: QuantEcon/lectures' _base/environment-update.yml. - environment.yml: quantecon-book-theme 0.22.1 to 0.22.2, sphinx-proof 0.4.0 to 0.4.1. - cache.yml, ci.yml, publish.yml: jax[cuda13] pinned at 0.12.1, the baseline's version, in place of the newest. - ak2, kesten_processes, likelihood_ratio_process, opt_transport (twice), pandas_panel, robust_permanent_income, back_prop: --upgrade and -U dropped from the install lines. - back_prop: the `!conda install -y -c plotly plotly-orca` line removed (orca is plotly's retired exporter; kaleido makes the images), with the note that warned it fails on Colab. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
There was a problem hiding this comment.
🔵 Needs a closer look
Required fresh main/branch lecture runs, warning/output and page-rendering comparisons, and Colab validation are missing and cannot be reproduced in this review environment.
No open issues 🎉
What changed in this PR
Aligns the Python lecture series with QuantEcon’s shared build baseline and reduces changes to installed package versions during lecture execution.
Changes:
- Updates
quantecon-book-themeto 0.22.2 andsphinx-proofto 0.4.1. - Pins JAX with CUDA 13 support to 0.12.1 across cache, CI, and publishing workflows.
- Removes package-upgrade flags from lecture setup cells, plus the obsolete Orca installation and its associated Colab warning.
| File | Description |
|---|---|
lectures/robust_permanent_income.md |
Removes forced upgrading of quantecon. |
lectures/pandas_panel.md |
Removes forced upgrading of seaborn. |
lectures/opt_transport.md |
Removes forced upgrading of quantecon and POT. |
lectures/likelihood_ratio_process.md |
Removes forced upgrading of quantecon. |
lectures/kesten_processes.md |
Removes forced upgrading of quantecon and yfinance. |
lectures/back_prop.md |
Removes upgrade flags, Orca installation, and the associated Colab warning; retains Kaleido setup. |
lectures/ak2.md |
Removes forced upgrading of quantecon. |
environment.yml |
Updates the book theme and proof extension to baseline versions. |
.github/workflows/publish.yml |
Pins publishing builds to JAX 0.12.1. |
.github/workflows/ci.yml |
Pins CI builds to JAX 0.12.1. |
.github/workflows/cache.yml |
Pins cache builds to JAX 0.12.1. |
Review effort: Balanced
📖 Netlify Preview Ready!Preview URL: https://pr-1135--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed Lectures
Build Info
|
Without -U, Colab keeps its preinstalled plotly 5.24.1, which cannot use
kaleido 1.x ("Image export using the kaleido engine requires the kaleido
package"); the Colab check failed this way. plotly 6.1.0 is the first
release that supports kaleido 1.x. With floors, pip upgrades plotly only
where it is older than 6.1, as on Colab, and leaves a build's pinned
plotly (6.7.0) alone.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
|
Full site validation: no new warnings and no regressions. The one behavioural change is the intended one:
|
The fourth step of the site builds in Matt's order of 2026-11-22 (intro, advanced, then the GPU sites: programming, intermediate and jax): intermediate builds from the pool on the GPU leg, in the base environment, as programming does since #87. ## What changes - **`sites/intermediate/site.yml`** gains `environment: base`. On the GPU leg that means `_base/environment.yml` is created on the RunsOn machine, `_base/environment-update.yml` is applied, and `jax[cuda13]` is added at the list's jax version. - **`site-build.yml`**: `SITES` gains `intermediate`, and the header and the GPU leg's notes name it. jax is the one site left. - **The job's time limit.** `tools/site-matrix` gives each leg `cell_timeout` plus an allowance for a build from an empty cache. intermediate's own builds from an empty cache took 128 to 139 minutes in November 2026 (twelve `cache.yml` runs), so the old allowance of 120 minutes would have left intermediate a limit of 160, about 20 minutes above its slowest build. The allowance is now 150 minutes, so intermediate's limit is 190 minutes. The limit is only a ceiling: it changes no key and no build, and costs time only on a hung job. The tests follow. - **The docs**: `README.md`, `sites/README.md`, `_base/README.md` and the list's header name the five sites built. ## Checks before this pull request - **The machine image.** The AMI in `tools/site-matrix`, `ami-0edec81935264b6d3`, is the one the three GPU series' `.github/runs-on.yml` name: QuantEcon/lecture-python.myst, QuantEcon/lecture-jax and QuantEcon/lecture-python-programming, read 2026-11-26. intermediate's own fresh builds today ran on it. - **The text.** By the ledger, intermediate is the canonical source of 156 of the 157 pool lectures its table of contents lists. The other, `pandas_panel` (canonical in programming), has the same text as intermediate's copy. So the site's lecture text is intermediate's own at its pin, `eb06599`. - **The installs.** `tools/pool-check --installs` lists no install that would replace a pin. The `--upgrade jax` in `kesten_processes` was removed upstream (QuantEcon/lecture-python.myst#1135). - **The cache.** The list's header edit is a comment. Since #98 the base key hashes only the list's entries, so intro, advanced and programming should restore their caches; this is the first test of that. ## Validation (to follow, in a comment) This pull request's intermediate leg builds from an empty cache, about 2.5 hours on the T4. It will be compared page by page with intermediate's own fresh builds of `eb06599` from today: [QuantEcon/lecture-python.myst 45766690882](https://github.com/QuantEcon/lecture-python.myst/actions/runs/45766690882), and a second for the noise baseline, [QuantEcon/lecture-python.myst 45804060322](https://github.com/QuantEcon/lecture-python.myst/actions/runs/45804060322). The comparison covers log warnings, cell-output warnings and errors, in-cell installs and every page with its figures. It adds a per-page GPU check: every lecture that uses jax ran it on the GPU, as in intermediate's own builds, with no fallback to the CPU. Copilot: not requested (Matt, 2026-11-22). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
What
The fourth of six pull requests, one per series, that bring the lecture series to one up-to-date baseline: the environment the QuantEcon lecture monorepo's sites are to build in,
_base/environment-update.ymlin QuantEcon/lectures. The others are QuantEcon/lecture-python-intro#872, QuantEcon/lecture-python-programming#663 and QuantEcon/lecture-python-programming#665, and QuantEcon/lecture-jax#374.environment.ymlcache.yml,ci.yml,publish.ymlpip install -U "jax[cuda13]"becomespip install "jax[cuda13]==0.12.1", the baseline's jax, as programming and jax now pin itak2,kesten_processes,likelihood_ratio_process,opt_transport(two lines),pandas_panel,robust_permanent_income--upgradedropped from the install lines (quantecon, yfinance, POT, seaborn)back_prop!pip install -U kaleido plotlybecomes!pip install "kaleido>=1" "plotly>=6.1"(version floors in place of-U; see below), and the!conda install -y -c plotly plotly-orcaline is removed, together with the note below the cell that warned the cell fails on Colab. The skip-execution cell's!pip install --upgrade jaxbecomes!pip install jax.Why the install lines change
In a build every lecture runs in one environment, so an
--upgradeline replaces the version the environment pins, for every lecture executed after it. Without--upgrade, the line installs the package where it is missing and leaves it alone where it is there. orca is plotly's retired image exporter: kaleido, which the cell installs and gives a Chrome, makes the images. The conda install also replaced the pinned plotly.For the reviewer, two content points:
!conda install. With that line gone, the note no longer describes anything.!pip install --upgrade jaxis in askip-executioncell, so no build runs it. On 2026-11-17 the owner chose to leave it alone. The later decision to remove--upgradefrom every install line upstream covers it, and the monorepo's scan built the pool with it stripped, so this PR removes it too. Say if you'd rather keep it.back_prop's floors. kaleido 1.x needs plotly 6.1 or later, the first release that supports it. Colab preinstalls plotly 5.24.1, so a plain
!pip install kaleido plotlyleft that plotly in place and the image export failed on Colab: the Colab check caught it. With"plotly>=6.1", pip upgrades plotly only where it is older, as on Colab, and leaves a build's plotly alone. In this series' own build plotly now stays at Anaconda 2026.07's 6.7.0, the baseline's version; until now-Uupgraded it to the newest, 7.1.0, for every lecture executed afterback_prop. quantecon, yfinance, POT and kaleido aren't in Anaconda, so their lines still install the newest.Validation
By the owner's rule for any software upgrade on a series, this merges only after a full validation of the site: fresh builds of main and of this branch with every lecture executed, compared for new warnings (DeprecationWarning, FutureWarning, Sphinx), changed cell outputs and rendering regressions page by page, plus the Colab path. Main installs the newest jax, which is 0.12.1 today, so jax is the same on both sides. The evidence follows in a comment.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL