Skip to content

site-build: intermediate joins the base environment on the GPU leg - #99

Merged
mmcky merged 2 commits into
mainfrom
site-build/intermediate
Nov 26, 2026
Merged

mmcky merged 2 commits into
mainfrom
site-build/intermediate

Conversation

@mmcky

@mmcky mmcky commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

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 (Raise the build stack to the shared baseline, pin jax 0.12.1, drop --upgrade from install lines lecture-python.myst#1135).
  • The cache. The list's header edit is a comment. Since environment: plotly-orca leaves the list; key the base cache on its entries; dp publishes notebooks #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, and a second for the noise baseline, QuantEcon/lecture-python.myst 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.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG

mmcky and others added 2 commits November 26, 2026 21:46
- sites/intermediate/site.yml: environment: base, as programming's.
- site-build.yml: SITES gains intermediate; the header and the GPU leg's
  notes name it, and the GPU leg's AMI is the one the three GPU series'
  .github/runs-on.yml name (all three checked 2026-11-26).
- tools/site-matrix: BUILD_ALLOWANCE 150 minutes (was 120). intermediate's
  own builds from an empty cache took 128 to 139 minutes in November 2026,
  so its limit is 40 + 150 = 190 minutes; the tests follow.
- README.md, sites/README.md, _base/README.md and the list's header: the
  five sites built, intermediate among the base sites; jax is the last.

The list's header edit is a comment, so the base sites' cache key is
unchanged and intro, advanced and programming restore their caches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
@mmcky

mmcky commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation: intermediate built from the pool on the GPU leg, against intermediate's own builds

The builds compared. All three are of intermediate's lectures at eb06599, the pool's pin and intermediate's main.

Build Run What
This pull request at bfb6f86 (main 78f1eda merged in), intermediate leg 45815408131 from the pool on the RunsOn T4, base environment, strict (-n -W), cold, with the notebooks (#104); 2 h 13 min against the leg's new limit of 190 min
intermediate's own, fresh QuantEcon/lecture-python.myst 45766690882 cache.yml on main, 2026-11-26
intermediate's own, fresh again QuantEcon/lecture-python.myst 45804060322 the same, hours later, for the noise baseline

The first push's run was cancelled when main was merged in: the merged head adds the notebook build, so the leg ran again on it.

  • The build: all 161 pages ok; 159 executed and 2 from the cache (pages with no code cell). The report counts them although the notebooks were built after the HTML, which shows site-build: build the notebooks of a site that publishes them, and serve them at _notebooks/ #104's ordering keeps the cache save working on a cold build. 161 notebooks were copied into _notebooks/. No Sphinx warning.
  • The GPU, page by page. No page of any of the three builds has jax's CPU-fallback warning or a CUDA error, and each status page reports a Tesla T4. The 34 pages that import jax took 0.83 to 1.06 times as long as in intermediate's own builds; kesten_processes is the fastest relative, because its install cell finds its packages already installed. A page that fell back to the CPU would take several times as long.
  • The other legs restored main's caches and executed nothing: dp, intro, advanced and programming.
  • The noise baseline: intermediate's own two builds differ on 36 of 176 pages, all in their outputs, with identical log warnings.

The pages: 143 of 176 differ from intermediate's own build. Every difference is explained:

Pages What differs
101 only the generated ids of citation links (zreferences.html#id241 against #id20): the pool builds with its merged bibliography, so the anchors number differently. Nothing a reader sees
35 output noise; every one is among the 36 pages intermediate's own two builds differ on (unseeded draws, sampling, timings, progress bars, a memory address)
aiyagari, house_auction, back_prop the output of an install cell. The pool's environment already holds quantecon, prettytable and kaleido, so pip prints "Requirement already satisfied" where intermediate's own build downloads them; programming showed the same (#87)
hoist_failure a speed-up, 26x against 25x
linear_algebra, linear_models one link each to a PDF the lecture offers. Intermediate's points at its live site's _static/; the pool's at the site's own _downloads/, the copy promotion keeps beside the lecture. Same file, served by the site itself
zreferences the merged bibliography, below

Cell outputs: the warnings and errors are the same on both sides, page by page, except ar1_bayes' "RuntimeWarning: overflow encountered in dot". It appears in one of intermediate's own two builds and not the other, so it's sampling noise.

The references page. 593 entries on both sides, of which 21 render differently, all from the pool's merged bibliography, which every pool site shares:

  • 18 lose their month (for example "Econometrica, 58(5):1041–1063, September 1990" against "…, 1990");
  • three lose an empty doi:., two of them as well as a month;
  • one page range loses its spaces ("1 – 68" becomes "1–68");
  • one title is capitalised by a pool ruling (hansen1995discounted: "Gaussian control", "Automatic Control").

All four kinds are the house style the merge applies on purpose (tools/bib-merge's normalising: month and empty fields dropped, page ranges and DOIs normalised, after QuantEcon's manual, "Writing a bibliography entry"); intermediate's own .bib still carries months. None comes from this pull request. (Corrected minutes after posting: the first version called these something to follow up.)

Conclusion. intermediate builds from the pool on the GPU leg, strict, in the base environment, with every page ok and every jax page on the GPU. The site matches intermediate's own build except for the merged bibliography's citations, the pool's environment, and noise of the kinds intermediate's own builds show between runs.

Corrected 2026-11-27: this said 29 pages import jax. The check matched import jax in each page's raw HTML, where code highlighting splits it across tags, so it missed five. Matched on the page text instead, the count is 34, and the range, the fallback check and the GPU are unchanged.

@mmcky
mmcky merged commit fb579c7 into main Nov 26, 2026
11 checks passed
@mmcky
mmcky deleted the site-build/intermediate branch November 26, 2026 21:55
mmcky added a commit that referenced this pull request Nov 27, 2026
The last step of the site builds in Matt's order of 2026-11-22 (intro, advanced, then the GPU sites: programming, intermediate and jax): jax builds from the pool on the GPU leg, in the base environment, as programming (#87) and intermediate (#99) do. With it, `site-build.yml` builds all six sites.

## What changes

- **`sites/jax/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 (0.12.1, the version jax's own workflows pin). Its other fields, re-read at lecture-jax `3431f12` (the pin) on 2026-11-27, are unchanged.
- **`site-build.yml`**: `SITES` gains `jax`, and the header and the GPU leg's notes name it.
- **The time limit** needs no change: jax's `cell_timeout` is 2400 seconds, so its limit is 40 + 150 = 190 minutes, against its own builds from an empty cache of 20 to 23 minutes (the ten `cache.yml` runs in November 2026 before this pull request; an earlier version of this description said eight).
- **The docs.** With jax in, the base sites are every site but dp, so `README.md`, `sites/README.md`, `_base/README.md` and the list's header say that, instead of listing the sites in each place. intermediate's build times now stay in `tools/site-matrix` alone, with jax's added beside them; `sites/README.md` points there.
- **The organiser's nits on #99**, in the lines this edits anyway: the list's header names #99 and this pull request; the stray `names, with` line in `site-build.yml`'s notes is rewrapped; and `tools/site-matrix`'s AMI note says when it was last read.

## Checks before this pull request

- **The machine image.** The AMI in `tools/site-matrix`, `ami-0edec81935264b6d3`, is still the one the three GPU series' `.github/runs-on.yml` name (QuantEcon/lecture-jax, QuantEcon/lecture-python.myst and QuantEcon/lecture-python-programming), read 2026-11-27.
- **The text.** By the ledger, jax is the canonical source of 27 of the 28 pool lectures its table of contents lists. The other, `autodiff` (canonical in programming), has the same digest as jax's copy. So the site's lecture text is jax's own at its pin, `3431f12`, which is lecture-jax's main.
- **The installs.** `tools/pool-check --installs` lists no install that would replace a pin. jax's lectures install `quantecon`, `keras`, `optax` and `jax` in their cells, and all four are in the list. In jax's own builds those cells fetch the newest releases, so a version difference shows up in the comparison, not as a failure.
- **The cache.** The list's header edit is a comment. Since #98 the base key hashes only the list's entries, so the other base sites restore their caches, as on #99.
- Locally: tests 330 passed and 1 skipped; pool-check clean; `tools/site-matrix` gives jax the GPU leg, the base environment and 190 minutes; actionlint clean.

## Validation (to follow, in a comment)

This pull request's jax leg builds from an empty cache. It will be compared page by page with two fresh builds of jax's own site at `3431f12`, dispatched today: [QuantEcon/lecture-jax 45901655935](https://github.com/QuantEcon/lecture-jax/actions/runs/45901655935), and a second for the noise baseline, [QuantEcon/lecture-jax 45901668136](https://github.com/QuantEcon/lecture-jax/actions/runs/45901668136). 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 jax'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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant