Skip to main content

slurmforge

slurmforge is a Slurm-native stage-batch system for AI training and evaluation workflows.

It focuses on a small CLI surface:

sforge init
sforge init --list-templates
sforge init --template train-eval --output ./demo --force
cd demo
sforge validate --config experiment.yaml
sforge estimate --config experiment.yaml
sforge plan train --config experiment.yaml --dry-run=full --output plan.audit.json
sforge plan eval --config experiment.yaml --checkpoint /path/to/model.pt --input-name model_input
sforge plan run --config experiment.yaml
sforge train --config experiment.yaml --dry-run=full
sforge eval --config experiment.yaml --checkpoint /path/to/model.pt
sforge run --config experiment.yaml
sforge pipeline resume /path/to/pipeline-root
sforge status --from /path/to/root --reconcile
sforge status --from /path/to/root --reconcile --sacct-profile portable
sforge resubmit --from /path/to/root --stage eval --query state=failed

sforge run pipelines auto-advance to completion via a dependency-free watchdog (configurable under orchestration.control.auto_advance). sforge pipeline resume advances a pipeline once on demand — useful when auto-advance is disabled or driven externally by cron/scrontab.

Install

python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'

Start

Create a starter project instead of writing YAML from scratch:

sforge init

For scripts or CI, choose a template explicitly:

sforge init --template train-eval --output ./demo --force

This writes ./demo/experiment.yaml, ./demo/CONFIG.sforge.md, ./demo/README.sforge.md, and the template's stage scripts.

Available starter templates:

  • train-eval: train produces a checkpoint; eval consumes the upstream output.
  • train-only: one train stage with a checkpoint output.
  • eval-checkpoint: one eval stage that consumes an explicit checkpoint path.

The generated train.py and eval.py are structured as integration scaffolds:

  • SECTION A - SlurmForge contract: injected CLI args and environment contract.
  • SECTION B - Your model code: model construction, data loading, training, and eval logic to replace.
  • SECTION C - Output contract: checkpoint and metrics files declared by the YAML.

Minimal Workflow

sforge validate --config experiment.yaml
sforge run --config experiment.yaml --dry-run=full
sforge run --config experiment.yaml --emit-only
sforge run --config experiment.yaml
sforge status --from ./runs/<project>/<experiment>/<pipeline-root> --reconcile

status --reconcile uses sacct profile fallback by default and can be pinned with --sacct-profile or --sacct-fields for clusters with different sacct field support.

Use sforge train for train-only configs and sforge eval --checkpoint /path/to/model.pt for eval-only configs.

Docs

Development

ruff check src tests
pytest -q

Metadata

Release files for slurmforge 1.2.3

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

Source distribution (sdist)

Source distribution for slurmforge 1.2.3
File Size Uploaded Provenance Actions
slurmforge-1.2.3.tar.gz 183.6 kB With provenance Details for slurmforge-1.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 500.5 kB

Release files / slurmforge-1.2.3.tar.gz

Download URL slurmforge-1.2.3.tar.gz
Size 183.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ab105cb66f35be5010ae42f5037a2a707a7ea85956ccd545f66c2b9bf471e32b
BLAKE2b-256 checksum
How to use checksums
2c453a3fbf204f58d99e7013492679fca1378f834e3bb1be0706bb3196ac6ff5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Release files / slurmforge-1.2.3-py3-none-any.whl

Download URL slurmforge-1.2.3-py3-none-any.whl
Size 316.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7b96615fb1ca957fcc3e8ecb5842462e89f3a597970ce7884ce2ef70d45bc08
BLAKE2b-256 checksum
How to use checksums
8346742c98d898872b99a1ecb82d6e6dde01df9c4da056491af131375e19affd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Security for slurmforge 1.2.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for slurmforge-1.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

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