Experiment execution tool for automation in research-oriented projects.
Project description
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
- Run
xlab project initon the root directory of your project. - 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
# ...
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file xlab-0.0.18.tar.gz.
File metadata
- Download URL: xlab-0.0.18.tar.gz
- Upload date:
- Size: 7.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9d34fe4dd149f51936d4b6538063645645d91237941cc99e11097e46f46ea4c
|
|
| MD5 |
b9d3de0c632dfce447b3ff761c4c0538
|
|
| BLAKE2b-256 |
48237577069d68273b3c6ea8fe0238960cb499d11c78173aec0adf090e3db9fb
|