Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

runq Python SDK

In-task SDK for the runq GPU scheduler.

Install

From the repo root:

pip install -e ./sdk/python

Optional extras:

pip install -e "./sdk/python[wandb]"   # optional W&B dependency
pip install -e "./sdk/python[dev]"     # for pytest

Quick start

import runq

ctx = runq.context()
lr = ctx.params.get("lr", 1e-3)          # ablation values from the sweep

with runq.log_group("train"):
    runq.report({"loss": loss}, step=step)   # → train/loss in metrics.jsonl
runq.record({"acc": acc}, seed=ctx.seed, split="val")  # axis-keyed result row

Checkpoints go under ctx.checkpoint_dir (<task_dir>/checkpoints, stable across retries, so a resume.extra_args restart can find them). runq does not manage checkpoint lifecycle or early stopping — those belong to your training script.

Three modes

Detected automatically at runq.context():

  • daemon — running under a runq daemon (RUNQ_TASK_ID + RUNQ_SOCKET_PATH set)
  • no_daemon — running on HPC compute node (RUNQ_TASK_ID set, no socket / RUNQ_NO_DAEMON=1)
  • manual — running outside runq (no RUNQ_TASK_ID); useful for local debugging

ctx.mode exposes which mode is active.

Output and W&B directories (RC3)

ctx.output_dir defaults to <task_dir>/outputs; ctx.checkpoint_dir defaults to <task_dir>/checkpoints. ctx.wandb_like_cfg["dir"] uses WANDB_DIR, whose default is the task directory. W&B manages the wandb child itself. Explicit project/job environment overrides are resolved before submission and preserved by the SDK.

import wandb
run = wandb.init(**ctx.wandb_like_cfg)
ctx.link_wandb(run)  # global rank 0; ignores missing offline/disabled URLs

The SDK still works without W&B installed. Retries keep outputs and offline files; online resume="allow" and offline wandb sync have different semantics. See the directory contract for artifact staging/cache/download paths and explicit clean behavior.

Metadata

Release files for runq-sdk 0.6.0rc5

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

Source distribution (sdist)

Source distribution for runq-sdk 0.6.0rc5
File Size Uploaded
runq_sdk-0.6.0rc5.tar.gz 30.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runq-sdk 0.6.0rc5
File Interpreter ABI Platform
runq_sdk-0.6.0rc5-py3-none-any.whl Python 3 none any Details

Total release size: 53.7 kB

Release files / runq_sdk-0.6.0rc5.tar.gz

Download URL runq_sdk-0.6.0rc5.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb5b6cd7c1db5cc548ebfe9888c91d0505ea2c9998d05a0f3c3b576cc1ebaeb1
BLAKE2b-256 checksum
How to use checksums
7fbb7d7bc3b783c8f5b0ebc153196ecbd695d252a3e9dd2a63f5910a8dc4edbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Release files / runq_sdk-0.6.0rc5-py3-none-any.whl

Download URL runq_sdk-0.6.0rc5-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17576acde4022d9734a65e6c045566c6cef763426fcf4ca2c297c24f34cc8af4
BLAKE2b-256 checksum
How to use checksums
63e0e21083296e699de335efd2011ed8f3afa0c71c31f8465e668d0989118887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

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