From 39b96d3bba9bd800d2b59d3a38c1db180629433a Mon Sep 17 00:00:00 2001 From: mmcky Date: Mon, 1 Dec 2025 08:20:01 +1100 Subject: [PATCH] Simplify GPU admonition and add to all JAX lectures - Simplify _admonition/gpu.md text (more concise messaging) - Add GPU admonition include to 17 JAX lectures that were missing it JAX lectures now with GPU admonition (21 total): - aiyagari.md, ak_aiyagari.md, ar1_bayes.md, back_prop.md - bayes_nonconj.md, endogenous_lake.md, ifp_advanced.md - ifp_discrete.md, ifp_egm.md, ifp_egm_transient_shocks.md - ifp_opi.md, lake_model.md, mccall_fitted_vfi.md - mccall_model.md, mccall_model_with_sep_markov.md - mccall_model_with_separation.md, mccall_persist_trans.md - mix_model.md, mle.md, newton_method.md, os_egm_jax.md --- lectures/_admonition/gpu.md | 6 ++---- lectures/aiyagari.md | 3 +++ lectures/ak_aiyagari.md | 3 +++ lectures/endogenous_lake.md | 3 +++ lectures/ifp_advanced.md | 3 +++ lectures/ifp_discrete.md | 2 ++ lectures/ifp_egm.md | 3 +++ lectures/ifp_egm_transient_shocks.md | 3 +++ lectures/ifp_opi.md | 2 ++ lectures/lake_model.md | 3 +++ lectures/mccall_fitted_vfi.md | 3 +++ lectures/mccall_model.md | 3 +++ lectures/mccall_model_with_sep_markov.md | 3 +++ lectures/mccall_model_with_separation.md | 3 +++ lectures/mccall_persist_trans.md | 3 +++ lectures/mle.md | 3 +++ lectures/newton_method.md | 3 +++ lectures/os_egm_jax.md | 3 +++ 18 files changed, 51 insertions(+), 4 deletions(-) diff --git a/lectures/_admonition/gpu.md b/lectures/_admonition/gpu.md index 8f2e2bd04..5a4fabad1 100644 --- a/lectures/_admonition/gpu.md +++ b/lectures/_admonition/gpu.md @@ -1,9 +1,7 @@ ```{admonition} GPU :class: warning -This lecture was built using a machine with the latest CUDA and CUDANN frameworks installed with access to a GPU. +This lecture is designed to run on a GPU. To use Google Colab's free GPUs, click the play icon top right, select Colab, and set the runtime to include a GPU. -To run this lecture on [Google Colab](https://colab.research.google.com/), click on the "play" icon top right, select Colab, and set the runtime environment to include a GPU. - -To run this lecture on your own machine, you need to install the software listed following this notice. +For local GPU setup, see the [JAX installation guide](https://github.com/google/jax). ``` diff --git a/lectures/aiyagari.md b/lectures/aiyagari.md index 1436c20f6..fe7bb3708 100644 --- a/lectures/aiyagari.md +++ b/lectures/aiyagari.md @@ -22,6 +22,9 @@ kernelspec: # The Aiyagari Model +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/ak_aiyagari.md b/lectures/ak_aiyagari.md index 4df268ed5..7ef402653 100644 --- a/lectures/ak_aiyagari.md +++ b/lectures/ak_aiyagari.md @@ -14,6 +14,9 @@ kernelspec: # A Long-Lived, Heterogeneous Agent, Overlapping Generations Model +```{include} _admonition/gpu.md +``` + In addition to what's in Anaconda, this lecture will need the following library ```{code-cell} ipython3 diff --git a/lectures/endogenous_lake.md b/lectures/endogenous_lake.md index 9e93ad7a4..526352cdb 100644 --- a/lectures/endogenous_lake.md +++ b/lectures/endogenous_lake.md @@ -22,6 +22,9 @@ kernelspec: # Lake Model with an Endogenous Job Finding Rate +```{include} _admonition/gpu.md +``` + ```{index} single: Lake Model, Endogenous ``` diff --git a/lectures/ifp_advanced.md b/lectures/ifp_advanced.md index 8c03815c6..edf7ab5d7 100644 --- a/lectures/ifp_advanced.md +++ b/lectures/ifp_advanced.md @@ -19,6 +19,9 @@ kernelspec: # {index}`The Income Fluctuation Problem V: Stochastic Returns on Assets ` +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/ifp_discrete.md b/lectures/ifp_discrete.md index 2182a7afc..f6d91bdaf 100644 --- a/lectures/ifp_discrete.md +++ b/lectures/ifp_discrete.md @@ -13,6 +13,8 @@ kernelspec: # The Income Fluctuation Problem I: Discretization and VFI +```{include} _admonition/gpu.md +``` ## Overview diff --git a/lectures/ifp_egm.md b/lectures/ifp_egm.md index 16704e7c3..cd3aff3d2 100644 --- a/lectures/ifp_egm.md +++ b/lectures/ifp_egm.md @@ -21,6 +21,9 @@ kernelspec: # {index}`The Income Fluctuation Problem III: The Endogenous Grid Method ` +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/ifp_egm_transient_shocks.md b/lectures/ifp_egm_transient_shocks.md index 3476fd24b..7415250a8 100644 --- a/lectures/ifp_egm_transient_shocks.md +++ b/lectures/ifp_egm_transient_shocks.md @@ -21,6 +21,9 @@ kernelspec: # {index}`The Income Fluctuation Problem IV: Transient Income Shocks ` +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/ifp_opi.md b/lectures/ifp_opi.md index 37f47feba..d1e67328a 100644 --- a/lectures/ifp_opi.md +++ b/lectures/ifp_opi.md @@ -13,6 +13,8 @@ kernelspec: # The Income Fluctuation Problem II: Optimistic Policy Iteration +```{include} _admonition/gpu.md +``` ## Overview diff --git a/lectures/lake_model.md b/lectures/lake_model.md index f76ec5e03..f95925d2c 100644 --- a/lectures/lake_model.md +++ b/lectures/lake_model.md @@ -22,6 +22,9 @@ kernelspec: # A Lake Model of Employment and Unemployment +```{include} _admonition/gpu.md +``` + ```{index} single: Lake Model ``` diff --git a/lectures/mccall_fitted_vfi.md b/lectures/mccall_fitted_vfi.md index c712d8ebb..34068d00b 100644 --- a/lectures/mccall_fitted_vfi.md +++ b/lectures/mccall_fitted_vfi.md @@ -21,6 +21,9 @@ kernelspec: # Job Search IV: Fitted Value Function Iteration +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/mccall_model.md b/lectures/mccall_model.md index 54f264c3e..df0b2d8c2 100644 --- a/lectures/mccall_model.md +++ b/lectures/mccall_model.md @@ -22,6 +22,9 @@ kernelspec: # Job Search I: The McCall Search Model +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/mccall_model_with_sep_markov.md b/lectures/mccall_model_with_sep_markov.md index 7902bf70f..97df81e88 100644 --- a/lectures/mccall_model_with_sep_markov.md +++ b/lectures/mccall_model_with_sep_markov.md @@ -24,6 +24,9 @@ kernelspec: # Job Search III: Search with Separation and Markov Wages +```{include} _admonition/gpu.md +``` + ```{index} single: An Introduction to Job Search ``` diff --git a/lectures/mccall_model_with_separation.md b/lectures/mccall_model_with_separation.md index 93e8fe612..fc39e1b51 100644 --- a/lectures/mccall_model_with_separation.md +++ b/lectures/mccall_model_with_separation.md @@ -22,6 +22,9 @@ kernelspec: # Job Search II: Search and Separation +```{include} _admonition/gpu.md +``` + ```{index} single: An Introduction to Job Search ``` diff --git a/lectures/mccall_persist_trans.md b/lectures/mccall_persist_trans.md index 53bd462ef..9cf4b3dca 100644 --- a/lectures/mccall_persist_trans.md +++ b/lectures/mccall_persist_trans.md @@ -21,6 +21,9 @@ kernelspec: # Job Search V: Persistent and Transitory Wage Shocks +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/mle.md b/lectures/mle.md index 7a1942d42..fe002e116 100644 --- a/lectures/mle.md +++ b/lectures/mle.md @@ -21,6 +21,9 @@ kernelspec: # Maximum Likelihood Estimation +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/newton_method.md b/lectures/newton_method.md index eb170aa63..54194ca80 100644 --- a/lectures/newton_method.md +++ b/lectures/newton_method.md @@ -24,6 +24,9 @@ kernelspec: # Using Newton's Method to Solve Economic Models +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ``` diff --git a/lectures/os_egm_jax.md b/lectures/os_egm_jax.md index 23e64ede9..b1824c0b9 100644 --- a/lectures/os_egm_jax.md +++ b/lectures/os_egm_jax.md @@ -19,6 +19,9 @@ kernelspec: # {index}`Optimal Savings VI: EGM with JAX ` +```{include} _admonition/gpu.md +``` + ```{contents} Contents :depth: 2 ```