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 hashes)

Uploaded Python 3

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