Skip to content

environment: plotly-orca leaves the list; key the base cache on its entries; dp publishes notebooks - #98

Merged
mmcky merged 1 commit into
mainfrom
environment/no-plotly-orca
Nov 26, 2026
Merged

mmcky merged 1 commit into
mainfrom
environment/no-plotly-orca

Conversation

@mmcky

@mmcky mmcky commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Three changes to the one environment and its records, in one pull request as the infrastructure organiser's review of #85 proposed (2026-11-22), so the three base sites build from an empty cache once, not twice.

What changes

  • plotly-orca leaves _base/environment-update.yml. It was listed for the three !conda install … plotly-orca lines in the series' lectures, which were removed upstream by 2026-11-20 with the other install lines that replaced a pin. No pool lecture installs or uses it now: no lecture in lectures/ or in any series' lectures/ at its pin mentions orca, and tools/pool-check --installs lists no install that would replace a pin. The list's header now says those lines were removed (it said they "are being removed"), names the three sites built with it (intro, advanced, programming) and says the GPU leg creates its base from _base/environment.yml.
  • A base site's cache key hashes the list's entries, not its comments. In site-build.yml, the env hash of a base site is the sha256 of _base/environment-update.yml's lines with comments (a # at the start of a line or after a space) and blank lines removed, and the GPU leg's image hash takes _base/environment.yml's entries the same way. So an edit to a comment no longer executes every page of intro, advanced and programming again. A series site (dp) keeps hashFiles of its environment.yml, whole, as dp's own cache keys hash it, so dp's key is unchanged. The comments in the workflow, sites/README.md and _base/README.md say so.
  • dp publishes notebooks. Since Offer each lecture's notebook for download lecture-dp#87, dp's publish.yml builds the notebooks as well as HTML (no PDF), so sites/dp/site.yml now has publishes: [html, notebooks], and sites/README.md's table and notes follow. Nothing reads publishes yet: every leg still builds HTML alone, so the pool's dp build has no "Download Notebook" button until the site build makes notebooks (the last section of Offer each lecture's notebook for download, as the other series do lecture-dp#86), which dp's shadow comparison will show.

What the entries filter does, checked locally

Input Result
main's list against this branch's the entries differ in one line, - plotly::plotly-orca==1.3.1
this branch's list against a copy with one comment reworded the same hash
_base/environment.yml, main against this branch the same entries (only its comment changed)

Local runs on this branch: tools/pool-check clean (the list has 39 packages; the pool's lectures install 29 of them), the tool tests 330 passed and 1 skipped, and tools/site-matrix gives dp publishes: ["html", "notebooks"] with its series key inputs unchanged.

What to expect from this pull request's builds

The list's entries change, so intro, advanced and programming find no cache under their new keys and execute every page in the environment without plotly-orca: that is this change's test. dp's key is unchanged, so it restores main's cache. After the merge, main's push builds the three again from an empty cache and saves, and later runs restore.

Copilot: not requested (Matt, 2026-11-22).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG

…ntries

- _base/environment-update.yml: drop plotly::plotly-orca==1.3.1. The three
  `!conda install ... plotly-orca` lines it was there for were removed
  upstream by 2026-11-20, and no pool lecture installs or uses it. The
  header's note on install lines now says they were removed, and names the
  three sites built with the list and the GPU leg's base.
- site-build.yml: a base site's env hash is of the list's entries, its
  lines without comments or blank lines, and the GPU leg's image hash takes
  _base/environment.yml's entries the same way, so editing a comment no
  longer starts an empty cache. A series site keeps hashFiles of its
  environment.yml, whole, as dp's own cache keys hash it, so dp's key is
  unchanged.
- sites/dp/site.yml and sites/README.md: dp publishes notebooks as well as
  HTML since QuantEcon/lecture-dp#87 (no PDF).
- _base/README.md, _base/environment.yml, sites/README.md: the same, in
  their words.

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

The builds, compared with main's last run

This pull request's site-build, 45755577775 at d461d3f, against main's last, 45717630306 at 2763c9f (2026-11-25), from each leg's execution-status-<key> artefact and log:

Site Cache on this pull request Pages ok Executed / cached pip list against main's
intro none under jb1-intro-base-6753e4752d97fd21-none-4eb4093c8b6c5386- 56 of 56 54 / 2 identical
advanced none under jb1-advanced-base-6753e4752d97fd21-none-4eb4093c8b6c5386- 80 of 80 77 / 3 identical
programming none under jb1-programming-base-6753e4752d97fd21-none-862009f2954b7592- 27 of 27 26 / 1 identical
dp restored main's, same prefix as main's (jb1-dp-3fb23c45…-72345e06ed6fe285-8964b6a39c808ffc-) 53 of 53 0 / 53 identical
  • The three base sites built from an empty cache, as expected, and every page passed under the strict build. The pages counted as cached on those legs are the ones with no code cell (troubleshooting and zreferences on all three sites, and advanced's intro), which jupyter-cache never executes.
  • plotly-orca is gone from the environment: main's intro and advanced legs downloaded plotly-orca-1.3.1 (56.6 MB) in "Apply the environment list", and programming's lists plotly-orca-1.3.1 among the packages in its conda package folder (conda_pkgs_dir); no leg of this run mentions it. It is a conda package with no Python distribution, so pip list is identical with and without it.
  • The keys: the base sites' env hash is the new entries hash (6753e4752d97fd21, against 19d740f8… from hashFiles on main). Programming's image hash also changed, from a76901abbf85e742 to 862009f2954b7592: the same machine image (AMI), now hashed with _base/environment.yml's entries. dp's key inputs are unchanged, so it took every page from main's cache.
  • Job times: advanced 45 minutes, intro 14, programming 8, dp 2. After the merge, main's push builds the three base sites from an empty cache once more and saves.

@mmcky
mmcky merged commit 0d1f301 into main Nov 26, 2026
7 checks passed
@mmcky
mmcky deleted the environment/no-plotly-orca branch November 26, 2026 05:24
mmcky added a commit that referenced this pull request Nov 26, 2026
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
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