Skip to main content

A reproducibility auditor for ML repositories

Project description

reprolint

A reproducibility auditor for machine learning repositories. reprolint statically analyzes a codebase using AST parsing and literature-backed checks to produce a scored reproducibility report — identifying missing seeds, unpinned dependencies, hardcoded paths, non-deterministic operations, untracked data, and missing environment captures.

Works as a CLI tool on local directories or public GitHub URLs, and integrates with GitHub Actions as a CI reproducibility gate.

Installation

uv tool install "git+https://github.com/YashTandon05/reprolint.git"

Usage

Audit a local repository

reprolint /path/to/your/ml/project

Audit a public GitHub repository

reprolint https://github.com/user/repo

Use as a CI gate (fail if score is below threshold)

reprolint . --min-score 60 --fail

Save the report to a file

reprolint . --output report.txt

Example output

reprolint — auditing myproject/

┌──────────────────────────┬───────────────┬────────┬───────┐
│ Check                    │ Category      │ Result │ Score │
├──────────────────────────┼───────────────┼────────┼───────┤
│ Random seeds             │ Stochasticity │ PASS   │ 25/25 │
│ Dependency pinning       │ Environment   │ FAIL   │  7/20 │
│ Hardcoded paths          │ Code Quality  │ PASS   │ 15/15 │
│ Deterministic execution  │ Stochasticity │ FAIL   │  0/15 │
│ Data tracking            │ Data Integrity│ PASS   │ 15/15 │
│ Environment capture      │ Environment   │ FAIL   │  0/10 │
└──────────────────────────┴───────────────┴────────┴───────┘

Category breakdown
  Environment      ███░░░░░░░  7/30   (23%)
  Stochasticity    ████████░░  25/40  (63%)
  Data Integrity   ██████████  15/15  (100%)
  Code Quality     ██████████  15/15  (100%)

Overall score: 52/100
MODERATE — some reproducibility risk

Findings
  [HIGH] 'torch>=2.0' is loose (not exactly pinned).
        fix: Pin to an exact version (e.g. 'pkg==1.2.3') or commit a lock file.
  [HIGH] A deep-learning framework is used but deterministic mode is never enabled.
        fix: Call torch.use_deterministic_algorithms(True).
  [HIGH] No environment capture found.
        fix: Add a Dockerfile or environment.yml.

Checks

Each check is grounded in peer-reviewed literature or established conference reproducibility checklists.

Check Category Max Score Reference
Random seeds Stochasticity 25 AAAI-25 Reproducibility Checklist
Dependency pinning Environment 20 AAAI-25 Checklist; Sculley et al. (2015)
Hardcoded paths Code Quality 15 Sculley et al. (2015)
Deterministic execution Stochasticity 15 PyTorch reproducibility docs
Data tracking Data Integrity 15 Sculley et al. (2015); Raff (2019)
Environment capture Environment 10 AAAI-25 Checklist; Raff (2019)

Scores are aggregated into a weighted total out of 100. Category weights reflect findings from Raff (2019), which showed that not all reproducibility factors are equally predictive.

GitHub Actions integration

Add this to your repository at .github/workflows/reprolint.yml to enforce a reproducibility threshold on every push and pull request:

name: Reproducibility Audit

on:
  push:
    branches: ["main", "master"]
  pull_request:
    branches: ["main", "master"]

jobs:
  reprolint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v4

      - name: Install reprolint
        run: uv tool install "git+https://github.com/YashTandon05/reprolint.git"

      - name: Run reproducibility audit
        run: reprolint . --min-score 60 --fail

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reprolint-0.1.0.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reprolint-0.1.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file reprolint-0.1.0.tar.gz.

File metadata

  • Download URL: reprolint-0.1.0.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for reprolint-0.1.0.tar.gz
Algorithm Hash digest
SHA256 26fcc2dc8e0acf480d707d18d28c41df95c0663dd34b6af819325a802d989bfe
MD5 722120e93246b7c0779c81b5eb77ef7d
BLAKE2b-256 8c3d829759fcc5693486c5637255a0174966b90cf55a5ac6e12af2b5c7ff0dd0

See more details on using hashes here.

File details

Details for the file reprolint-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: reprolint-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for reprolint-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16602257ed96228d3397f3a5691f805d5d7d45e0febea894899bd8b761b27093
MD5 a7224e31aae5323afabdd4e8501581d6
BLAKE2b-256 07abd003244886037dd700b1333a04758342b55ee6e0dbd7bceb26b93d675ab4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page