[imp_sample] Convert code to JAX and check stylesheet compliance#620
[imp_sample] Convert code to JAX and check stylesheet compliance#620HumphreyYang wants to merge 6 commits into
Conversation
|
📖 Netlify Preview Ready! Preview URL: https://pr-620--sunny-cactus-210e3e.netlify.app (eba931b) 📚 Changed Lecture Pages: imp_sample |
|
📖 Netlify Preview Ready! Preview URL: https://pr-620--sunny-cactus-210e3e.netlify.app (60826d6) 📚 Changed Lecture Pages: imp_sample |
|
📖 Netlify Preview Ready! Preview URL: https://pr-620--sunny-cactus-210e3e.netlify.app (e57deef) 📚 Changed Lecture Pages: imp_sample |
|
📖 Netlify Preview Ready! Preview URL: https://pr-620--sunny-cactus-210e3e.netlify.app (58d1cd2) 📚 Changed Lecture Pages: imp_sample |
|
🤖 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-620--sunny-cactus-210e3e.netlify.app/ currently returns 404. Why previews are down (repo-wide findings)1. This branch is stale — 168 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: |
|
@HumphreyYang thanks for this — the JAX conversion is real work and mostly reads well. I ran the lecture end to end on a GPU box (RTX 4080, JAX 0.10) and it completes in 12 seconds, so the speedup is there. A few things need attention before this can go in, one of them a genuine bug. What's good
Blocker: the final histogram plots the wrong seriesIn the last code cell (the results = simulate_multiple_T(...) # returns (μ_L_p_all, μ_L_q_all), each of shape (n_T, N_simu)
for i, t in enumerate(T_list):
μ_L_p, μ_L_q = results[i] # indexes the tuple, then unpacks along the T axis
Both legends are therefore wrong, and neither panel shows the comparison the surrounding text describes. It raises no error only because μ_L_p_all_h2, μ_L_q_all_h2 = all_results_h2
...
μ_L_p = μ_L_p_all_h2[i]
μ_L_q = μ_L_q_all_h2[i]The Undocumented reduction in sample size
I checked that the narrative still holds — at Could you confirm whether the reduction was deliberate? Either restoring Style-guide items
Merge stateThe branch is currently Happy to help with any of this if useful, but it's your PR and you know the intent behind the sample-size change better than I do — over to you. |
|
@HumphreyYang Claude authored the above, as a list of suggestions to get this merged. Please let me know if you don't have time and I'll handle it. |
|
Thanks @jstac, I am working on this now. |
📖 Netlify Preview Ready!Preview URL: https://pr-620--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
This is one of the lectures that have the longest runtime.
I made a few big changes that makes the code 4 x faster than Numba optimized version.
Updating in progress...