Skip to main content

👟 Trainer

An opinionated general purpose model trainer on PyTorch with a simple code base.

Installation

From Github:

git clone https://github.com/coqui-ai/Trainer
cd Trainer
make install

From PyPI:

pip install trainer

Prefer installing from Github as it is more stable.

Implementing a model

Subclass and overload the functions in the TrainerModel()

Training a model

See the test script here training a basic MNIST model.

Training with DDP

$ python -m trainer.distribute --script path/to/your/train.py --gpus "0,1"

We don't use .spawn() to initiate multi-gpu training since it causes certain limitations.

  • Everything must the pickable.
  • .spawn() trains the model in subprocesses and the model in the main process is not updated.
  • DataLoader with N processes gets really slow when the N is large.

Supported Experiment Loggers

To add a new logger, you must subclass BaseDashboardLogger and overload its functions.

Release files for trainer4win 0.0.7

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

Source distribution (sdist)

Source distribution for trainer4win 0.0.7
File Size Uploaded
trainer4win-0.0.7.tar.gz 35.4 kB Details

Built distribution (wheel)

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

Total release size: 75.6 kB

Release files / trainer4win-0.0.7.tar.gz

Download URL trainer4win-0.0.7.tar.gz
Size 35.4 kB
Tags Source
SHA-256 checksum
How to use checksums
42e6b8ae8445d41ae85314746a7733eb299efdc9ab20661a562f29f0b466f270
BLAKE2b-256 checksum
How to use checksums
3c95de32fc4838cd502ed82cc8f53e6f3bd2ce5c9805d0ff6bd7c6b3b0ba6fe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release files / trainer4win-0.0.7-py3-none-any.whl

Download URL trainer4win-0.0.7-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff53185e092801f86d83d82d796035158b211516bdbe61904122659b0df002be
BLAKE2b-256 checksum
How to use checksums
c8026c7695cd862dcbeeb835503c1c1c6eb4abfd327c830a3f635c272eb0e049
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.5

2 release files

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