sandx-compute
Distributed compute orchestration for the SandX platform.
Part of the SandX Lab computational infrastructure ecosystem.
What It Does
sandx-compute is the resource orchestration layer for the SandX platform. It tracks available compute nodes, matches workloads to nodes by capability, and manages the full job lifecycle.
Submit job → Scheduler → ResourceRegistry → Allocated node
↓
complete / fail / cancel
↓
Node released
Status
v0.1 — Working
| Component | Status |
|---|---|
ResourceRegistry — node registration and capability tracking |
Working |
Scheduler — requirement-aware first-fit allocation |
Working |
| Job lifecycle — submit, complete, fail, cancel | Working |
| Distributed consensus locking | Planned (Phase 3) |
| PyPI package | Working |
Installation
pip install sandx-compute
Or from source:
git clone https://github.com/sandxlab/sandx-compute
cd sandx-compute
pip install -e ".[dev]"
Demo
pip install sandx-compute
python -m examples.schedule_jobs
Registers a 5-node compute cluster (CPU + GPU nodes), submits 6 jobs with mixed requirements, shows allocation decisions, and walks through the full job lifecycle — no external data required.
Quick Start
from sandx_compute import ResourceRegistry, Scheduler
# Register compute nodes
registry = ResourceRegistry()
registry.register("cpu-1", cpu_cores=8, ram_gb=32)
registry.register("gpu-1", cpu_cores=16, ram_gb=64, gpu="A100", vram_gb=80)
registry.register("gpu-2", cpu_cores=8, ram_gb=32, gpu="T4", vram_gb=16)
# Create a scheduler
scheduler = Scheduler(registry)
# Submit a GPU job
job = scheduler.submit("train", requirements={"gpu": True, "min_vram_gb": 40})
print(job)
# Job(id=3f2a1b8c, task='train', status='running', node='gpu-1')
# Complete the job — releases the node
scheduler.complete(job)
print(registry.get("gpu-1").status) # "available"
# Submit with no suitable node → stays pending
big_job = scheduler.submit("train", requirements={"gpu": True, "min_vram_gb": 200})
print(big_job.status) # "pending"
Job Requirements
| Key | Type | Description |
|---|---|---|
gpu |
bool |
Requires a GPU node |
min_vram_gb |
float |
Minimum VRAM in GB |
min_cpu_cores |
int |
Minimum CPU core count |
min_ram_gb |
float |
Minimum RAM in GB |
Node Status Transitions
available → busy (job scheduled)
busy → available (job completed / failed / cancelled)
available → offline (manual / health check)
available → reserved (manual hold)
Design Notes
- Single-process v0.1 — correct for local use; no distributed coordination.
- First-fit allocation — jobs are assigned to the first node that satisfies all requirements.
- Distributed locking is Phase 3 scope — the
SchedulerAPI is designed to accommodate a consensus protocol without breaking changes.
Related
sandx-er— entity resolutionsandx-embed— embedding infrastructuresandx-graph— graph intelligence- sandx.io — project home
License
Apache 2.0 — see LICENSE
Metadata
Release files for sandx-compute 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sandx_compute-0.1.1.tar.gz | 10.5 kB | Without provenance | Details for sandx_compute-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sandx_compute-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sandx_compute-0.1.1-py3-none-any.whl |
Total release size: 19.2 kB
Release files / sandx_compute-0.1.1.tar.gz
| Download URL | sandx_compute-0.1.1.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65116a61baca71097cc46c973ab527cb1ade41f419d49979c3ffd95f8cf64043
|
|
BLAKE2b-256 checksum How to use checksums |
48d43ee6d7ef9372699f688fc0069dc81a20cb7d354aa2824f2cba2e8dae1822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / sandx_compute-0.1.1-py3-none-any.whl
| Download URL | sandx_compute-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4bb686360c91f36ed405fe772907ae89cedcfe5f12935499570a71b83215bb7
|
|
BLAKE2b-256 checksum How to use checksums |
7dbc9b0eff08d0daf4634609189de745fda87c74c849948d9baf3c93eaf9598e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for sandx-compute 0.1.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.