param087/agent-ml-skills/reproducible-ml

Claude Code and agent skill by param087/agent-ml-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when an ML result must be reproducible — fixing seeds, pinning environments, versioning data, and structuring projects so runs can be exactly recreated. Covers determinism gotchas across NumPy, PyTorch, and CUDA.

Install

npx vskill@latest install param087/agent-ml-skills/reproducible-ml

SKILL.md

The same SKILL.md was published earlier as param087/agent-ml-skills/reproducible-ml.

Reproducible ML

Overview

Reproducibility means: same code + same data + same config → same result. It is a prerequisite for trusting comparisons, debugging regressions, and shipping. Three pillars: seed everything, pin everything, version the data.

When to use

  • Results vary run-to-run.
  • Setting up a new project or research codebase.
  • Preparing work others must reproduce (papers, audits, reviews).

Pillar 1 — Seed everything

python
import os, random, numpy as np, torch
def seed_everything(seed: int = 42):
os.environ["PYTHONHASHSEED"] = str(seed)
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False # disables nondeterministic autotuner

For DataLoaders, also set worker_init_fn and a generator so workers are deterministic.

Pillar 2 — Pin the environment

  • Pin exact versions: requirements.txt with ==, or uv.lock / poetry.lock / conda env export.
  • Record Python + CUDA + cuDNN versions in the run metadata.
  • Containerize (Docker) for cross-machine reproducibility.

Pillar 3 — Version the data

  • Hash datasets (sha256) and log the hash with every run.
  • Use DVC or dataset snapshots; never overwrite data.csv in place.
  • Treat data as immutable inputs keyed by version (data_v="2026-06-01").

Project layout that supports reproducibility

project/
├── data/ # raw (immutable) + processed, both versioned
├── src/ # importable code, no notebooks doing real work
├── configs/ # YAML/Hydra configs, one per experiment
├── scripts/ # entrypoints: train.py, evaluate.py
├── requirements.txt # or uv.lock / poetry.lock (pinned)
└── README.md # exact commands to reproduce

Determinism gotchas

  • GPU reductions can be nondeterministic even with seeds — use torch.use_deterministic_algorithms(True) and set CUBLAS_WORKSPACE_CONFIG=:4096:8.
  • Parallel groupby/apply ordering can vary — sort before reducing.
  • set/dict ordering across processes — set PYTHONHASHSEED.
  • Non-pinned dependencies silently change behavior between installs.

Pitfalls

  • Seeding only NumPy but using PyTorch/CUDA RNGs.
  • "Works on my machine" — unpinned env + unversioned data.
  • Doing real computation in notebooks with hidden execution order — move logic to src/.

Hand-off

A repo where pip install -r requirements.txt && python scripts/train.py --config configs/exp.yaml recreates the exact result that experiment-tracking logged.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
11
7-day trend score
12

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/param087/agent-ml-skills/reproducible-ml/badge)](https://verified-skill.com/skills/param087/agent-ml-skills/reproducible-ml)

Something wrong with this skill or its page? Tell us.