/PyTorch-webinar

Machine Learning with PyTorch tutorials (for Pearson)

Primary LanguageJupyter Notebook

About the course

This repository is for use with the Pearson Publishing live webinar "Machine Learning with PyTorch." Versions of this material are used by other training provided by David Mertz (mertz@kdm.training) and KDM Training.

If you have attended one of the webinars using this material, I encourage you to complete the survey on it at: Machine Learning Webinar survey. As folks fill this out, we will fold back the updated answers into the dataset used in the lessons themselves.

Installing training materials

Before attending this course, please configure the environments you will need. Within the repository, find the file requirements.txt to install software using pip, or the file environment.yml to install software using conda. I.e.:

$ conda env create -f environment.yml
$ conda activate Pearson-PyTorch
(Pearson-ML) $ jupyter notebook Outline.ipynb

Or

$ pip install -r requirements.txt
$ juypter notebook Outline.ipynb

PyTorch often works vastly faster when utilizing a CUDA GPU to perform training. Students who wish to be able to follow along running the material on their own machines in real time, are advised to obtain access to a GPU machine while attending this webinar.

Numerous cloud services provide access to rented GPU instances are reasonable hourly costs. AWS EC2 instances are very well known, and can be leased with good GPU configurations. The author is very fond of a service called vast.ai (https://vast.ai/) that he will use during presentation of the webinar. The Docker image pytorch/pytorch is my preferred starting point on vast.ai.

Of course, if you have any moderately recent CUDA-enabled GPU on your home or work machine, you will be fine also.

If you run this material on a leased cloud GPU, you will probably start with a fairly minimal base Docker image. It will probably be a good idea to install a few tools using the system installer (some of those are used in the lessons themselves, but nothing important depends on them if you follow without those available).

I setup a new cloud instance with these steps, once I open a terminal into that machine:

$ apt-get update  # Make sure latest repo information
$ apt-get install git jq curl tree vim wget unzip -y

### For modification of repo...
### Create ~/.ssh/id_rsa based on local /home/dmertz/.ssh/id_rsa.vastai
$ chmod 600 ~/.ssh/id_rsa
$ git clone git@github.com:DavidMertz/PyTorch-webinar.git
$ git config --global user.email "mertz@kdm.training"  # substitute as needed
$ git config --global user.name "David Mertz"

### For cloning without intention to push changes...
$ git clone https://github.com/DavidMertz/PyTorch-webinar.git

$ cd PyTorch-webinar/
$ pip install --upgrade pip  # latest version changes often
$ pip install -r requirements.txt

Recommended reading