Skip to content

lecture-python.myst's JAX lectures on the M5 Pro - #15

Merged
mmcky merged 1 commit into
mainfrom
lecture-python-m5pro
Oct 26, 2026
Merged

mmcky merged 1 commit into
mainfrom
lecture-python-m5pro

Conversation

@mmcky

@mmcky mmcky commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

The second part of #4 begins: the 33 lectures in lecture-python.myst at 087518ec0 that import JAX, as written, three runs each on qe-wharton2's M5 Pro. They're listed in lectures/whole/lectures-python.txt, and the results are in lectures/results/qe-wharton2/2026-10-26/lecture-python/.

M5 Pro
All 33, median of three runs 1,463 s
The heaviest imp_sample 783 s, ifp_advanced 161 s, sargent_surico 158 s, aiyagari_egm 61 s, ak_aiyagari 45 s
Under 5 s 15 lectures
  • All 99 runs finished without an unexpected error.
  • sargent_surico, the NumPyro lecture behind jax on the GPU runner is >2.7x slower than its CPU for a small float64 model (sargent_surico NUTS cell) lecture-python.myst#1022, takes 158 s here. That matches the 157 s on a laptop CPU reported there, against over 2,400 s on the T4.
  • The environment is lecture-jax's exact packages plus what these lectures install: NumPyro 0.22.0, ArviZ 1.3.0, PyMC 6.3.2, pandas-datareader, yfinance, plotly with kaleido, seaborn, scikit-learn, xarray and myst-nb. Some lectures download their data as they run, and that time counts.
  • The other platforms are still to run: the M6, the TITAN RTX and the Threadripper, and the T4 through the workflow job.

Privacy: state.txt is redacted as for the M5 Pro's lecture-jax run (#13): the console user's name and the managed software's names are replaced. Home paths in outputs are shortened to ~/. Otherwise the scan found no paths, addresses or credentials, and every .err file was empty.

The dashboard's lectures page shows these under a lecture-series switch once QuantEcon/project-benchmarks-jax#16 is merged.

🤖 Generated with Claude Code

The 33 lectures in lecture-python.myst at 087518ec0 that import JAX,
sargent_surico among them, as written, three times each on qe-wharton2's
CPU, with lecture-jax's packages plus what these lectures install. All
99 runs finished cleanly: 1,463 s for the set. state.txt is redacted as
for the lecture-jax run, and home paths in outputs are shortened to ~/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 26, 2026 03:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

It is a low-risk data-and-documentation recording with no code-logic changes, and every verifiable README claim matches the committed JSON exactly.

No open issues 🎉

What changed in this PR

This PR continues the second part of #4 by recording the whole-lecture benchmark run of the 33 JAX-importing lectures from lecture-python.myst (at 087518ec0), each run three times on qe-wharton2's Apple M5 Pro CPU. It fits into the existing lectures/whole/ benchmarking effort: committed per-cell timing JSON under lectures/results/, with a new results narrative added to the whole-lecture README. No production/library code is changed.

Changes:

  • Adds 99 result JSON files (33 lectures × 3 runs) plus the run driver run.sh (and environment/state/log records) under lectures/results/qe-wharton2/2026-10-26/lecture-python/.
  • Adds lectures/whole/lectures-python.txt listing the 33 benchmarked lectures.
  • Adds a "lecture-python.myst, on the M5 Pro" section to lectures/whole/README.md (and updates the "still to come" line and the run-command block).
File Description
lectures/​whole/​README.md New M5 Pro results section; headline numbers (total 1,463 s, under-5s=15, heaviest list) verified exactly against the JSON.
lectures/​whole/​lectures-python.txt 33 unique lecture names; matches the 33 committed result directories.
lectures/​results/​.../​lecture-python/​run.sh One-off macOS driver that records machine state and invokes lectures_set.sh; consistent with existing conventions.
lectures/​results/​.../​lecture-python/​*/​cpu-as-written-*.json Per-cell timing records; internally consistent, all 99 runs all_ok, home paths redacted to ~/.

I verified the data against the documentation: the sum of per-lecture medians is 1463.3 s (README "1,463 s"), exactly 15 lectures are under 5 s, and the heaviest list (imp_sample 783, ifp_advanced 161, sargent_surico 158, aiyagari_egm 61, ak_aiyagari 45) all match. Privacy redaction holds (no /Users/ or /home/ leaks). No objective issues were found.

Review effort: Balanced

@mmcky
mmcky merged commit 9585769 into main Oct 26, 2026
1 check passed
@mmcky
mmcky deleted the lecture-python-m5pro branch October 26, 2026 08:18
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.

2 participants