# DatasetMaker — Python classifier + training dependencies.
#
# Requires Python 3.10+ (3.10.9 is what the release was tested with).
#
# Install into a virtualenv next to DatasetMaker.exe so the app finds it
# automatically (.venv\Scripts\python.exe):
#   python -m venv .venv
#   .venv\Scripts\python -m pip install -r py\requirements.txt
#
# GPU (NVIDIA): the default `torch` wheel from PyPI on Windows is CPU-only.
# For CUDA, install torch FIRST from the PyTorch index matching your driver,
# then the rest of this file (pip will keep the CUDA build):
#   .venv\Scripts\python -m pip install torch --index-url https://download.pytorch.org/whl/cu124
#   .venv\Scripts\python -m pip install -r py\requirements.txt
# The worker falls back to CPU automatically if CUDA is missing or unusable;
# set PETRIFY_DEVICE=cpu to force it.
#
# The CLIP model (~1.7 GB for ViT-L/14) downloads from huggingface.co on the
# first classify and is cached under %USERPROFILE%\.cache\huggingface (move it
# with the HF_HOME environment variable).
#
# Ranges are bounded on both sides: feature values can shift between library
# releases (scikit-image's GLCM internals especially), which would silently
# move petrify scores. Tested set (2026-10):
#   Pillow 11.3.0, ImageHash 4.3.2, numpy 2.2.6, scikit-image 0.25.2,
#   scikit-learn 1.7.2, torch 2.14.1, transformers 4.57.6
# For bit-for-bit reproducibility, `pip freeze > requirements.lock` after a
# known-good install and ship that instead.

# Core image handling (worker, worker_general, every training step)
Pillow>=10.0,<12.0
ImageHash>=4.3,<5.0

# Heuristic features (image_features.py / petrify.py)
numpy>=1.24,<3.0
scikit-image>=0.22,<0.26

# CLIP (worker + probe training/eval)
torch>=2.1,<3.0
transformers>=4.40,<5.0

# Probe training / evaluation only (train_clip_probe, tune_blend, eval_probe).
# The worker never imports sklearn; it scores the probe with plain numpy.
scikit-learn>=1.3,<2.0
