General purpose model trainer for PyTorch that is more flexible than it should be, by 🐸Coqui.
Project description
👟 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
- Tensorboard - actively maintained
- ClearML - actively maintained
- MLFlow
- Aim
- WandDB
To add a new logger, you must subclass BaseDashboardLogger and overload its functions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coqui_trainer-0.0.5.tar.gz
(33.7 kB
view details)
File details
Details for the file coqui_trainer-0.0.5.tar.gz
.
File metadata
- Download URL: coqui_trainer-0.0.5.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37cfab2462f5b97195ae8efdb7441adf17bda7e4faa2d243b1c31ba5562f4d42 |
|
MD5 | ef3d6cb8833c8770d72369a84df089c3 |
|
BLAKE2b-256 | 9b35262a116b1095959d55574a48ecb2191e72c4af69f5ed8d9be2f903d17ce1 |