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.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pystematic_torch-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59dbe81152d1f100bf267dca6cbc10a4933539fc07dc5d77ab1994f690dac362
MD5 1a15f78f89a8ea732ecf59084d5c1345
BLAKE2b-256 e4b287d1e97eab07bc209bd1130305124657ddf723d4e70d03a240f9c50c377b

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