Skip to main content

No project description provided

Project description

slurmit

This project is work in progress

pytest document

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slurmit-0.0.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurmit-0.0.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file slurmit-0.0.2.tar.gz.

File metadata

  • Download URL: slurmit-0.0.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for slurmit-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3a7fd7d5678ba17a9e649c5fb0b9936594931bbb271e35516d51dbdd6744d70b
MD5 0975be46a1f2356f9c90dc4fcd9c49bc
BLAKE2b-256 bf0e1d7bf50700b74587a436de769e7e1b9d625d8b956ea7fee093a0e11f1ac8

See more details on using hashes here.

File details

Details for the file slurmit-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: slurmit-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for slurmit-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 be04ebe72fbf9ee0af352ebe539a3d8542a8e4e6c1ced783f9ab50a999927371
MD5 ac47d9c06c06b3142176cec0c6fe8801
BLAKE2b-256 f0990f20099618dfbd972c38754f55359b0e1a3050346df409be1d7d81201e12

See more details on using hashes here.

Supported by

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