Skip to content

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repro Lens

Repro Lens

Your refactor runs twice. Did it keep the same results?

Checks Latest Release Python 3.11+ License GitHub stars


Explore Demo · Examples · Contribute


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.

🚀 See it in action

Repro Lens Demo Animation

Check for reproducibility risks, verify runs, and compare outputs instantly.

✨ Why Repro Lens?

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, and Lightning.
  • Agent ready: Out-of-the-box skills to let your AI coding assistant audit and fix reproducibility issues autonomously.

🛠️ Core Commands

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)

📦 Quickstart

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/project

Example output:

train_test_split(X, y)  # ❌ R101: no explicit random_state

Try a complete experiment validation:

repro-lens init repro-demo --name repro_demo
cd repro-demo
uv sync --locked
repro-lens verify

🤖 AI Coding Agents & pre-commit

Pre-commit hook: Prevent reproducibility issues from being committed.

repos:
  - repo: https://github.com/00200200/repro-lens
    rev: v0.3.1
    hooks:
      - id: repro-lens

Coding 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."

📚 Learn More


If you find Repro Lens useful, please consider starring the repository! ⭐

Releases

Packages

Used by

Contributors

Languages