Skip to main content

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


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

slurminade-0.1.4-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page