[harrison_kreps] Update lecture#763
Conversation
|
📖 Netlify Preview Ready! Preview URL: https://pr-763--sunny-cactus-210e3e.netlify.app (f4ecd4b) 📚 Changed Lecture Pages: harrison_kreps |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📖 Netlify Preview Ready!Preview URL: https://pr-763--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
|
Thanks @xuanguang-li , much appreciated. I've reviewed the PR. Actually I don't think switching to JAX is justified in this lecture. In the computations of the stationary distribution at the start, we will be using NumPy internally, since that's all qe.MarkovChain can work with. In the later computation, with the for loop, JAX is probably slower, since the array computations are very low dimensional and the main task is iterative. I think it might be best to close this PR. @HumphreyYang or @mmcky, what do you think? If we do close this, let's tick it off or remove it from the meta issue, so we know not to try again. |
|
Many thanks @jstac, I agree! @xuanguang-li also has some other valuable edits in this PR so I can revert the JAX edits and keep others. |
|
Thanks, @jstac and @HumphreyYang, for your comment. I agree with your points. JAX usage is minimal in this lecture. Since the equilibrium computation isn't computationally heavy, I kept the |
|
Thanks @xuanguang-li and @HumphreyYang @HumphreyYang , it would be great if you could revert the jax edits. There are lots of edge cases and in this lecture I think we are making the right decision. |
|
🤖 Status note for a future session — from a maintainer investigation on 2026-07-08 into why open-PR previews 404. Context only, not instructions. Netlify preview: https://pr-763--sunny-cactus-210e3e.netlify.app/ is currently live — but it's a lucky survivor. It was built 2026-06-05, before the breakages below, and simply hasn't been rebuilt since. Any rebuild will fail until the branch is updated (see below). Why previews are down (repo-wide findings)1. This branch is stale — 39 commits behind 2. The arviz failure was a red herring — do NOT pin arviz or rewrite plotting. A 2026-07-07 rebuild also failed in Recommended first step for this PRUpdate this branch to This PR touches: |
This pull request updates the Harrison-Kreps model lecture to use JAX and improves code consistency and formatting throughout the document.
Replaced
numpy(np) andscipy.linalg(la) imports and usages withjax.numpy(jnp) equivalents throughout code cells, but keptforandwhileloops for simplicity.Formatting and terminology improvements: standardized section and subsection titles, and improved consistency in emphasis (e.g., italicizing instead of bolding, fixing typos in comments and variable names).