Repository navigation
[kesten_processes] Install jax without --upgrade - #1131
Conversation
`!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
There was a problem hiding this comment.
🔵 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 jaxintopip install --upgrade quantecon yfinanceplus a separatepip 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.
📖 Netlify Preview Ready!Preview URL: https://pr-1131--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python.zh-cn
|
A one-line change to how this lecture installs jax:
!pip install --upgrade quantecon yfinance jaxbecomes!pip install --upgrade quantecon yfinanceand!pip install jax.Why.
--upgrademakes the lecture move jax to the newest release whenever it runs, replacing whatever jax the build environment installed:jax[cuda13]==0.11.0(QuantEcon/workspace-lectures#49).A plain
pip install jaxstill installs jax for a reader who doesn't have it, and leaves an installed jax alone.quanteconandyfinancekeep--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 jaxthat runs in a build:back_prop's is taggedskip-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