This repository serves as a storage and versioning system for the Introduction to Artificial Intelligence course at SUNY Ulster. It is split into three main sections:
assignments/holds starter code for class assignments.modules/holds sample code related to class lectures.models/holds runnable model demos. See the models README for details.
Code snippets will be introduced throughout the course as we build upon our understanding of machine learning models and concepts.
Installing this project will pull in the following key packages:
- PyTorch: tensor operations and model training
- Torchvision: image datasets and transforms
- Hugging Face Transformers: pretrained NLP models
- Hugging Face Datasets: dataset loading utilities
- Matplotlib: plotting and visualization
- Pillow: image loading and manipulation
- Graphviz + Torchview: model architecture diagrams
Note: Training models (especially RNNs, LSTMs, and Transformers) can be slow on CPU. You do not need a GPU for this course, but expect some training runs to take several minutes.
What you will need:
- git
- Python >= 3.10
- uv (optional, but recommended)
See: how to install git, how to install Python, and how to install uv.
-
Clone this repository.
git clone https://github.com/SUNY-Ulster-Computer-Science/Introduction-to-Artificial-Intelligence.git cd Introduction-to-Artificial-Intelligence -
Create a virtual environment and install packages.
Using uv (recommended):
uv venv uv sync
Using pip:
python3 -m venv .venv pip install . -
Activate your virtual environment before running any code.
The command you run will depend on your operating system:
source .venv/bin/activate # macOS / Linux .venv\Scripts\activate.bat # Windows (cmd) .venv\Scripts\Activate.ps1 # Windows (PowerShell)
You should see
(.venv)appear in your terminal prompt when the environment is active.