Installation
Sage is currently intended for local editable installs. A CUDA-capable GPU is strongly recommended for on-the-fly waveform generation, training, and large injection studies.
Requirements: Python ≥ 3.9, PyTorch ≥ 2.1, CUDA (optional but recommended).
Option A — conda (recommended for GPU clusters)
The utils/environment.yml file defines the full conda environment (Python 3.11, LALSuite, PyCBC, GWpy, and JupyterLab). utils/create_env.sh automates the three-step setup: conda packages → PyTorch CUDA wheel → editable Sage install.
git clone https://github.com/nnarenraju/sage.git
cd sage/utils
bash create_env.sh
conda activate sage
Option B — pip only
git clone https://github.com/nnarenraju/sage.git
cd sage
python -m pip install -r requirements.txt
python -m pip install -e .
Note
PyTorch installation can depend on your CUDA version. If needed, install the appropriate PyTorch build first using the command from pytorch.org, then install the remaining requirements.
Verifying the installation
Run a quick smoke test to confirm the package is importable:
python -c "import sage; print('Import: OK')"
To run the full test suite:
pytest tests/ -v
For a broad syntax check across the package:
python -m py_compile $(find sage -name '*.py')