Separate training dependencies from the runtime package (#97)

Prepare Needle for runtime-only deployments, such as serving tool-calling requests, without requiring the full training and checkpoint-export stack.

Move training dependencies out of the base installation and expose them through a dedicated `train` extra. Preserve the GPU and Metal extras for accelerated configurations, while keeping the default runtime dependency set minimal.

Changes:
- Add the `train` optional dependency group.
- Add `requirements-train.txt` for requirements-file users.
- Update setup scripts, CI, and documentation to install or explain the training extra where needed.
- Add packaging tests verifying that training dependencies are excluded from the runtime installation and included in the training setup.

Signed-off-by: Nima Kalantar <nima.kalantar@focusrite.com>
This commit is contained in:
nimakalantar
2026-08-28 14:50:22 +01:00
committed by GitHub
parent b1554b4917
commit ee221ce7c1
9 changed files with 79 additions and 24 deletions
+3 -3
View File
@@ -20,11 +20,11 @@ fi
source "$VENV_DIR/bin/activate"
pip install --upgrade pip -q
pip install -e . -q
pip install -e ".[train]" -q
if command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi >/dev/null 2>&1; then
echo "NVIDIA GPU detected; installing jax[cuda12]..."
pip install -U "jax[cuda12]" -q
echo "NVIDIA GPU detected; installing gpu extras..."
pip install -e ".[gpu]" -q
fi
needle --help