Skip to main content

Experiment orchestration toolkit for Slurm-based training and evaluation workflows.

Project description

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 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

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

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

slurmforge-1.2.2.tar.gz (178.4 kB view details)

Uploaded Source

Built Distribution

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

slurmforge-1.2.2-py3-none-any.whl (309.9 kB view details)

Uploaded Python 3

File details

Details for the file slurmforge-1.2.2.tar.gz.

File metadata

  • Download URL: slurmforge-1.2.2.tar.gz
  • Upload date:
  • Size: 178.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slurmforge-1.2.2.tar.gz
Algorithm Hash digest
SHA256 74ab46c2e6e98777da793735f8edd997a57f49f10437c176b38a2ee949c13f2b
MD5 724ede257cdd249d306fb862b4918a71
BLAKE2b-256 6ca3573e2dc7345067cf2ec642b45e219a78a5c54f8954e3c726a559e604df88

See more details on using hashes here.

Provenance

The following attestation bundles were made for slurmforge-1.2.2.tar.gz:

Publisher: publish.yml on Sean-XinLi/slurmforge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file slurmforge-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: slurmforge-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 309.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for slurmforge-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea114a407c8e2a00939ff1225d0c649f74cfe7304ea3c2395b71250b25fb6aa5
MD5 be03df125d430b6f9d2b17d42d731e1f
BLAKE2b-256 77cd8e1a375cbcd14d6f6d9c15fca39d5ac17ff05e8232e8e2e14d6b1fe1b036

See more details on using hashes here.

Provenance

The following attestation bundles were made for slurmforge-1.2.2-py3-none-any.whl:

Publisher: publish.yml on Sean-XinLi/slurmforge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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