slurmit
This project is work in progress
A minimalistic reimplementation of submitit for Slurm.
Features
- Submit Python functions to SLURM
- Configure SLURM job parameters through templates
- Handle SLURM and runtime errors
- Retrieve job results
Installation
hatch create env
or
pip install -U -e .
Usage
Prepare template
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --partition={partition}
#SBATCH --gres=gpu:{num_gpu}
module load cuda
Run the following script
from slurmit import SlurmExecutor
def add(x, y):
return x + y
ex = SlurmExecutor("slurm_outputs",
"template.sh",
dict(partition="main", num_gpu=1))
job = ex.submit(add, 1, y=2)
print(job.result()) # 3
Release files for slurmit 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slurmit-0.0.3.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slurmit-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / slurmit-0.0.3.tar.gz
| Download URL | slurmit-0.0.3.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ae1427eceae75b24b8cb84a252e677539f1f64e359be6856eef6a47ab525a8
|
|
BLAKE2b-256 checksum How to use checksums |
cddae60f13fc30afa037cfe920e8eca5d0af4c55846046f8e05056573752496b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / slurmit-0.0.3-py3-none-any.whl
| Download URL | slurmit-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
240760700c3497649c03bee38d471b3b2ca3e65e863bebda4c0d5999ac4fb039
|
|
BLAKE2b-256 checksum How to use checksums |
b1d2ce1e471ef9a2c5e47974aa45a87ea00d3a179d113a0bee4db6fb9a7ab5be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|