Environment and reproducibility
mlenv
Snapshot the ML stack to a file and diff two snapshots.
Install
pip install mlenv-cliIf you use uv, also as an isolated CLI:
uv tool install mlenv-cliWhat it does
The classic "it trained on my machine" usually comes down to something that moved: the CUDA build behind PyTorch, a minor Python bump, a driver. mlenv captures all of it in one JSON you can commit and compare.
In action
A real recorded session of the CLI running.
Read it as text
python key value version 3.12.3 implementation CPython executable /home/delcenjo/jmweb-org/mlenv/.venv/bin/python3 platform key value system Linux release 6.17.0-35-generic machine x86_64 libc glibc 2.39 packages key value annotated-doc 0.0.4 coverage 7.14.3 iniconfig 2.3.0 markdown-it-py 4.2.0 mdurl 0.1.2 mlenv 0.2.0 mlenv-cli 0.2.0 packaging 26.2 pluggy 1.6.0 pygments 2.20.0 pytest 9.1.1 pytest-cov 7.1.0 rich 15.0.0 ruff 0.15.20 shellingham 1.5.4 typer 0.26.8
$ mlenv show
python
key value
version 3.12.3
implementation CPython
platform
key value
system Linux
release 6.17.0-35-generic
machine x86_64
libc glibc 2.39Features
- —Python, platform, packages, CUDA, cuDNN and GPUs.
- —Diff with the dangerous changes ranked first.
- —Optional GPU capture through NVML.
- —CI gate and JSON output.