Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 3.02 KB

tools.md

File metadata and controls

70 lines (47 loc) · 3.02 KB

HOWTO: Set Up the Tools

Installing Python and Jupyter Notebook

To work on assignments, you can use one of several environments:

  • Use the online service Google Colab. No additional installations are necessary.
  • Install Visual Studio Code. It will prompt you to install all needed software when you open a notebook file.

Using Google Colab

You can experiment with the code online without installation using Google Colab. If additional packages are needed, then I will provide a code block with a commented-out pip install instruction you can use.

In Colab, you need to save notebooks and any additional files you use on Google Drive to work with them. To do this, mount your Google Drive and change to the correct directory. You can mount your drive manually in Colab or add the following code block to your notebook:

from google.colab import drive
import os

drive.mount('/content/drive')
os.chdir('/content/drive/My Drive/Colab Notebooks/')

To convert Jupyter notebooks to HTML with Colab, use Convert a Jupyter Notebook to HTML using Colab.

Setting up the Environment with Conda

This uses Conda to manage virtual environments.

  1. Install Miniconda.

  2. Download environment.yml

  3. From the VS Code terminal, run these commands from the repository root:

    conda env create -f environment.yml
    conda activate CS7320-AI

Then configure VS Code:

  1. Install Microsoft’s Python and Jupyter extensions.
  2. Press Ctrl+Shift+P.
  3. Select Python: Select Interpreter.
  4. Choose CS7320-AI.
  5. For a notebook, click Select Kernel in the upper-right and choose CS7320-AI. If you cannot find it, you may need to restart VS Code.

Optional packages can be added afterward:

  • Gymnasium and Lunar Lander conda env update -n CS7320-AI -f environments/gymnasium.yml
  • Local LLM examples conda env update -n CS7320-AI -f environments/llm.yml

Learning Python and Jupyter Notebook

If you are not familiar with Python, then you should work through one of the many Python tutorials (e.g., this tutorial) to learn the basics about Python and the packages numpy and pandas. Some code examples that help with the assignments are available here.

How to use Jupyter notebooks is covered in many online tutorials like the Jupyter notebook tutorial.

License

All code and documents in this repository are provided under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License.

CC BY-SA 4.0