Skip to main content

A framework that helps you setup and run reproducible experiments in python.

Project description

https://img.shields.io/pypi/pyversions/pystematic?style=for-the-badge https://img.shields.io/pypi/v/pystematic?style=for-the-badge https://img.shields.io/github/workflow/status/evalldor/pystematic/Test?style=for-the-badge https://readthedocs.org/projects/pystematic/badge/?style=for-the-badge

Pystematic is a lightweight framework that helps you to systematically setup and run reproducible computational experiments in python.

Main features:

  • Standardizes how experiments and associated parameters are defined.

  • Provides both CLI and programmatic interfaces for running your experiments.

  • Encourages reproducibility by isolating experiment outputs and providing tools for managing random seeds.

Quickstart

Installation

pystematic is available on pypi, and can be installed with your package manager of choice.

If using poetry:

$ poetry add pystematic

or with pip:

$ pip install pystematic

Defining and running experiments

Experiments and parameters are defined by decorating the main function of the experiment. The following example defines an experiment named hello_world with a single parameter name:

import pystematic as ps

@ps.parameter(
    name="name",
    help="The name to greet.",
)
@ps.experiment
def hello_world(params):
    print(f"Hello {params['name']}!")

You can run the experiment either by supplying a dict containing the values for the parameters:

hello_world.run({
    "name": "World",
})

or you can run the experiment from the command line by invoking the cli() method of the experiment:

if __name__ == "__main__":
    hello_world.cli()

Then from the terminal you simply run:

$ python path/to/file.py --name "World"

Documentation

Full documentation is available at https://pystematic.readthedocs.io.

Extensions

For running machine learning experiments in pytorch check out the pystematic-torch plugin.

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

Uploaded Python 3

File details

Details for the file pystematic-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: pystematic-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.2 CPython/3.8.13 Linux/5.15.0-1014-azure

File hashes

Hashes for pystematic-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40162fb9918d6baa896c7ad5df4e87f087e4e528287a83e79be6bb232de61616
MD5 a602524fa20b98a2625577ce4dfb9eda
BLAKE2b-256 8b98af58eb94ff2901e166079914ea7cb673e9ee8ebbe9d81f4c0fbd6d39b086

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