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.16.tar.gz (7.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: xlab-0.0.16.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.8.2 readme-renderer/27.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.59.0 importlib-metadata/4.11.2 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

File hashes

Hashes for xlab-0.0.16.tar.gz
Algorithm Hash digest
SHA256 e88abd1cf628eb24d607226aa7e32dfa41963887c166633623591cdc50cffc21
MD5 df2ae92bf1aab1e97bba3ef442151743
BLAKE2b-256 49b5024dcbd73c31b3f8883bedc1393ecd95711cf76d2d84d981ab8dc98c6b0f

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