Itay Segev โข Andrey Elashkin
Jupyter Notebook tutorials for the Technion's CS 236203 course Collaborative AI
File | Topics Covered |
---|---|
Setting Up The Working Environment.pdf |
Guide for installing Anaconda locally with Python 3 and PyTorch, integration with PyCharm and using GPU on Google Colab |
tutorials/tut01/Jupyter101.ipynb |
Basic introduction to Jupyter Notebooks, covering essential features like creating and running cells, and writing markdown for documentation. |
tutorials/tut01/PytorchFundamentals.ipynb |
Basic of PyTorch, focusing on tensor operations, neural network construction, and training models. |
tutorials/tut01/Gymnasium.ipynb |
Using Gymnasium for creating and interacting with reinforcement learning environments, including setting up environments, running simulations, and implementing agents. |
tutorials/tut01/PettingZooDemo.ipynb |
Demonstration of the PettingZoo library for multi-agent reinforcement learning, covering environment setup, interaction, and agent implementation. |
tutorials/tut01/StableBaselines.ipynb |
Overview of the Stable Baselines3 library for reinforcement learning, covering setup, training, and evaluation of RL models. |
You can view the tutorials online or download and run locally.
Service | Usage |
---|---|
Jupyter Nbviewer | Render and view the notebooks (can not edit) |
Google Colab | Render, view, edit and save the notebooks to Google Drive (limited time) |
Jupyter Nbviewer:
Press on the "Open in Colab" button below to use Google Colab:
Press "Download ZIP" under the green button Clone or download
or use git
to clone the repository using the
following command: git clone https://github.com/CLAIR-LAB-TECHNION/CLAI.git
(in cmd/PowerShell in Windows or in the Terminal in Linux/Mac)
Open the folder in Jupyter Notebook (it is recommended to use Anaconda). Installation instructions can be found in Setting Up The Working Environment.pdf
.
For the complete guide, with step-by-step images, please consult Setting Up The Working Environment.pdf
- Get Anaconda with Python 3, follow the instructions according to your OS (Windows/Mac/Linux) at: https://www.anaconda.com/download
- Install the basic packages using the provided
environment.yml
file by running:conda env create -f environment.yml
which will create a new conda environment namedCLAI
. If you did this, you will only need to install PyTorch, see the table below. - Alternatively, you can create a new environment for the course and install packages from scratch:
In Windows open
Anaconda Prompt
from the start menu, in Mac/Linux open the terminal and runconda create --name CLAI
. Full guide at https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands - To activate the environment, open the terminal (or
Anaconda Prompt
in Windows) and runconda activate CLAI
- Install the required libraries according to the table below (to search for a specific library and the corresponding command you can also look at https://anaconda.org/)
Library | Command to Run |
---|---|
Jupyter Notebook |
conda install -c conda-forge notebook |
numpy |
conda install -c conda-forge numpy |
matplotlib |
conda install -c conda-forge matplotlib |
tqdm |
conda install -c conda-forge tqdm |
gymnasium |
pip install gymnasium |
pettingzoo |
pip install pettingzoo |
stable-baselines3 |
pip install stable-baselines3 |
pytorch (cpu) |
conda install pytorch torchvision torchaudio cpuonly -c pytorch (get command from PyTorch.org) |
pytorch (gpu) |
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia (get command from PyTorch.org) |
- To open the notebooks, open Ananconda Navigator or run
jupyter notebook
in the terminal (orAnaconda Prompt
in Windows) while theCLAI
environment is activated.