Skip to content

Commit

Permalink
Merge pull request #11 from QuantEcon/fix-cuda
Browse files Browse the repository at this point in the history
FIX: Update CUDA and improve status page with diagnostics
  • Loading branch information
mmcky authored Feb 5, 2024
2 parents 215ec53 + b790186 commit 359a1ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 39 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
deploy-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v1
- uses: iterative/setup-cml@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -22,12 +22,12 @@ jobs:
--cloud-region=us-west-2 \
--cloud-type=p3.2xlarge \
--labels=cml-gpu \
--cloud-hdd-size=40
--cloud-hdd-size=100
cache:
needs: deploy-runner
runs-on: [self-hosted, cml-gpu]
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-c
image: docker://mmcky/quantecon-lecture-python:cuda-11.8.0-anaconda-2023-09-py311
options: --gpus all
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
deploy-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v1
- uses: iterative/setup-cml@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -19,12 +19,12 @@ jobs:
--cloud-region=us-west-2 \
--cloud-type=p3.2xlarge \
--labels=cml-gpu \
--cloud-hdd-size=40
--cloud-hdd-size=100
preview:
needs: deploy-runner
runs-on: [self-hosted, cml-gpu]
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-c
image: docker://mmcky/quantecon-lecture-python:cuda-11.8.0-anaconda-2023-09-py311
options: --gpus all
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
deploy-runner:
runs-on: ubuntu-latest
steps:
- uses: iterative/setup-cml@v1
- uses: iterative/setup-cml@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -22,13 +22,13 @@ jobs:
--cloud-region=us-west-2 \
--cloud-type=p3.2xlarge \
--labels=cml-gpu \
--cloud-hdd-size=40
--cloud-hdd-size=100
publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: deploy-runner
runs-on: [self-hosted, cml-gpu]
container:
image: docker://mmcky/quantecon-lecture-python:cuda-12.1.0-anaconda-2023-09-py311-c
image: docker://mmcky/quantecon-lecture-python:cuda-11.8.0-anaconda-2023-09-py311
options: --gpus all
steps:
- name: Checkout
Expand Down
9 changes: 3 additions & 6 deletions lectures/ar1_bayes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ kernelspec:

# Posterior Distributions for AR(1) Parameters

We'll begin with some Python imports.


```{code-cell} ipython3
:tags: [hide-output]
!pip install arviz pymc numpyro jax
!pip install pymc
```

We'll begin with some Python imports.

```{code-cell} ipython3
import arviz as az
Expand Down
6 changes: 0 additions & 6 deletions lectures/ar1_turningpts.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ kernelspec:

# Forecasting an AR(1) Process

```{code-cell} ipython3
:tags: [hide-output]
!pip install arviz pymc
```

This lecture describes methods for forecasting statistics that are functions of future values of a univariate autogressive process.

The methods are designed to take into account two possible sources of uncertainty about these statistics:
Expand Down
1 change: 0 additions & 1 deletion lectures/back_prop.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ kernelspec:
```{code-cell} ipython3
:tags: [hide-output]
!pip install --upgrade jax jaxlib
!conda install -y -c plotly plotly plotly-orca retrying
```

Expand Down
8 changes: 0 additions & 8 deletions lectures/bayes_nonconj.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,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
8 changes: 0 additions & 8 deletions lectures/mix_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ kernelspec:
(likelihood-ratio-process)=
# Incorrect Models

In addition to what's in Anaconda, this lecture will need the following libraries:
```{code-cell} ipython
---
tags: [hide-output]
---
!pip install numpyro jax
```

## Overview

This is a sequel to {doc}`this quantecon lecture <likelihood_bayes>`.
Expand Down
16 changes: 15 additions & 1 deletion lectures/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,18 @@ This table contains the latest execution statistics.

These lectures are built on `linux` instances through `github actions` and `amazon web services (aws)` to
enable access to a `gpu`. These lectures are built on a [p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/)
that has access to `8 vcpu's`, a `V100 NVIDIA Tesla GPU`, and `61 Gb` of memory.
that has access to `8 vcpu's`, a `V100 NVIDIA Tesla GPU`, and `61 Gb` of memory.

You can check the backend used by JAX using:

```{code-cell} ipython3
import jax
# Check if JAX is using GPU
print(f"JAX backend: {jax.devices()[0].platform}")
```

and the hardware we are running on:

```{code-cell} ipython3
!nvidia-smi
```

0 comments on commit 359a1ac

Please sign in to comment.