Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trainer4win-0.0.7.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

trainer4win-0.0.7-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file trainer4win-0.0.7.tar.gz.

File metadata

  • Download URL: trainer4win-0.0.7.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for trainer4win-0.0.7.tar.gz
Algorithm Hash digest
SHA256 42e6b8ae8445d41ae85314746a7733eb299efdc9ab20661a562f29f0b466f270
MD5 084defe68779d9312050f82dea775493
BLAKE2b-256 3c95de32fc4838cd502ed82cc8f53e6f3bd2ce5c9805d0ff6bd7c6b3b0ba6fe9

See more details on using hashes here.

File details

Details for the file trainer4win-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: trainer4win-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for trainer4win-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ff53185e092801f86d83d82d796035158b211516bdbe61904122659b0df002be
MD5 833d36a1744679b9e40990150cf77a88
BLAKE2b-256 c8026c7695cd862dcbeeb835503c1c1c6eb4abfd327c830a3f635c272eb0e049

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page