Generic SLURM dispatch (srun, sbatch, sync, poll, fetch) for the SciTeX ecosystem — login nodes never run compute
Project description
scitex-hpc
Generic SLURM dispatch for the SciTeX ecosystem — srun / sbatch / sync / poll_job / fetch_result with sane defaults for spartan/sapphire and override knobs for any other cluster.
Login nodes never run compute — every command is wrapped in srun or sbatch via a login-shell SSH so the SLURM module loads correctly.
Install
pip install scitex-hpc
Usage
from scitex_hpc import JobConfig, srun, sbatch, sync, poll_job, fetch_result
cfg = JobConfig(
project="scitex-dsp",
command="pip install -e '.[dev]' -q && python -m pytest tests/ -n 16",
host="spartan",
partition="sapphire",
cpus=16,
time="00:30:00",
mem="64G",
)
# 1. Sync local sources to the cluster.
sync(cfg)
# 2a. Blocking interactive run via srun.
exit_code = srun(cfg)
# 2b. Async batch submission via sbatch.
job_id = sbatch(cfg)
print(poll_job(cfg, job_id)) # {'state': 'COMPLETED', 'exit_code': '0:0', 'elapsed': '00:01:23'}
fetch_result(cfg, job_id) # downloads the .out file
Defaults & overrides
Every JobConfig field has a SCITEX_HPC_* env-var override:
| Field | Default | Env override |
|---|---|---|
host |
spartan |
SCITEX_HPC_HOST |
partition |
sapphire |
SCITEX_HPC_PARTITION |
cpus |
16 |
SCITEX_HPC_CPUS |
time |
00:20:00 |
SCITEX_HPC_TIME |
mem |
128G |
SCITEX_HPC_MEM |
remote_base |
~/proj |
SCITEX_HPC_REMOTE_BASE |
Resolution priority: explicit JobConfig field → env var → built-in default.
Status
Standalone module from the SciTeX ecosystem. Public API surfaces in
scitex.hpc (via the umbrella package's sys.modules alias) so you can
write from scitex.hpc import srun from any consumer.
License
AGPL-3.0-only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scitex_hpc-0.2.0.tar.gz.
File metadata
- Download URL: scitex_hpc-0.2.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
472f0667d9d2768e56ee01b9530ed7799bb2e722b659909bf33de65922818392
|
|
| MD5 |
a5bf0e481c73a2b4ff29581c5101ef8f
|
|
| BLAKE2b-256 |
e692b44c3990b12510adc4a1bf160f966ce6f744953f744dc71b8ce3fb6b7d78
|
Provenance
The following attestation bundles were made for scitex_hpc-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on ywatanabe1989/scitex-hpc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_hpc-0.2.0.tar.gz -
Subject digest:
472f0667d9d2768e56ee01b9530ed7799bb2e722b659909bf33de65922818392 - Sigstore transparency entry: 1393790607
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-hpc@707bdf57738c3d15510ac6e99923f3ec6582a923 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@707bdf57738c3d15510ac6e99923f3ec6582a923 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scitex_hpc-0.2.0-py3-none-any.whl.
File metadata
- Download URL: scitex_hpc-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11f57d66f1d1641f435b1e6d4dfa99a65a8f71252e5e85cc3cb2f9886daab8cd
|
|
| MD5 |
91dcd9b15d13e9e0df328aac1d085a0f
|
|
| BLAKE2b-256 |
7987fb02e6ca49a0dbad198b84902f93b146187b04ed089373e172ee5cdc7b68
|
Provenance
The following attestation bundles were made for scitex_hpc-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ywatanabe1989/scitex-hpc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_hpc-0.2.0-py3-none-any.whl -
Subject digest:
11f57d66f1d1641f435b1e6d4dfa99a65a8f71252e5e85cc3cb2f9886daab8cd - Sigstore transparency entry: 1393790661
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-hpc@707bdf57738c3d15510ac6e99923f3ec6582a923 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@707bdf57738c3d15510ac6e99923f3ec6582a923 -
Trigger Event:
push
-
Statement type: