Skip to main content

Installation from GitHub

The easiest way to install Samay is directly from GitHub using pip:
1

Install via pip

Run the following command to install Samay and all its dependencies:
pip install git+https://github.com/AdityaLab/Samay.git
This will install the latest version from the main branch.
2

Verify installation

Test that Samay is correctly installed:
from samay.model import LPTMModel
from samay.dataset import LPTMDataset

print("Samay installed successfully!")

Development Installation

If you want to contribute to Samay or customize it for your needs, follow these steps for a development installation:
1

Clone the repository

git clone https://github.com/AdityaLab/Samay.git
cd Samay
2

Install uv (recommended)

Samay uses uv for fast dependency management:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv is a fast Python package installer and resolver. It’s optional but highly recommended for development.
3

Install dependencies

uv sync --reinstall
This will create a virtual environment and install all required dependencies.
4

Activate the environment

source .venv/bin/activate  # On Linux/MacOS
# OR
.venv\Scripts\activate  # On Windows (when supported)

System Requirements

Samay is tested and supported on:
  • Python 3.11
  • Python 3.12
  • Python 3.13
Python 3.10 and earlier are not supported.
Currently supported:
  • Linux (CPU + GPU)
  • MacOS (CPU only)
Planned support:
  • Windows
  • Apple Silicon GPU
  • CPU: Any modern multi-core processor
  • RAM: Minimum 8GB (16GB+ recommended for larger models)
  • GPU: NVIDIA GPUs with CUDA support (optional but recommended)
  • Storage: At least 5GB for models and datasets
Key dependencies installed automatically:
  • PyTorch >= 2.5.1
  • transformers >= 4.47.0
  • gluonts >= 0.16.0
  • pandas >= 2.2.3
  • numpy >= 2.1.3
  • scikit-learn >= 1.5.2
  • chronos-forecasting >= 1.4.1
  • lightning >= 2.5.1
See pyproject.toml for the complete list.

GPU Support

To use Samay with GPU acceleration:
  1. Ensure you have NVIDIA drivers installed
  2. Install CUDA toolkit (version compatible with PyTorch)
  3. Samay will automatically detect and use available GPUs
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"CUDA device: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None'}")

Troubleshooting

If you encounter import errors, ensure you’re using a supported Python version:
python --version
Try reinstalling with:
pip install --force-reinstall git+https://github.com/AdityaLab/Samay.git
If GPU is not detected:
  • Verify NVIDIA drivers are installed: nvidia-smi
  • Check PyTorch CUDA compatibility
  • Reinstall PyTorch with CUDA support from pytorch.org
For large models:
  • Use smaller batch sizes
  • Enable gradient checkpointing
  • Use CPU if GPU memory is insufficient
  • Consider using smaller model variants

Next Steps

Quick Start Guide

Learn the basics with a simple forecasting example

Example Notebooks

Explore complete examples for all models

Build docs developers (and LLMs) love