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

Metadata

Release files for coqui-trainer 0.0.5

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

Source distribution (sdist)

Source distribution for coqui-trainer 0.0.5
File Size Uploaded
coqui_trainer-0.0.5.tar.gz 33.7 kB Details

Release files / coqui_trainer-0.0.5.tar.gz

Download URL coqui_trainer-0.0.5.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
37cfab2462f5b97195ae8efdb7441adf17bda7e4faa2d243b1c31ba5562f4d42
BLAKE2b-256 checksum
How to use checksums
9b35262a116b1095959d55574a48ecb2191e72c4af69f5ed8d9be2f903d17ce1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

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