Skip to main content

Experiment execution tool for automation in research-oriented projects.

Project description

xLab Logo


xLab is an experiment execution tool that automates tasks in research-oriented projects. It provides a simple interface that can be integrated to project executables with minimum modifications. xLab enables the following functionalities:

  • Maintaining a folder structure for runs.
  • Caching results saved after each run.
  • Accessing cached results from a Python dictionary of arguments.

Installation

pip install xlab

Quickstart

  1. Run xlab project init on the root directory of your project.
  2. Wrap the code of your executables within a with clause such that it resembles the following pattern:
# Import libraries...

import xlab.experiment as exp

# ...

parser = get_parser()

with exp.setup(parser) as setup:
    args = setup.args
    dir = setup.dir

    # Use args to run experiment and
    # dir as a directory to save results

# ...
  1. Call your program either directly from the terminal or indirectly through another script.

If you executable could be run on the terminal before using xLab, now you can continue running the program in the same way as before, but now with results cached and automatically saved in a folder structure.

You can also run the executable within a Python script by using the following code structure:

# Import libraries...

import xlab.experiment as exp

# ...

e = exp.Experiment(executable, required_args, command)

print(e.args) # Prints all arguments (both required and optional)

# Modify e.args as you wish...

e.run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xlab-0.0.15.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file xlab-0.0.15.tar.gz.

File metadata

  • Download URL: xlab-0.0.15.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.13

File hashes

Hashes for xlab-0.0.15.tar.gz
Algorithm Hash digest
SHA256 ea4f5defffe9f7dbee77b3d7ffddc327c58de63091ab7ce192538876b97d2245
MD5 67a3cfb699ccce5d00d7682f15514abc
BLAKE2b-256 8f28bbc881995df35c6afba3894c6e89a159c5bff1c201e0fffd0d329bab286c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page