nodus.sweep
View MarkdownSweep: one Job template run across a matrix of GPUs, regions and parameters (resources.md §3.3, ADR-051).
Sweep(job_spec, grid={"gpu": ["H100", "L4"], "BATCH_SIZE": [8, 16]}) describes the matrix and run() creates it;
each cell is a Job named <sweep>-<index> and the report lists cost, wall time and throughput per cell.
The API serves Job templates, so a Function or a recipe as the target raises errors.Unsupported.
class Sweep(target: Mapping[str, Any] | None = None, *, grid: Mapping[str, Iterable[Any] | str] | None = None, repetitions: int | None = None, max_parallel: int | None = None, max_cost: Any = None, name: str | None = None, labels: dict[str, str] | None = None, project: str | None = None) -> NoneA Sweep: describe it, run() it, then read the report with wait(), cells() and status().
Sweep.cancel
Section titled “Sweep.cancel”cancel() -> NoneSweep.cells
Section titled “Sweep.cells”cells() -> list[View]One entry per cell, in index order: GPU, region, parameters, phase, cost, wall time and throughput.
Sweep.estimate
Section titled “Sweep.estimate”estimate() -> ViewThe Sweep’s status.estimate: the total cost estimate over every cell.
Sweep.from_name
Section titled “Sweep.from_name”from_name(name: str, project: str | None = None) -> _SweepA Sweep that exists already, to wait on or read.
Sweep.jobs
Section titled “Sweep.jobs”jobs() -> list[View]The cell Jobs the Sweep created.
Sweep.name
Section titled “Sweep.name”Type: str | None
The Sweep’s name; a Sweep without one gets it from run().
Sweep.resume
Section titled “Sweep.resume”resume() -> NoneSweep.run
Section titled “Sweep.run”run(idempotency_key: str | None = None) -> _SweepCreate the Sweep and return it; .wait() blocks until every cell is terminal.
Sweep.status
Section titled “Sweep.status”status() -> ViewThe Sweep’s status: phase, cells, best, cost and estimate.
Sweep.suspend
Section titled “Sweep.suspend”suspend() -> NoneSweep.wait
Section titled “Sweep.wait”wait(timeout: float | None = None) -> ViewBlock until the Sweep is terminal and return its report (the status).
A Sweep with failed cells ends Failed with reason CellsFailed and still has its report, so only a
timeout or a missing Sweep raises; read phase and best on the result.