Skip to main content

Catalyst. High-level utils for PyTorch DL & RL research.

Project description

Catalyst

Build Status License Pipi version Docs

Catalyst logo

High-level utils for PyTorch DL & RL research. It was developed with a focus on reproducibility, fast experimentation and code/ideas reusing. Being able to research/develop something new, rather then write another regular train loop.

Break the cycle - use the Catalyst!


Catalyst is compatible with: Python 3.6+. PyTorch 0.4.1+.

API documentation and an overview of the library can be found here.

In the examples folder of the repository, you can find advanced tutorials and Catalyst best practices.

Installation

pip install catalyst

Overview

Catalyst helps you write compact but full-featured DL & RL pipelines in a few lines of code. You get a training loop with metrics, early-stopping, model checkpointing and other features without the boilerplate.

Features

  • Universal train/inference loop.
  • Configuration files for model/data hyperparameters.
  • Reproducibility – even source code will be saved.
  • Callbacks – reusable train/inference pipeline parts.
  • Training stages support.
  • Easy customization.
  • PyTorch best practices (SWA, AdamW, 1Cycle, FP16 and more).

Structure

  • DL – runner for training and inference, all of the classic machine learning and computer vision metrics and a variety of callbacks for training, validation and inference of neural networks.
  • RL – scalable Reinforcement Learning, actor-critic off-policy continuous actions space algorithms and their improvements with distributed training support.
  • contrib - additional modules contributed by Catalyst users.
  • data - useful tools and scripts for data processing.

Getting started: 30 seconds with Catalyst

import torch
from catalyst.dl.experiments import SupervisedRunner

# experiment setup
logdir = "./logdir"
n_epochs = 42

# data
loaders = {"train": ..., "valid": ...}

# model, criterion, optimizer
model = Net()
criterion = torch.nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(model.parameters())

# model runner
runner = SupervisedRunner()

# model training
runner.train(
    model=model,
    criterion=criterion,
    optimizer=optimizer,
    loaders=loaders,
    logdir=logdir,
    n_epochs=n_epochs,
    verbose=True
)

Docker

Please see the docker folder for more information and examples.

Contribution guide

We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.

Please see the contribution guide for more information.

Project details


Release history Release notifications | RSS feed

This version

19.3

Download files

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

Source Distribution

catalyst-19.3.tar.gz (81.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

catalyst-19.3-py2.py3-none-any.whl (121.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file catalyst-19.3.tar.gz.

File metadata

  • Download URL: catalyst-19.3.tar.gz
  • Upload date:
  • Size: 81.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for catalyst-19.3.tar.gz
Algorithm Hash digest
SHA256 d1088796c860361c5a3cf18ea82302a394a0219e7b65dedc6d52db582822f57a
MD5 0ad6fb159a9a90bd5584185bff7377e0
BLAKE2b-256 7f4541167b850f20971efe13bf25fc34212bac54e60f9501088d4b3da34d59cb

See more details on using hashes here.

File details

Details for the file catalyst-19.3-py2.py3-none-any.whl.

File metadata

  • Download URL: catalyst-19.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 121.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for catalyst-19.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7a0f7b095ded5293196383bb2fb4af74f786368eaf56468b9ccade4cb9df94c8
MD5 5e1d90b0c25bcb5c89af3044f0d632ec
BLAKE2b-256 5589309b714d048f6cc112884e7bc60991f8c087fe43dd3c4e763a5ec03cede3

See more details on using hashes here.

Supported by

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