Skip to main content

EasySubmit

A Python library for simplified job scheduling and management on SLURM clusters.

Python Version License: MIT

Overview

EasySubmit is a Python-based job scheduling and management system designed to seamlessly integrate with SLURM, a popular cluster management and job scheduling platform. This project aims to simplify the process of submitting, monitoring, and managing jobs on cluster environments through an intuitive Python API.

Key Features

  • Simple API: Easy-to-use Python interface for SLURM job submission
  • Task Management: Define and configure tasks with type-safe configuration classes
  • Batch Scheduling: Submit multiple experiments or jobs with different parameters
  • Profiling Support: Optional integration with Scalene for performance profiling
  • Flexible Configuration: Comprehensive SLURM configuration options
  • Type Safety: Built with modern Python type hints for better development experience

Installation

From PyPI (Recommended)

pip install easysubmit

From Source

# Clone the repository
git clone https://github.com/ysenarath/easysubmit.git
cd easysubmit

# Install in development mode
pip install -e .

Optional Dependencies

For profiling support:

pip install easysubmit[scalene]

Quick Start

Here's a simple example of how to use EasySubmit:

from easysubmit import SLURMCluster, SLURMConfig, Task, TaskConfig
from easysubmit.base import schedule

# Define your task configuration
class ExperimentConfig(TaskConfig):
    name: str = "MyExperiment"
    learning_rate: float = 0.001
    batch_size: int = 32

# Define your task
class Experiment(Task):
    config: ExperimentConfig
    
    def run(self):
        print(f"Running experiment with lr={self.config.learning_rate}")
        # Your experiment code here

# Configure SLURM settings
config = SLURMConfig(
    partition="gpu",
    nodes=1,
    ntasks_per_node=1,
    gres="gpu:1",
    mem="16G"
)

# Create cluster and schedule jobs
cluster = SLURMCluster(config)
experiments = [
    {"name": "MyExperiment", "learning_rate": 0.001, "batch_size": 32},
    {"name": "MyExperiment", "learning_rate": 0.01, "batch_size": 64},
]

schedule(cluster, experiments)

Core Components

Task and TaskConfig

  • TaskConfig: Define configuration parameters for your tasks with type safety
  • Task: Base class for implementing your computational tasks

SLURM Integration

  • SLURMCluster: Interface to SLURM cluster management
  • SLURMConfig: Comprehensive SLURM job configuration options

Job Management

  • Job: Represents individual jobs in the cluster
  • AutoTask: Advanced task automation features

Prerequisites

  • Python 3.9 or higher
  • Access to a SLURM cluster environment
  • SLURM commands (sbatch, squeue, etc.) available in PATH

Examples

Check out the examples/ directory for more comprehensive usage examples:

  • examples/slurm_scheduler.py: Basic SLURM job scheduling
  • examples/slurm_scheduler_with_profile.py: Job scheduling with profiling
  • examples/tasks.py: Task definition examples

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Metadata

Release files for easysubmit 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easysubmit 0.3.1
File Size Uploaded Provenance Actions
easysubmit-0.3.1.tar.gz 181.5 kB Without provenance Details for easysubmit-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for easysubmit 0.3.1
File Interpreter ABI Platform Actions
easysubmit-0.3.1-py3-none-any.whl Python 3 none any Details for easysubmit-0.3.1-py3-none-any.whl

Total release size: 196.4 kB

Release files / easysubmit-0.3.1.tar.gz

Download URL easysubmit-0.3.1.tar.gz
Size 181.5 kB
Tags Source
SHA-256 checksum
How to use checksums
412c31eb490d8e3463e6577bcaec277bfdfe402f90ac777d498d0bd53b4d5edf
BLAKE2b-256 checksum
How to use checksums
83b38640666a0dfb2149b491547987bfda7ab56b48b53857ddcf1bdb0d94d728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release files / easysubmit-0.3.1-py3-none-any.whl

Download URL easysubmit-0.3.1-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7760b25a14f1ca460f601e281352b8a0844ab362addc9d538f91ab710f0a795
BLAKE2b-256 checksum
How to use checksums
d9e95429b0bf0a5b269360df16a767a0b924841f4631c8083f97fd80a8729346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Security for easysubmit 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page