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
trainer-0.0.5.tar.gz
(34.9 kB
view details)
File details
Details for the file trainer-0.0.5.tar.gz.
File metadata
- Download URL: trainer-0.0.5.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b942332471fbee3db61f042cd8ca37c187c1a0b1fe71ccf86d05d7d4fe98c8b4
|
|
| MD5 |
f62602c7a81e41393d7b493854724bce
|
|
| BLAKE2b-256 |
63b17b7d8f658aa14af2341a31f9a84e7fc65c8288f048d1c53e26e61ed38e13
|