Skip to content

[autodiff] Take programming's text, so both series publish one lecture - #357

Merged
mmcky merged 1 commit into
mainfrom
merge/autodiff-one-text
Oct 12, 2026
Merged

mmcky merged 1 commit into
mainfrom
merge/autodiff-one-text

Conversation

@mmcky

@mmcky mmcky commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Makes autodiff one lecture that programming and JAX both publish: this copy becomes programming's text. QuantEcon/lecture-python-programming#644 changes the one sentence that differs there. John and Matt decided this on 2026-10-12 (QuantEcon/project-monorepo#111).

Why. Programming's copy is John's April 2026 adaptation of this lecture (QuantEcon/lecture-python-programming#513), and its corrections never reached this copy. From now on a change is made once and reaches both series.

What changes for readers of this series.

  • Corrections: "causes" → "cause", "evalute" → "evaluate", "evaluates" → "evaluate", "my minimizing" → "by minimizing", "auto diff" → "autodiff", and the notation in the $f(x) = \exp(2x)$ example.
  • The regression example splits the random key into x_key and ϵ_key before drawing, rather than drawing x with key and then splitting it. The simulated data therefore change, and so do the numbers in that section's output.
  • The opening: "This lecture gives an introduction to automatic differentiation using Google JAX" (it said "a brief introduction"), and "Automatic differentiation can be used not only …" (it said "As we will see in later lectures, automatic differentiation …").
  • The imports include sympy.symbols, at the top.
  • The set-up cell is !pip install jax with its output hidden, in place of the !nvidia-smi GPU check. Here it is a no-op, since CI installs jax[cuda13].

For John:

  1. The opening sentence: the wording is a proposal, shared with [autodiff] Open with a sentence that suits both series lecture-python-programming#644.
  2. The set-up cell: this takes programming's form and drops the GPU check. 17 of this series' 33 lectures start with !nvidia-smi. One text could carry it too, but a programming reader without a GPU would then see "command not found".

Links in. jax_intro_jax, newtons_method and jax_nn link to this lecture; its name does not change.

🤖 Generated with Claude Code

Programming and JAX both publish autodiff. Programming's copy is
John's April 2026 adaptation of this one, and carries corrections
that never reached this copy: typo and notation fixes and a cleaner split of the
random key in the regression example. John and Matt decided on
2026-10-12 that the two copies become one text (project-monorepo#111).

This copy becomes programming's, with an opening sentence that suits
both series. The set-up cell installs jax with pip, a no-op here
since CI installs jax[cuda13]; the nvidia-smi GPU check goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-357--incomparable-parfait-2417f8.netlify.app

Commit: c27bb7f

📚 Changed Lectures


Build Info

@mmcky
mmcky marked this pull request as ready for review October 12, 2026 00:49
Copilot AI balanced review requested due to automatic review settings October 12, 2026 00:49

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

The changes are verified editorial corrections and a self-consistent random-key refactor with no stored outputs or broken references.

0 open findings

What changed in this PR

This PR syncs lectures/autodiff.md with the programming series' copy (QuantEcon/lecture-python-programming#644) so that a single source serves both the JAX and programming lecture series. The changes are editorial corrections, a setup-cell swap, and a change to how the regression example seeds its random data.

Changes:

  • Applies spelling/grammar fixes ("causes"→"cause", "evalute"→"evaluate", "evaluates"→"evaluate", "my minimizing"→"by minimizing", "auto diff"→"autodiff") and fixes the LaTeX notation in the $f(x)=\exp(2x)$ example.
  • Replaces the !nvidia-smi GPU check with a hidden-output !pip install jax setup cell and moves from sympy import symbols into the top imports (dropping the now-unused diff import, since .diff() is used as a method).
  • Reworks the regression example to split the key into x_key and ϵ_key up front, changing the simulated data (and resulting output numbers), plus softens the opening sentence wording.
File Description
lectures/​autodiff.md Editorial corrections, setup-cell swap (pip install jax vs nvidia-smi), import reorganization, and a revised random-key split in the regression example.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mmcky
mmcky merged commit 77cfe93 into main Oct 12, 2026
3 checks passed
@mmcky
mmcky deleted the merge/autodiff-one-text branch October 12, 2026 00:52
mmcky added a commit that referenced this pull request Oct 12, 2026
…ources (#358)

publish-2026oct12 succeeded but deployed the build cache's HTML
unchanged, so jax.quantecon.org does not show autodiff from #357. The
"Build HTML" step logged "updating environment: 0 added, 0 changed,
0 removed" and "no targets are out of date": the cache is extracted
after the checkout, so its HTML is newer than every source file.

Drop _build/html and _build/.doctrees after downloading the cache; the
executed notebooks in _build/.jupyter_cache are kept. The same step
landed in lecture-python.myst as QuantEcon/lecture-python.myst#1083.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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