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.3

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.3
File Size Uploaded Provenance Actions
minitrain-0.1.3.tar.gz 57.5 kB Without provenance Details for minitrain-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 125.2 kB

Release files / minitrain-0.1.3.tar.gz

Download URL minitrain-0.1.3.tar.gz
Size 57.5 kB
Tags Source
SHA-256 checksum
How to use checksums
618f8d41fb99fb6bf688ba2b5e80ca0ca409c3c925fe05aef8b33074a2f7e1b7
BLAKE2b-256 checksum
How to use checksums
27c9b863a3b8336c06b569501fcc1ce77d9e296131f319007dad49fe8b62c897
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.3-py3-none-any.whl

Download URL minitrain-0.1.3-py3-none-any.whl
Size 67.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45284c1e6872e4a49657b7ae2a57a57cdee03654a86473b69b916f3c2a1b36b7
BLAKE2b-256 checksum
How to use checksums
9497ac9f9bc1d5a4b6c184417203f2b77e27d55a7e990bf19d7be173a13d776a
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.3

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