Skip to content

Installation

Install Eggroll Trainer using your preferred package manager.

Using pip

pip install eggroll-trainer

Using uv

uv add eggroll-trainer

From Source (Development)

For development and contributions, clone the repository:

git clone https://github.com/JacobFV/eggroll-trainer.git
cd eggroll-trainer
uv sync
# or
pip install -e .

See the Contributing Guide for more details.

Optional Dependencies

Examples with Plotting

For examples that generate plots (like mnist_comparison.py):

pip install "eggroll-trainer[examples]"
# or
uv sync --extra examples

Development Dependencies

For development and testing:

pip install "eggroll-trainer[dev]"
# or
uv sync --extra dev

Verify Installation

Test that everything works:

import torch
from eggroll_trainer import EGGROLLTrainer, ESTrainer, VanillaESTrainer

print("Eggroll Trainer installed successfully!")

Platform-Specific Notes

macOS (M3/Apple Silicon)

PyTorch should automatically detect and use MPS (Metal Performance Shaders) for GPU acceleration. If you encounter issues, ensure you have the latest PyTorch version:

pip install --upgrade torch torchvision

CUDA Support

For CUDA support, install PyTorch with CUDA:

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

Troubleshooting

Import Errors

If you see import errors, ensure you're using Python 3.12+:

python --version  # Should be 3.12 or higher

PyTorch Not Found

Install PyTorch separately if needed:

pip install torch>=2.0.0 torchvision>=0.15.0

Next Steps

Once installed, check out the Quick Start Guide to run your first example!