[kalman] Update to JAX#611
Conversation
|
📖 Netlify Preview Ready! Preview URL: https://pr-611--sunny-cactus-210e3e.netlify.app (5be7a1f) 📚 Changed Lecture Pages: back_prop, bayes_nonconj, kalman, lqcontrol, mle, qr_decomp |
|
📖 Netlify Preview Ready! Preview URL: https://pr-611--sunny-cactus-210e3e.netlify.app (b1629e8) 📚 Changed Lecture Pages: back_prop, bayes_nonconj, kalman, lqcontrol, mle, qr_decomp |
|
Thanks @xuanguang-li -- @HumphreyYang this is now ready for review. |
|
📖 Netlify Preview Ready! Preview URL: https://pr-611--sunny-cactus-210e3e.netlify.app (533e30f) 📚 Changed Lecture Pages: back_prop, bayes_nonconj, kalman, lqcontrol, mle, qr_decomp |
|
🤖 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-611--sunny-cactus-210e3e.netlify.app/ currently returns 404. Why previews are down (repo-wide findings)1. This branch is stale — 193 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: |
|
@copilot resolve the merge conflicts in this pull request |
Resolved by merging |
|
Thanks very much for this @xuanguang-li, and apologies that it has sat open for a while. Careful work went into it, and I want to explain properly why we've decided not to merge it — the reasoning turned out to be more general than this one lecture, and it has been genuinely useful to us. Why we're keeping
|
|
Many thanks @xuanguang-li . I appreciate all your hard work. The above comment was written by Claude under my guidance. I'm sorry it took so long to get to this PR and that I've decided to close it in the end. I think it's been valuable for all of us. The key takeaway is that we lose on readability without gaining performance, so we'll keep this in NumPy. |
|
Thanks @jstac! I agree with your point and Claude's review. One thing that surprised me is the behavior of the I've attached the benchmark results as well, and I think this is a valuable lesson from working on this PR.
|
|
Thanks @xuanguang-li . Nice analysis. Yes, it's best avoided, except maybe in a jitted function, since it creates an entire new array just to change one element! This is now noted in the manual. |
This pull request makes updates to the
kalman.mdnotebook, modernizing the codebase by switching from NumPy to JAX.Key changes include:
numpy(np) operations withjax.numpy(jnp) and updated imports accordingly.bivariate_normalandgen_gaussian_plot_valsfunctions with a vectorized, JAX-based implementation usingjax.vmap.mystnbmetadata blocks to each figure-generating code cell.