GitHub

Original file line numberDiff line numberDiff line change

@@ -53,7 +53,7 @@ jobs:

5353

uses: actions/upload-artifact@v4

5454

if: failure()

5555

with:

56-

name: execution-reports

56+

name: execution-reports-notebooks

5757

path: _build/jupyter/reports

5858

- name: Build PDF from LaTeX

5959

shell: bash -l {0}

Original file line numberDiff line numberDiff line change

@@ -37,6 +37,7 @@ sphinx:

3737

# false-positive links

3838

linkcheck_ignore: ['https://online.stat.psu.edu/stat415/book/export/html/834']

3939

bibtex_reference_style: author_year

40+

suppress_warnings: ["mystnb.unknown_mime_type"]

4041

nb_mime_priority_overrides: [

4142

# HTML

4243

['html', 'application/vnd.jupyter.widget-view+json', 10],

Original file line numberDiff line numberDiff line change

@@ -16,25 +16,17 @@ kernelspec:

1616

```{include} _admonition/gpu.md

1717

```

1818
19-

```{code-cell} ipython3

20-

:tags: [skip-execution]

21-
22-

!pip install --upgrade jax

23-

```

24-
25-

```{code-cell} ipython3

26-

import jax

27-

## to check that gpu is activated in environment

28-

print(f"JAX backend: {jax.devices()[0].platform}")

29-

```

30-
3119

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

3220
3321

```{code-cell} ipython3

3422

:tags: [hide-output]

3523
36-

!pip install kaleido

37-

!conda install -y -c plotly plotly plotly-orca retrying

24+

!pip install -U kaleido plotly

25+

!conda install -y -c plotly plotly-orca

26+
27+

# kaleido needs chrome to build images

28+

import kaleido

29+

kaleido.get_chrome_sync()

3830

```

3931
4032

```{note}

@@ -44,6 +36,19 @@ the Python packages. However this lecture will still execute as Google Colab

4436

has `plotly` installed.

4537

```

4638
39+

We also need to install JAX to run this lecture

40+
41+

```{code-cell} ipython3

42+

:tags: [skip-execution]

43+
44+

!pip install --upgrade jax

45+

```

46+
47+

```{code-cell} ipython3

48+

import jax

49+

print(f"JAX backend: {jax.devices()[0].platform}") # to check that gpu is activated in environment

50+

```

51+
4752

## Overview

4853
4954

Substantial parts of **machine learning** and **artificial intelligence** are about

Original file line numberDiff line numberDiff line change

@@ -33,16 +33,16 @@ and the following package versions

3333

!conda list

3434

```

3535
36+

This lecture series has access to the following GPU

37+
38+

```{code-cell} ipython

39+

!nvidia-smi

40+

```

41+
3642

You can check the backend used by JAX using:

3743
3844

```{code-cell} ipython3

3945

import jax

4046

# Check if JAX is using GPU

4147

print(f"JAX backend: {jax.devices()[0].platform}")

42-

```

43-
44-

and this lecture series also has access to the following GPU

45-
46-

```{code-cell} ipython

47-

!nvidia-smi

4848

```

Read the original on github.com ↗