Metadata-Version: 2.1
Name: pystematic-torch
Version: 0.1.1
Summary: Pystematic plugin for running pytorch experiments.
Home-page: https://github.com/evalldor/pystematic-torch
License: MIT
Author: E.Valldor
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering
Requires-Dist: matplotlib (>=3.4.3,<4.0.0)
Requires-Dist: numpy (>=1.21.1,<2.0.0)
Requires-Dist: pystematic (>=1.0.0,<2.0.0)
Requires-Dist: tensorboardX (>=2.4,<3.0)
Requires-Dist: torch (>=1.9.0,<2.0.0)
Requires-Dist: torchvision (>=0.10.0,<0.11.0)
Requires-Dist: tqdm (>=4.62.1,<5.0.0)
Project-URL: Repository, https://github.com/evalldor/pystematic-torch
Description-Content-Type: text/x-rst

A `pystematic <https://github.com/evalldor/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:

.. code-block:: 

    $ 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.



