Skip to main content

minitrain

Mini-models. Mini-data. Uni-recipe.

Run small-scale machine learning experiments from YAML or JSON recipes.

Quickstart

Use Python 3.10 or newer. Install with pip install minitrain from PyPI or python -m pip install . from the checkout. The examples below follow the checkout.

minitrain classification/cifar10-resnet20
minitrain path/to/experiment.yaml

Missing data files are downloaded automatically. Use minitrain --help to list the bundled presets. During training, one terminal progress bar shows the elapsed time, estimated time left, epoch, optimizer step, training loss, and the latest evaluation loss when available.

For GPU training, install a PyTorch build that supports your GPU. V100 needs a build with Volta kernels, such as a compatible CUDA 12.6 wheel.

Train from Python

import minitrain

recipe = minitrain.load_recipe("classification/cifar10-resnet20")
recipe.trainer.epochs = 2
trainer = minitrain.Trainer(recipe)
run = trainer.train(train_dataset, model, validation_dataset=validation_dataset)
scores = trainer.evaluate(test_dataset, model)

Pass your own PyTorch model and datasets or DataLoaders. For a quick run, use minitrain.Trainer(task="classification", epochs=2, batch_size=32). See the Python recipe guide for inputs, output paths, and DDP.

Inference

import minitrain

model = minitrain.load_model("outputs/cifar10/last.ckpt")

Built-in models load by checkpoint alone, in evaluation mode on CPU. The loader prefers EMA weights when available. Use device="cuda" for GPU inference, use_ema=False for regular weights, or model=YourModel(...) for a custom architecture or a checkpoint without model configuration. Apply the recipe’s evaluation preprocessing to classifier inputs.

For development, run python -m pip install -e . and python -m unittest discover -v.

Metadata

Release files for minitrain 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minitrain 0.1.2
File Size Uploaded Provenance Actions
minitrain-0.1.2.tar.gz 47.8 kB Without provenance Details for minitrain-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for minitrain 0.1.2
File Interpreter ABI Platform Actions
minitrain-0.1.2-py3-none-any.whl Python 3 none any Details for minitrain-0.1.2-py3-none-any.whl

Total release size: 106.2 kB

Release files / minitrain-0.1.2.tar.gz

Download URL minitrain-0.1.2.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c9a1fce9da597290b14cfc521a02f2a22bbbb0688aee32816fcf16fd00626210
BLAKE2b-256 checksum
How to use checksums
a0aa3c133dd41f4f47cf6ff612e780887ec02211240f9f99f2153a6af1963900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / minitrain-0.1.2-py3-none-any.whl

Download URL minitrain-0.1.2-py3-none-any.whl
Size 58.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d4ebf3c7d5e46654f6c9c56305ee045c53de59657e46a2a102a5cc72c962f5
BLAKE2b-256 checksum
How to use checksums
3bf3adec8addb204f5ae58497e8891cf0e95d750bb5faba9130d866e51ed18ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for minitrain 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page