You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Volume 2 figure notebooks](https://github.com/probml/pml-book/tree/main/pml2). (Note: volume 2 is not finished yet.)
13
+
The notebooks needed to make all the figures are available at the following locations.
16
14
17
-
In addition to the automatically generated notebooks, there are a series of manually created notebooks, which create additional figures, and provide supplementary material for the book. These are stored in the [notebooks repo](https://github.com/probml/probml-notebooks), since they can be quite large. Some of these notebooks use the scripts mentioned above, but others are independent of the book content.
*[Volume 2 figure notebooks](https://github.com/probml/pyprobml/tree/master/notebooks/book2). (Note: volume 2 is not finished yet.)
18
17
19
-
The easiest way to run these notebooks is inside [Colab](https://colab.research.google.com/notebooks/intro.ipynb). This has most of the libraries you will need (e.g., scikit-learn, JAX) pre-installed, and gives you access to a free GPU and TPU. We have a created a [intro to colab](https://colab.research.google.com/github/probml/probml-notebooks/blob/main/notebooks/colab_intro.ipynb) notebook with more details.
18
+
Notebooks are saved in chapter-wise folders. For example, a notebook for figure 2.3 is saved in the folder `notebooks/book1/02/`.
20
19
20
+
In addition to the figure notebooks, there are a series of manually created notebooks, which create additional figures, and provide supplementary material for the book. These are stored in the [`misc` folder](https://github.com/probml/pyprobml/tree/master/notebooks/misc).
21
21
22
-
## Running scripts in colab
22
+
###Running notebooks in colab
23
23
24
-
The easiest way to run individual scripts is inside [Colab](https://colab.research.google.com/notebooks/intro.ipynb).
25
-
Just cut and paste this into a code cell:
26
-
```py
27
-
%pip install superimport
28
-
!git clone --depth 1 https://github.com/probml/pyprobml &>/dev/null # THIS CODEBASE
29
-
```
30
-
Note: The [superimport](https://colab.research.google.com/github/probml/probml-notebooks/blob/main/notebooks/Superimport.ipynb)
31
-
library will automatically install packages for any file which contains the line `import superimport'.
32
-
33
-
Then run a script from a cell like this:
34
-
```py
35
-
%run pyprobml/scripts/softmax_plot.py
36
-
```
37
-
38
-
39
-
To edit a file locally and then run it, follow the example below.
40
-
```py
41
-
# Make sure local changes to file are detected by runtime
42
-
%load_ext autoreload
43
-
%autoreload 2
24
+
[Colab](https://colab.research.google.com/notebooks/intro.ipynb) has most of the libraries you will need (e.g., scikit-learn, JAX) pre-installed, and gives you access to a free GPU and TPU. We have a created a [intro to colab](https://colab.research.google.com/github/probml/probml-notebooks/blob/main/notebooks/colab_intro.ipynb) notebook with more details. To run the notebooks on colab in any browser, you can go to a particular notebook on GitHub and change the domain from `github.com` to `githubtocolab.com` as suggeted [here](https://stackoverflow.com/a/67344477/13330701). If you are using Google Chrome browser, you can use ["Open in Colab" Chrome extension](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo) to do the same with a single click.
44
25
45
-
file='pyprobml/scripts/softmax_plot.py'# change this filename as needed
46
-
from google.colab import files
47
-
files.view(file) # open editor
48
-
49
-
%run $file
50
-
```
51
-
52
-
To download and run code from github, follow the example below.
Download [requirements.txt](https://github.com/probml/pyprobml/blob/master/requirements.txt) locally to your path and run
91
43
44
+
```bash
45
+
pip install -r requirements.txt
46
+
```
92
47
93
48
## GCP, TPUs, and all that
94
49
95
-
When you want more power or control than colab gives you, you should get a Google Cloud Platform (GCP) account, and get access to a TPU VM. You can then use this as a virtual desktop which you can access via ssh from inside VScode. We have created [various tutorials on Colab, GCP and TPUs](https://github.com/probml/probml-notebooks/blob/main/markdown/colab_gcp_tpu_tutorial.md) with more information.
50
+
When you want more power or control than colab gives you, you should get a Google Cloud Platform (GCP) account, and get access to a TPU VM. You can then use this as a virtual desktop which you can access via ssh from inside VScode. We have created [various tutorials on Colab, GCP and TPUs](https://github.com/probml/pyprobml/blob/master/tutorials/colab_gcp_tpu_tutorial.md) with more information.
96
51
97
52
98
53
## How to contribute
99
54
100
-
See [this guide](https://github.com/probml/pyprobml/blob/master/CONTRIBUTING.md) for how to contribute code.
55
+
See [this guide](https://github.com/probml/pyprobml/blob/master/CONTRIBUTING.md) for how to contribute code. Please follow [these guidelines](https://github.com/probml/pyprobml/blob/master/notebooks/README.md) to contribute new notebooks to the notebooks directory.
*[Volume 2 figure notebooks](https://github.com/probml/pyprobml/tree/master/notebooks/book2). (Note: volume 2 is not finished yet.)
17
+
In addition to the automatically generated notebooks, there are a series of manually created notebooks, which create additional figures, and provide supplementary material for the book. These are stored in the [notebooks repo](https://github.com/probml/probml-notebooks), since they can be quite large. Some of these notebooks use the scripts mentioned above, but others are independent of the book content.
17
18
18
-
Notebooks are saved in chapter-wise folders. For example, a notebook for figure 2.3 is saved in the folder `notebooks/book1/02/`.
19
+
The easiest way to run these notebooks is inside [Colab](https://colab.research.google.com/notebooks/intro.ipynb). This has most of the libraries you will need (e.g., scikit-learn, JAX) pre-installed, and gives you access to a free GPU and TPU. We have a created a [intro to colab](https://colab.research.google.com/github/probml/probml-notebooks/blob/main/notebooks/colab_intro.ipynb) notebook with more details.
19
20
20
-
In addition to the figure notebooks, there are a series of manually created notebooks, which create additional figures, and provide supplementary material for the book. These are stored in the [`misc` folder](https://github.com/probml/pyprobml/tree/master/notebooks/misc).
21
21
22
-
###Running notebooks in colab
22
+
## Running scripts in colab
23
23
24
-
[Colab](https://colab.research.google.com/notebooks/intro.ipynb) has most of the libraries you will need (e.g., scikit-learn, JAX) pre-installed, and gives you access to a free GPU and TPU. We have a created a [intro to colab](https://colab.research.google.com/github/probml/probml-notebooks/blob/main/notebooks/colab_intro.ipynb) notebook with more details. To run the notebooks on colab in any browser, you can go to a particular notebook on GitHub and change the domain from `github.com` to `githubtocolab.com` as suggeted [here](https://stackoverflow.com/a/67344477/13330701). If you are using Google Chrome browser, you can use ["Open in Colab" Chrome extension](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo) to do the same with a single click.
24
+
The easiest way to run individual scripts is inside [Colab](https://colab.research.google.com/notebooks/intro.ipynb).
25
+
Just cut and paste this into a code cell:
26
+
```py
27
+
%pip install superimport
28
+
!git clone --depth 1 https://github.com/probml/pyprobml &>/dev/null # THIS CODEBASE
29
+
```
30
+
Note: The [superimport](https://colab.research.google.com/github/probml/probml-notebooks/blob/main/notebooks/Superimport.ipynb)
31
+
library will automatically install packages for any file which contains the line `import superimport'.
32
+
33
+
Then run a script from a cell like this:
34
+
```py
35
+
%run pyprobml/scripts/softmax_plot.py
36
+
```
37
+
38
+
39
+
To edit a file locally and then run it, follow the example below.
40
+
```py
41
+
# Make sure local changes to file are detected by runtime
42
+
%load_ext autoreload
43
+
%autoreload 2
25
44
26
-
## Running the noteboks locally
45
+
file='pyprobml/scripts/softmax_plot.py'# change this filename as needed
46
+
from google.colab import files
47
+
files.view(file) # open editor
48
+
49
+
%run $file
50
+
```
51
+
52
+
To download and run code from github, follow the example below.
When you want more power or control than colab gives you, you should get a Google Cloud Platform (GCP) account, and get access to a TPU VM. You can then use this as a virtual desktop which you can access via ssh from inside VScode. We have created [various tutorials on Colab, GCP and TPUs](https://github.com/probml/pyprobml/blob/master/tutorials/colab_gcp_tpu_tutorial.md) with more information.
95
+
When you want more power or control than colab gives you, you should get a Google Cloud Platform (GCP) account, and get access to a TPU VM. You can then use this as a virtual desktop which you can access via ssh from inside VScode. We have created [various tutorials on Colab, GCP and TPUs](https://github.com/probml/probml-notebooks/blob/main/markdown/colab_gcp_tpu_tutorial.md) with more information.
51
96
52
97
53
98
## How to contribute
54
99
55
-
See [this guide](https://github.com/probml/pyprobml/blob/master/CONTRIBUTING.md) for how to contribute code. Please follow [these guidelines](https://github.com/probml/pyprobml/blob/master/notebooks/README.md) to contribute new notebooks to the notebooks directory.
100
+
See [this guide](https://github.com/probml/pyprobml/blob/master/CONTRIBUTING.md) for how to contribute code.
0 commit comments