Skip to content

Make main build again: install JAX in the environment, finish ak_aiyagari's household rename, add the programming intersphinx key - #297

Merged
mmcky merged 3 commits into
mainfrom
fix/ak-aiyagari-household-rename
Oct 18, 2026
Merged

mmcky merged 3 commits into
mainfrom
fix/ak-aiyagari-household-rename

Conversation

@mmcky

@mmcky mmcky commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Three repairs for defects that today's sync merges put onto main. All were visible in the merged PRs' own preview logs, but the preview reports build succeeded on notebook execution errors (#271), so they passed.

1. ak_aiyagari and two_computation do not execute: no JAX in CI

Every other JAX lecture in this edition installs JAX at run time through a !pip install … jax cell tagged hide-output, which executes. These two lectures carry that cell tagged skip-execution, exactly as the English does, because the English runner preinstalls jax[cuda13] in ci.yml and cache.yml. This edition's CI preinstalls nothing, so import jax raised ModuleNotFoundError in both. Confirmed by executing two_computation's 81 code cells locally with jax 0.11.0: every cell runs and the printed tables match the English.

environment.yml now installs jax==0.11.0, the pin the programming editions use for the lax.fori_loop regression in 0.11.1 (QuantEcon/workspace-lectures#49). The unpinned !pip install jax cells elsewhere then find it satisfied and leave it alone.

2. ak_aiyagari's hh → household rename was never delivered

myst#706 (2026-08-05) renamed the household parameter. Its sync run failed before it could file anything — the anthropic-api-key input was missing that night — so the rename never reached this edition. #290 (merged today) then synced myst#1078's cells, which use household, on top of the old code: nine code lines in six cells still said hh. This commit brings them into line with the English; the lecture's code now has the same 56 hh occurrences and call sites as the source, and the remaining household differences are in translated prose.

3. linear_algebra has four unresolved cross-references

#280 synced myst#1054, which added four targets under the programming: intersphinx key the English _config.yml defines. This edition only had pyprog:, so Sphinx reported four unknown-document warnings, and -W makes those fatal. The key is added, pointing at the zh-cn programming edition, which carries all three labels.

Not in this PR (needs the workflow token scope)

ci.yml's HTML-step upload looks in _build/html/reports while myst-nb writes execution tracebacks to _build/jupyter/reports, so today's failures left no report to download. A one-line patch is with @mmcky. The blind -W gate itself is #271.

🤖 Generated with Claude Code

mmcky and others added 2 commits October 18, 2026 18:26
…26-08-05 sync never delivered

myst#706 renamed the household parameter from hh to household on
2026-08-05. Its sync run failed before it could file anything (the
anthropic-api-key input was missing that night), so the rename never
reached this edition. Today's #290 then synced myst#1078's cells, which
use the new name, on top of the old one, and the lecture stopped
executing. This brings the nine remaining code lines into line with the
English; the lecture's code now has the same 56 hh and the same call
sites as the source.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… edition

linear_algebra (#280, synced from myst#1054) now carries four
{doc}/{ref} targets under the programming: key the English config
defines. This edition only had pyprog:, so the build reported four
unknown-document warnings, which -W turns into a failure. The zh-cn
programming site carries the three labels (numpy_array, numpy_shape_dim,
creating_arrays), so the key points there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 18, 2026 07:26
@netlify

netlify Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit ffa45ad
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6ad4764d72dc4618c42e4287
😎 Deploy Preview https://deploy-preview-297--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Both fixes are minimal and were verified correct — the function-body rename matches the namedtuple source and leaves only valid global hh references, and the new intersphinx key resolves all four targets confirmed to exist in the linked zh-cn programming edition.

No open issues 🎉

What changed in this PR

This PR repairs two defects that recent automated translation-sync merges introduced onto main, both of which break the -W-gated Jupyter Book build. It restores a successful build without changing any lecture content semantics.

Changes:

  • Finishes the hh → household household-parameter rename in ak_aiyagari.md (nine lines across several @jax.jit functions) so execution no longer raises NameError, matching the English source.
  • Adds the programming: intersphinx mapping (pointing at the zh-cn programming edition) in _config.yml so the four programming:* cross-references in linear_algebra.md resolve instead of becoming fatal -W warnings.
File Description
lectures/​ak_aiyagari.md Replaces stale global hh.* references with the local household parameter inside the affected JIT functions, fixing the execution-time NameError.
lectures/​_config.yml Adds the programming: intersphinx key mapping to the zh-cn programming edition to resolve four unknown-document cross-references.

Review effort: Balanced

…stall cell

Every other JAX lecture in this edition installs JAX at run time through a
!pip install cell that executes. ak_aiyagari and two_computation carry
that cell tagged skip-execution, as the English does, because the English
runner preinstalls jax[cuda13]. This CI preinstalled nothing, so both
lectures failed on import jax. Pinned at 0.11.0 for the lax.fori_loop
regression in 0.11.1 (QuantEcon/workspace-lectures#49); the unpinned
install cells then leave it in place.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mmcky mmcky changed the title Make main build again: finish ak_aiyagari's household rename, add the programming intersphinx key Make main build again: install JAX in the environment, finish ak_aiyagari's household rename, add the programming intersphinx key Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
pull request — ffa45ad0 Deployed Oct 18, 2026 by github-actions[bot]
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