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 from the checkout with python -m pip install ., or use pip install minitrain once released on PyPI.

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 latest evaluation loss.

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("experiment.yaml")
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 older checkpoint. 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.1

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.1
File Size Uploaded Provenance Actions
minitrain-0.1.1.tar.gz 44.7 kB Without provenance Details for minitrain-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 99.3 kB

Release files / minitrain-0.1.1.tar.gz

Download URL minitrain-0.1.1.tar.gz
Size 44.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fb6504311a34fb04ba969f7ae89c7f71bc7fb6738977b24563693e6c7c8b4a99
BLAKE2b-256 checksum
How to use checksums
42497e49a5f53332ca562c48c37ef1d0ca5188870a94056cc131c942dc771375
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.1-py3-none-any.whl

Download URL minitrain-0.1.1-py3-none-any.whl
Size 54.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b64cf7e30cde7781398fa7a5755c613c0f862c6637f2adf4479a4c29c389ef3c
BLAKE2b-256 checksum
How to use checksums
45332064c0b6c8c49a127e8d16c90ea254c6cee838530f01c02206cad0218bda
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.1

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