Skip to main content

A deep learning framework and automation tool built on top of PyTorch

Project description

Introduction

TorchAssistant is a deep learning framework built on top of PyTorch. It provides a set of tools to automate the training and evaluation of models. It also reduces the amount of trivial code one usually needs to write.

Just create a specification file configuring the training session and let the framework do everything else for you.

Main features:

  • scripts for training, evaluation, and inference
  • automatically calculating metrics
  • automatically saving training session
  • resuming the interrupted training session
  • automatically saving metrics history to CSV files
  • nicely formatted information about the training session: epoch, iteration, loss, metrics, etc.
  • highly flexible and customizable
  • support for building complex training pipelines

Status: Early development stage

This project is in the early stage of development. Features and functionality provided here are subject to change. Furthermore, the code is not yet extensively tested and may contain bugs.

Prerequisites

This project has dependencies that require separate installation:

  • PyTorch (version >= 1.10.1, < 2.0)
  • Torchvision (version >= 0.11.2, < 0.12)
  • TorchMetrics (version >= 0.7.2 < 0.8)

When possible, try to follow the recommended version range specified in parentheses.

You can install PyTorch and Torchvision together from here. And you install TorchMetrics from here.

Installation

pip install torchassistant

Examples

The examples directory contains projects that demonstrate how to use TorchAssistant to train different kinds of neural networks.

Documentation

You can find all the documentation for the project here.

Usage

Create a new training session configured by a training spec file:

tainit <path_to_specification_file>

It should create a training session folder in a location specified in a spec file.

Start training (pass a location of the training session folder as an argument):

tatrain <path_to_training_session_folder>

The script automatically saves the states of all models and optimizers at the end of every training epoch. That means that you may safely interrupt this script. You can then resume training picking up from where you left off by executing the above command.

Compute metrics on a trained model (pass a path to a specification file for evaluation):

taevaluate <path_to_evaluation_specification_file>

The script expects the specification file to contain the location of the training session directory.

Test model predictions on your data:

tainfer <path_to_inference_specification_file> input1 input2 ... inputn

The first argument is the path to the specification file for inference. The rest are a variable number of user inputs. Usually, for each of those inputs, you have to write a converter class that specifies how to turn them into a format consumable by the prediction pipeline.

To learn more about the details of the format of different specification files, see the section on the specification in the documentation.

License

This project has an MIT license.

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

torchassistant-0.1.0.tar.gz (44.3 kB view details)

Uploaded Source

Built Distribution

torchassistant-0.1.0-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file torchassistant-0.1.0.tar.gz.

File metadata

  • Download URL: torchassistant-0.1.0.tar.gz
  • Upload date:
  • Size: 44.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.0 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.0.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9

File hashes

Hashes for torchassistant-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8a60ecedb1dfab61558beda81b72ec6271f2f60414a9c8e9c7d12c2924465a4
MD5 968ade64879e241012d1bc462150ef3e
BLAKE2b-256 96377b4f54c5ddde53fcc8c54a7e9eba56792541514c313e93c7374d30da4b7d

See more details on using hashes here.

File details

Details for the file torchassistant-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: torchassistant-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.0 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.0.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9

File hashes

Hashes for torchassistant-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8176b1a0037a4931e6aa5b458652d699dd2c224f839924692cbd79d4b6665a6b
MD5 a8394e4b243bc6af2f4dd7f5b8b5e9ef
BLAKE2b-256 682faa6354ce518ed4a24494d00d922e446791909d2a5416e96a86fb8cd92943

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