Skip to main content

Pystematic plugin for running pytorch experiments.

Project description

A pystematic plugin for running experiments in pytorch.

This is an extension to pystematic that adds functionality related to running machine learning experiments in pytorch. Its main contribution is the ContextObject and related classes. Which provides an easy way to manage all pytorch related objects.

Documentation is in the works.

Quickstart

Installation

All you have to do for pystematic to find the plugin is to install it:

$ pip install pystematic-torch

Context objects

When you are developing a model in pytorch, you often want to be able to train the model in many different settings, such as multi-node distributed, single gpu or even just on the cpu depending on your work location and on available resources. The main purpose of the context object is to allow you to transition seamlessly between these different modes of training, without changing your code.

If you are familiar with the torch.nn.Module object, you know that whenever you add a paramater to the object, it gets registered with it, and when you want to move the model to another device, you simply call module.cuda() or module.cpu() to move all paramters registered with the module.

A context object is like a torch module on steroids. You are meant to register every object important to your training session with it, e.g. models, optimizers, epoch counter etc. This also gives the benefit of easily saving and restoring the state of your session.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pystematic_torch-0.1.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file pystematic_torch-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pystematic_torch-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.4.0-80-generic

File hashes

Hashes for pystematic_torch-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 95b608bdab6fd7d106933e3a69e40395f40341e964c8b455d30140490db1f63b
MD5 e35531d100d812137cd081e8cf941daf
BLAKE2b-256 84473f385443a7341e185a316fbc8c3b12251b1718715605adb25dcd399cb194

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