AboutWhat I doProjectsLabContact

Environment and reproducibility

mlenv

Snapshot the ML stack to a file and diff two snapshots.

mlenv-cli on PyPImlenv-cli downloads per monthmlenv CI statusMIT license0 downloads/month on PyPI

Install

pip install mlenv-cli

If you use uv, also as an isolated CLI:

uv tool install mlenv-cli

What 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.39

Features

  • Python, platform, packages, CUDA, cuDNN and GPUs.
  • Diff with the dangerous changes ranked first.
  • Optional GPU capture through NVML.
  • CI gate and JSON output.
View the code on GitHub

Other tools

hola@jmwebsoluciones.com