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

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

Built distribution (wheel)

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

Total release size: 125.2 kB

Release files / minitrain-0.1.4.tar.gz

Download URL minitrain-0.1.4.tar.gz
Size 57.5 kB
Tags Source
SHA-256 checksum
How to use checksums
447cab1a54cddc93aad471632286b2eba1c9ce2639432ee0a4db58c647f069f9
BLAKE2b-256 checksum
How to use checksums
8be6a3f7d3d09806d722ec3f7cf6cc02805661de41cca3062f4fce568ff2db38
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.4-py3-none-any.whl

Download URL minitrain-0.1.4-py3-none-any.whl
Size 67.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
557f0f25efebd5d23694faac7f725d0fd1b39d8142eb48ba8bae677e28021521
BLAKE2b-256 checksum
How to use checksums
ae63e2f7c527a8dd8b73ead4d18f2fb928d2f5d6707dddcd4353080256c0e31d
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.4

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