A decorator-based slurm runner
Project description
slurminade
A decorator-based slurm runner.
Installation
Simply install via pip pip install slurminade
.
Usage
Important: slurminade only works when used within a regular Python-file. This file needs to be available on all slurm nodes to reconstruct the functions.
import slurminade
import datetime
# Settings for slurm
slurminade.update_default_configuration(partition="alg", constraint="alggen02")
@slurminade.slurmify()
def test(hello_world):
with open("slurminade_example.txt", "w") as f:
f.write(hello_world)
# This 'if' is critical as this code is also executed on the node to reconstruct the function.
if __name__ == "__main__":
# Call the function remotely.
test.distribute(f"Hello World from slurminade! {str(datetime.datetime.now())}")
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for slurminade-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f253cb417435b1f6d97a78b3e90b7141f2123519345aa9a4ba389c5195a10f |
|
MD5 | 87f6699dbe683e23f8c27bc8dd34bff4 |
|
BLAKE2b-256 | b5be65fd7519e87855b8d744d3ca54f3719261a51ad4a61691a2e64355da4c4d |