Skip to content

Start every project ready to publish

A Copier template for ML research — PyTorch or JAX, typed configs, uv — with multi-seed significance testing and copier update baked in.

Get started 15-minute tutorial Why this stack

uv tool install copiercopier copy --trust gh:loevlie/ml-research-template my-project🎤 project_name? Wine Quality
🎤 framework? pytorch
🎤 logger? wandb
"Wine Quality" is ready at my-projectcd my-projectuv run python src/wine_quality/train.pyEpoch 0 | train_loss=2.3055 | val_loss=2.2940 | val_acc=0.0850

Ten prompts, thirty seconds: git initialized, dependencies locked, pre-commit installed, training.

What you get

  • An explicit training loop


    ~60 readable lines on Lightning Fabric — device placement, mixed precision, and DDP without a Trainer black box. Resume, LR scheduling, gradient accumulation, and clipping are wired in and config-driven. Prefer JAX? framework=jax swaps the core, keeps everything else.

    Train & experiment

  • Statistical rigor on day one


    Multi-seed launchers (local + SLURM array) and an aggregator with bootstrap CIs, paired Wilcoxon/t-tests, and Cohen's d. Publication-ready numbers, not single-seed anecdotes.

    Multi-seed statistics

  • Typed configs, Hydra-style CLI


    pydantic schemas your IDE checks, with the familiar experiment=x loss=contrastive model.lr=1e-3 syntax kept — typos die at parse time with a suggestion, not at epoch 40.

    Typed configs & overrides

  • SLURM-native, preemption-proof


    Sweeps and Optuna searches fan out as job arrays via submitit; sbatch scripts cover the rest. Preempted jobs requeue into the same run directory and continue from last.ckpt.

    Run on SLURM

  • Domain flavors


    tabular: OpenML tasks, an sklearn-estimator wrapper, TabPFN/TabICL baselines, and a code-version-aware cached benchmark harness. multimodal: timm / open_clip / HF datasets and a CLIP-style objective.

    Tabular benchmarking

  • copier update


    Pull template improvements into existing projects without clobbering your code — the compounding win across a PhD's worth of projects. Runtime shape checking (jaxtyping + beartype) rides along everywhere.

    Updating projects

Is it for you?

Use it if you…

  • start more than one project — copier update compounds
  • want every paper number backed by seeds + significance tests
  • edit training loops weekly and want to read yours
  • run on a SLURM cluster (or will soon)

Skip it if you…

  • want a callback-driven Trainer — use lightning-hydra-template
  • work in TensorFlow
  • don't want to own the CLI code (one ~250-line file you can read)
  • need multi-node pretraining scaffolding — crib torchtitan