Getting started¶
Requirements¶
The submission host needs Python 3.11 or newer and the Slurm client commands
sbatch, squeue, sacct, and scancel. Compute nodes need srun,
scontrol, and Apptainer. Shared datasets, image caches, logs, and results
must be visible from the nodes that run the experiment.
Install from source¶
git clone https://github.com/goncalorafaria/rexs.git
cd rexs
python -m venv .venv
. .venv/bin/activate
pip install -e .
REXS uses Python Fire for its command interface. Discover commands and generated option help with:
Configure your site¶
At minimum, review the Slurm account and partition, shared run path, image locations, and dataset mappings. See Site configuration for every field.
Validate and render¶
Validation parses and compiles without writing a script or calling Slurm:
Rendering writes the exact script that would be submitted:
rexs render examples/datadev-sft.json \
--profile profile.yaml \
--name sft-smoke \
--output sft-smoke.sbatch
bash -n sft-smoke.sbatch
Use --strict when a warning should stop the command:
Template values¶
Only exact ${NAME} placeholders are replaced. Shell expressions with
operators, such as ${BEAKER_REPLICA_RANK:-0}, remain intact.
rexs render stack.yaml \
--profile profile.yaml \
--define='{"CLUSTER":"gpu","VLLM_REPLICAS":2}' \
--output stack.sbatch
Assignments can also be passed individually when calling the Python API or as a Fire-compatible list.
Submit¶
REXS saves the source specification and generated script metadata before it
calls sbatch. A failed submission remains visible in state history with its
error message.
Dry-run many experiments¶
rexs dry_run ~/datadev/beaker_experiments
rexs dry_run ~/datadev/beaker_experiments --details
rexs dry_run ~/datadev/beaker_experiments \
--strict \
--output_dir=/tmp/rexs-rendered
Dry-run mode discovers Beaker v2 .yaml, .yml, and .json files, compiles
them, and feeds every script to bash -n. It never invokes a Slurm command.