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()
Release files for xlab 0.0.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xlab-0.0.18.tar.gz | 7.1 kB | Details |
Release files / xlab-0.0.18.tar.gz
| Download URL | xlab-0.0.18.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9d34fe4dd149f51936d4b6538063645645d91237941cc99e11097e46f46ea4c
|
|
BLAKE2b-256 checksum How to use checksums |
48237577069d68273b3c6ea8fe0238960cb499d11c78173aec0adf090e3db9fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|