Catch reproducibility risks before a commit, replay an experiment, and compare outputs before and after a change. Built for ML developers and AI coding agents.
Machine Learning code is notorious for silent reproducibility failures. Repro Lens statically analyzes your ML code to find non-deterministic behavior and verifies that refactors preserve your exact outputs.
- Zero overhead: Static analysis takes milliseconds. No ML dependencies or API keys required.
- Broad support: Native rules for
scikit-learn,XGBoost,LightGBM,PyTorch,TensorFlow, andLightning. - Agent ready: Out-of-the-box skills to let your AI coding assistant audit and fix reproducibility issues autonomously.
| Command | Question it answers | Evidence |
|---|---|---|
repro-lens check |
Is there a known reproducibility risk in this code? | Static findings with file locations |
repro-lens verify |
Do two runs produce matching declared outputs? | Metrics, artifact hashes, logs |
repro-lens compare |
Did the edit preserve the baseline outputs? | Output differences (ideal for refactors) |
Install using uv (or pip):
uv tool install 'git+https://github.com/00200200/repro-lens.git@v0.3.1'Scan your project instantly:
repro-lens check --root /path/to/projectExample output:
train_test_split(X, y) # ❌ R101: no explicit random_stateTry a complete experiment validation:
repro-lens init repro-demo --name repro_demo
cd repro-demo
uv sync --locked
repro-lens verifyPre-commit hook: Prevent reproducibility issues from being committed.
repos:
- repo: https://github.com/00200200/repro-lens
rev: v0.3.1
hooks:
- id: repro-lensCoding Agents: Equip your LLMs with the Reproducibility Skill to automatically fix non-deterministic ML code.
"Use the reproducibility skill to refactor this training script while preserving its declared outputs."
