Skip to main content

Python Experiment Suite

PyExperimentSuite is an open source software tool written in Python, that supports scientists, engineers and others to conduct automated software experiments on a large scale with numerous different parameters.

It reads parameters (or ranges of parameters) from a configuration file, runs the experiments using multiple cores if desired and logs the results in files. Parameter combinations can be evaluated as a grid (each combination of parameters) or in a list (try several defined parameter combinations in row). PyExperimentSuite also supports continuing any experiments where left off when the execution was interrupted (e.g. power failure, process was killed, etc.). The experiment results can be obtained in different ways by a built-in Python interface.

For more information, see the documentation for instructions.

Installation

Install the expsuite package via pip:

pip install expsuite

Basic Usage Example

Create a new Python file (e.g. suite.py) and define a class that inherits from PyExperimentSuite. Within the class, implement the two methods reset() and iterate(). Also add the main script execution code at the bottom (last 3 lines below).

from expsuite import PyExperimentSuite

class MySuite(PyExperimentSuite):
    def reset(self, params, rep):
        """for this basic example, nothing needs to be loaded or initialized."""
        pass

    def iterate(self, params, rep, n):
        """this function does nothing but access the two parameters alpha and
        beta from the config file experiments.cfg and returns them for the
        log files, together with the current repetition and iteration number.
        """
        # access the two config file parameters alpha and beta
        alpha = params["alpha"]
        beta = params["beta"]

        # return current repetition and iteration number and the 2 parameters
        ret = {"rep": rep, "iter": n, "alpha": alpha, "beta": beta}
        return ret


if __name__ == "__main__":
    mysuite = MySuite()
    mysuite.start()

You also need an experiment config file. Create a second file experiments.cfg and add the following content:

[DEFAULT]
repetitions = 5
iterations = 10
path = results

[myexperiment]
alpha = 1
beta = 0.1

Now call the script with python suite.py.

It will have generated a local ./results directory with one subdirectory myexperiment (the only experiment we defined in the config file). In this directory, you find 5 log files (#.log where # goes from 0 to 4) and another experiments.cfg file specific to this experiment.

For more examples, see the examples folder.

Metadata

Release files for expsuite 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for expsuite 0.1.1
File Size Uploaded Provenance
expsuite-0.1.1.tar.gz 10.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for expsuite 0.1.1
File Interpreter ABI Platform
expsuite-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / expsuite-0.1.1.tar.gz

Download URL expsuite-0.1.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8d5cef3ad2873581fd89a7b07efd0eae904df8e6e337c70f821f501676b746f9
BLAKE2b-256 checksum
How to use checksums
0e91dfc10979905b3f5ea76fb5ef5555e5fb640989f70b5b5702de2f45b6f7a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

Release files / expsuite-0.1.1-py3-none-any.whl

Download URL expsuite-0.1.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a45c5021288a5f8dbc819465bae7e80c8870c3359f914c89a2677662ed091994
BLAKE2b-256 checksum
How to use checksums
4ebffc846c7e864ba70bf95b82a7deb9ecfb9d3446a7ca618985c5888f6e7a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.1 importlib-metadata/4.10.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

Security for expsuite 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page