Skip to content

[kesten_processes] Install jax without --upgrade - #1131

Merged
mmcky merged 1 commit into
mainfrom
kesten-jax-pin
Nov 17, 2026
Merged

mmcky merged 1 commit into
mainfrom
kesten-jax-pin

Conversation

@mmcky

@mmcky mmcky commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

A one-line change to how this lecture installs jax: !pip install --upgrade quantecon yfinance jax becomes !pip install --upgrade quantecon yfinance and !pip install jax.

Why. --upgrade makes the lecture move jax to the newest release whenever it runs, replacing whatever jax the build environment installed:

  • On the GPU machines, that can separate jax from its matching CUDA plugin.
  • jax 0.11.1 hangs a lecture in lecture-python-programming, which is why that series pins jax[cuda13]==0.11.0 (QuantEcon/workspace-lectures#49).

A plain pip install jax still installs jax for a reader who doesn't have it, and leaves an installed jax alone. quantecon and yfinance keep --upgrade.

Context. The monorepo's sites will share one build environment with jax pinned at 0.11.0 (QuantEcon/project-monorepo#77). This lecture's line is the only --upgrade jax that runs in a build: back_prop's is tagged skip-execution, and is left alone.

This changes lecture source, so it needs a person's review before merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMXuHMiWb8victibwcU

`!pip install --upgrade quantecon yfinance jax` upgrades jax to the newest
release when the lecture runs, which replaces whatever jax the build
environment installed. On the GPU machines that can separate jax from its
CUDA plugin, and jax 0.11.1 hangs a lecture in lecture-python-programming
(QuantEcon/workspace-lectures#49), which is why that series pins 0.11.0.
A plain `pip install jax` installs jax for a reader who lacks it and leaves
an installed one alone. quantecon and yfinance keep --upgrade.

Context: QuantEcon/project-monorepo#77 (one build environment for the
monorepo's sites, with jax pinned).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMXuHMiWb8victibwcU
Copilot AI balanced review requested due to automatic review settings November 17, 2026 05:02

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

The change modifies runtime package installation during notebook execution in a way that may impact pinned JAX/JAXLIB and CPU/GPU plugin compatibility across CI/build environments, so it requires a representative environment validation before it can be safely approved.

No open issues 🎉

What changed in this PR

Adjusts the kesten_processes lecture setup to avoid force-upgrading JAX during execution, reducing the risk of JAX/CUDA plugin mismatches while still ensuring JAX is available when needed.

Changes:

  • Split pip install --upgrade quantecon yfinance jax into pip install --upgrade quantecon yfinance plus a separate pip install jax.
File Description
lectures/​kesten_processes.md Updates the dependency-install cell to stop upgrading JAX while still installing it if it is not already present.

Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

@github-actions

Copy link
Copy Markdown

@mmcky
mmcky merged commit f3d1a4a into main Nov 17, 2026
3 checks passed
@mmcky
mmcky deleted the kesten-jax-pin branch November 17, 2026 06:03
@mmcky

mmcky commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-python.zh-cn
Translation PR: QuantEcon/lecture-python.zh-cn#323
Files synced (1):

  • lectures/kesten_processes.md

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