A utility to create, launch and monitor code experiments on SLURM, PBS, or local machines.
Project description
SbatchMan
A utility to create, launch, and monitor code experiments on SLURM, PBS, or local machines.
🚀 Installation
The recommended way to install SbatchMan is with pipx. This will install the package and its dependencies in an isolated environment.
If you don't have pipx, you can install it with:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
You may need to restart your terminal for the changes to take effect.
Once pipx is installed, you can install sbatchman from PyPI:
pipx install sbatchman
Now try running sbatchman --help!
For development, clone the repository and install the package in editable mode from the local repository:
# For developers
pip install -e .
This allows you to make changes to the code and have them reflected immediately without needing to reinstall.
🛠️ Usage
The tool is organized into three main commands: configure, launch, and status.
⚙️ Configure an Experiment
Before launching an experiment, you need to create a configuration for your target environment (SLURM, PBS, or local). The configure command helps you create and save these settings.
When you first run this command in a project directory, SbatchMan will ask for confirmation to create a sbatchman directory. This directory will store all your configurations and experiment results.
Check out the available options for each environment:
sbatchman configure slurm --help # Show options for SLURM
sbatchman configure pbs --help # Show options for PBS
sbatchman configure local --help # Show options for local execution
The configuration file will be saved in the sbatchman/configs directory with the name you provided. You can use this name later to launch your experiment. If you need to change the configuration, you can simply run the configure command again with the same name, and it will overwrite the existing configuration.
SLURM Example:
sbatchman configure slurm --name my-gpu-job \
--partition gpu_queue \
--cpus-per-task 4 \
--mem "16G" \
--gpus 1 \
--time "01:00:00" \
--env "CUDA_VISIBLE_DEVICES=0"
PBS Example:
sbatchman configure pbs --name my-pbs-job \
--queue standard \
--cpus 4 \
--mem "16gb" \
--walltime "01:00:00"
Local Example:
sbatchman configure local --name my-local-job \
--env "MY_VAR=hello"
쏘 Launch an Experiment
Use the configuration name to launch your code.
sbatchman launch --config my-gpu-job \
"python my_project/train.py --learning-rate 0.001 --epochs 50"
The command to execute must be passed in quotes.
📊 Check Experiment Status
To monitor your experiments, launch the interactive interface:
sbatchman status
The TUI provides a real-time view of your jobs, categorized into queued, running, and finished states. You can navigate through the list of jobs and select one to view its live standard output and error logs.
⌨️ Keybindings:
- Up/Down Arrows: Navigate through jobs and tabs.
- Enter: View logs for the selected job.
- q: Go back to the previous view or quit the application.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sbatchman-0.1.3.tar.gz.
File metadata
- Download URL: sbatchman-0.1.3.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6af50b20c9188a9bd6984c7df9d47e1dae11f7d1ad04223a55b61af9e059c97
|
|
| MD5 |
71754daa7157544259155218324bc2d3
|
|
| BLAKE2b-256 |
04b740c35b203db75551bc162f58a7d02d79c2d12b3980fc9e7a59f24e438461
|
Provenance
The following attestation bundles were made for sbatchman-0.1.3.tar.gz:
Publisher:
pypi-publish.yml on LorenzoPichetti/SbatchMan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sbatchman-0.1.3.tar.gz -
Subject digest:
c6af50b20c9188a9bd6984c7df9d47e1dae11f7d1ad04223a55b61af9e059c97 - Sigstore transparency entry: 255589273
- Sigstore integration time:
-
Permalink:
LorenzoPichetti/SbatchMan@8c2c7f6689dd436e0edd6d14347ac12121089e4a -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/LorenzoPichetti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@8c2c7f6689dd436e0edd6d14347ac12121089e4a -
Trigger Event:
release
-
Statement type:
File details
Details for the file sbatchman-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sbatchman-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73a1112bb2e1e19c97a953a00609b9bb1cfaacbdf033b42157ad859572e256c2
|
|
| MD5 |
e6150c8fd6433e5cdd30ffff9dd6113f
|
|
| BLAKE2b-256 |
d1f1b3a5e70aea303e31f269c9f7b207245bb06763c0e7b5407421b8ca3bea99
|
Provenance
The following attestation bundles were made for sbatchman-0.1.3-py3-none-any.whl:
Publisher:
pypi-publish.yml on LorenzoPichetti/SbatchMan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sbatchman-0.1.3-py3-none-any.whl -
Subject digest:
73a1112bb2e1e19c97a953a00609b9bb1cfaacbdf033b42157ad859572e256c2 - Sigstore transparency entry: 255589276
- Sigstore integration time:
-
Permalink:
LorenzoPichetti/SbatchMan@8c2c7f6689dd436e0edd6d14347ac12121089e4a -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/LorenzoPichetti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@8c2c7f6689dd436e0edd6d14347ac12121089e4a -
Trigger Event:
release
-
Statement type: