Skip to content

Raise the build stack to the shared baseline, pin jax 0.12.1, drop --upgrade from install lines - #1135

Open
mmcky wants to merge 2 commits into
mainfrom
env-baseline
Open

mmcky wants to merge 2 commits into
mainfrom
env-baseline

Conversation

@mmcky

@mmcky mmcky commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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.yml in 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.

File Change
environment.yml quantecon-book-theme 0.22.1 to 0.22.2, sphinx-proof 0.4.0 to 0.4.1. These are the baseline's versions; the rest of the build stack is already at them.
cache.yml, ci.yml, publish.yml pip install -U "jax[cuda13]" becomes pip install "jax[cuda13]==0.12.1", the baseline's jax, as programming and jax now pin it
ak2, kesten_processes, likelihood_ratio_process, opt_transport (two lines), pandas_panel, robust_permanent_income --upgrade dropped from the install lines (quantecon, yfinance, POT, seaborn)
back_prop !pip install -U kaleido plotly becomes !pip install "kaleido>=1" "plotly>=6.1" (version floors in place of -U; see below), and the !conda install -y -c plotly plotly-orca line is removed, together with the note below the cell that warned the cell fails on Colab. The skip-execution cell's !pip install --upgrade jax becomes !pip install jax.

Why the install lines change

In a build every lecture runs in one environment, so an --upgrade line 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:

  • back_prop's note is removed with the conda line. The note said the cell presents an error on Colab "because Google Colab doesn't use Anaconda"; the error came from !conda install. With that line gone, the note no longer describes anything.
  • back_prop's !pip install --upgrade jax is in a skip-execution cell, so no build runs it. On 2026-11-17 the owner chose to leave it alone. The later decision to remove --upgrade from 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 plotly left 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 -U upgraded it to the newest, 7.1.0, for every lecture executed after back_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

…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
Copilot AI balanced review requested due to automatic review settings November 19, 2026 08:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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-theme to 0.22.2 and sphinx-proof to 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

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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
@mmcky

mmcky commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Full site validation: no new warnings and no regressions. The one behavioural change is the intended one: back_prop no longer upgrades plotly partway through the build.

  • Fresh builds with no cache, every lecture executed (158 notebooks each, GPU), both green and both on jax 0.12.1:

    • main at eb2ba52 (run 44490428303) installed the newest jax, which is 0.12.1 today, with quantecon-book-theme 0.22.1 and sphinx-proof 0.4.0;
    • this PR at bd60ac6 (run 44490432797) installed the pinned jax[cuda13]==0.12.1, with theme 0.22.2 and sphinx-proof 0.4.1.

    Each took about 2 h 8 min.

  • Logs: neither build's Build HTML step logs a warning: no DeprecationWarning, FutureWarning or Sphinx warning. The only warning lines are conda's setup notices, the same on both sides.

  • Cell outputs: the warnings and errors in cell outputs are the same on both sides: newton_method's deliberate exception and bayes_nonconj's numpyro out-of-support UserWarning.

  • back_prop:

    • On main, !pip install -U kaleido plotly upgrades plotly from Anaconda's 6.7.0 to 7.1.0 partway through the build, for every lecture executed after it. On this branch, plotly stays at 6.7.0, the baseline's version.
    • kaleido is 1.5.2 on both sides, since it isn't in Anaconda.
    • The page's three figures are byte-identical on both sides. It has one admonition fewer, the removed Colab note.
  • Page by page (173 pages): every page has the same counts of exercises, solutions, admonitions (apart from back_prop's note), figures, tables, math and cell outputs on both sides.

    • The pages whose outputs differ all differ between two earlier builds of main as well (9 and 16 November, both on jax 0.12.0.1; run 42555320261 and run 43797025562).
    • The differences are timings, download bars, object ids, MCMC summaries (ar1_bayes) and simulated statistics (such as odu and stats_examples). These vary from build to build on the same jax.
    • The figures in the other changed lectures are byte-identical: ak2, kesten_processes, opt_transport and pandas_panel.
    • The install cells give the same output with or without --upgrade, since their packages are either already at the newest release or missing and so installed new.
  • Theme 0.22.1 to 0.22.2, as its changelog describes: rel="noopener" on links that open a new tab, the contrast button's tooltip "Toggle dark mode" (on all 161 lecture pages), and new digests on the theme's CSS and JS.

  • Colab path: this series' Colab check, run on this branch, executes the changed lectures in Colab's own runtime image with strict -W.

    • Its first run (run 44513468216) failed on back_prop. Colab preinstalls plotly 5.24.1, and a plain !pip install kaleido plotly left it in place next to kaleido 1.5.2, which plotly 5.x can't use ("Image export using the kaleido engine requires the kaleido package").
    • plotly 6.1.0 is the first release that supports kaleido 1.x, so 9548730 makes the line !pip install "kaleido>=1" "plotly>=6.1". pip then upgrades plotly only where it is older than 6.1, as on Colab.
    • The re-run (run 44516454104) executed all seven changed lectures, back_prop included, and succeeded.
    • This PR's preview at 9548730 (run 44516461974) re-executed the same seven on the series' GPU build, green. There, plotly 6.7.0 satisfies the floor, so the full builds above, at bd60ac6, stand for the series' build.

This branch has not been deployed

No deployments
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