37 GB
4,042,753 files
Updated about 1 month ago
Name
Size
.codex-plugin
.github
assets
docs
examples
scripts
site
skills
src
templates
tests
tools
.gitattributes19 Bytes
xet
.gitignore104 Bytes
xet
.pre-commit-config.yaml531 Bytes
xet
.pre-commit-hooks.yaml334 Bytes
xet
.python-version5 Bytes
xet
AGENTS.md1.81 kB
xet
AGENTS.md._index.json1.6 kB
xet
CHANGELOG.md5.1 kB
xet
CODE_OF_CONDUCT.md785 Bytes
xet
CONTRIBUTING.md2.25 kB
xet
LICENSE1.08 kB
xet
README.md4.12 kB
xet
SECURITY.md535 Bytes
xet
_index.codex-plugin.json1.1 kB
xet
_index.plugin.json309 Bytes
xet
_source.codex-plugin.json538 Bytes
xet
action.yml2.89 kB
xet
pyproject.toml963 Bytes
xet
uv.lock32.9 kB
xet
README.md
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)
repro-lens agent-review What should an agent do with the before/after evidence? Machine-readable verdict and risk assessment
repro-lens lsp Can I see reproducibility findings while editing? Standard LSP diagnostics for Python documents

๐Ÿ“ฆ 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

Preview automated fixes or apply them in-place:

repro-lens check --diff      # preview unified diff with suggested seeds
repro-lens check --fix       # apply suggested seeds in-place

Try a complete experiment validation:

repro-lens init repro-demo --name repro_demo  # or --template pytorch
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! โญ
Total size
37 GB
Files
4,042,753
Last updated
Oct 24
Pre-warmed CDN
US EU US EU

Contributors