Skip to content
Merged
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
shell: bash -l {0}
run: |
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
pip install pyro-ppl
pip install --upgrade "jax[cuda12-local]"
pip install numpyro pyro-ppl
python scripts/test-jax-install.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/collab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
execution-checks:
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=ubuntu24-gpu-x64/disk=large"
container:
image: docker://us-docker.pkg.dev/colab-images/public/runtime
image: docker://us-docker.pkg.dev/colab-images/public/runtime:latest
options: --gpus all
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Install Build Software
shell: bash -l {0}
run: |
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-reredirects sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 sphinx-proof
pip install jupyter-book==1.0.3 quantecon-book-theme==0.8.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinxcontrib-youtube==1.3.0 sphinx-togglebutton==0.3.2 arviz sphinx-proof sphinx-exercise sphinx-reredirects
# Build of HTML (Execution Testing)
- name: Build HTML
shell: bash -l {0}
Expand Down
3 changes: 0 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ dependencies:
- ghp-import==1.1.0
- sphinxcontrib-youtube==1.3.0 #Version 1.3.0 is required as quantecon-book-theme is only compatible with sphinx<=5
- sphinx-togglebutton==0.3.2
# Docker Requirements
- pytz

9 changes: 9 additions & 0 deletions lectures/_admonition/gpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```{admonition} GPU
:class: warning

This lecture was built using a machine with the latest CUDA and CUDANN frameworks installed with access to 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.
```
14 changes: 12 additions & 2 deletions lectures/ar1_bayes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,25 @@ kernelspec:

# Posterior Distributions for AR(1) Parameters

We'll begin with some Python imports.
```{include} _admonition/gpu.md
```

```{code-cell} ipython3
:tags: [hide-output]

!pip install numpyro jax
```

In addition to what's included in base Anaconda, we need to install the following packages

```{code-cell} ipython3
:tags: [hide-output]

!pip install arviz pymc numpyro jax
!pip install arviz pymc
```

We'll begin with some Python imports.

```{code-cell} ipython3

import arviz as az
Expand Down
13 changes: 12 additions & 1 deletion lectures/back_prop.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ kernelspec:

# Introduction to Artificial Neural Networks

```{include} _admonition/gpu.md
```

```{code-cell} ipython3
:tags: [skip-execution]

!pip install --upgrade jax
```

In addition to what's included in base Anaconda, we need to install the following packages

```{code-cell} ipython3
:tags: [hide-output]

!pip install --upgrade jax jaxlib kaleido
!pip install kaleido
!conda install -y -c plotly plotly plotly-orca retrying
```

Expand Down
16 changes: 9 additions & 7 deletions lectures/bayes_nonconj.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ kernelspec:

# Non-Conjugate Priors

```{include} _admonition/gpu.md
```

```{code-cell} ipython3
:tags: [hide-output]

!pip install numpyro pyro-ppl torch jax
```

This lecture is a sequel to the {doc}`quantecon lecture <prob_meaning>`.

That lecture offers a Bayesian interpretation of probability in a setting in which the likelihood function and the prior distribution
Expand Down Expand Up @@ -43,13 +52,6 @@ The two Python modules are

As usual, we begin by importing some Python code.

```{code-cell} ipython3
:tags: [hide-output]

# install dependencies
!pip install numpyro pyro-ppl torch jax
```

```{code-cell} ipython3
import numpy as np
import seaborn as sns
Expand Down
9 changes: 5 additions & 4 deletions lectures/mix_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ kernelspec:
(likelihood-ratio-process)=
# Incorrect Models

In addition to what's in Anaconda, this lecture will need the following libraries:
```{include} _admonition/gpu.md
```

```{code-cell} ipython
---
tags: [hide-output]
---
:tags: [hide-output]

!pip install numpyro jax
```

Expand Down
Loading