rampgate
ramp + gate: hold each job's warm-up ramp at the gate, measure what it really uses, then reserve exactly that.
rampgate is an observation-based admission scheduler: a small, embeddable, pure-Python library with zero runtime dependencies. It decides when a job may start on a device the caller chose:
- Probation: at most one warming job without a trusted estimate per device, so ramp-ups never race.
- Observed-peak reservation: reserve
observed_peak × safety_margin, growing if the peak grows. - OOM feedback: an OOM grows the estimate and requeues the job; with a runner that checkpoints, completed epochs are not lost.
It is not a cluster manager. You keep your executor (Docker, a process pool, a batch system), your control loop and your clock; rampgate tells you when to start and stop what, and explains why a job is waiting.
Install
pip install rampgate
Python 3.11 or newer. The core imports only the standard library.
Quickstart
Three jobs that ramp to 9 GB each on one 24 GB GPU, in rampgate's deterministic simulator:
from rampgate import Device, FifoPolicy, Job, MarkStable, Resources, Start
from rampgate.sim import RampPlateau, Scenario, SimJob, simulate
gpu = Device("gpu0", Resources(vram=24)) # GB here; any unit works
ramp = RampPlateau(load_s=20, ramp_s=40, plateau=Resources(vram=9), duration_s=300)
jobs = tuple(SimJob(Job(f"train-{i}", {"gpu0": None}), ramp, submit_at=0) for i in range(3))
trace = simulate(Scenario((gpu,), jobs), FifoPolicy(), max_time=3000)
for tick in trace.ticks:
for action in tick.decision.actions:
if isinstance(action, Start | MarkStable):
print(f"t={tick.now:5.0f} {type(action).__name__:10} {action.job_id}")
print("OOM kills:", trace.world.oom_count, " finished at t =", trace.ticks[-1].now)
The jobs ramp one at a time and are reserved at their observed peaks. The third has no history, so it starts in the room that is left, is OOM-killed once (a first-contact OOM), and is requeued until it really fits (with a runner that checkpoints, completed epochs are not lost).
On real machines
Drive the same Engine from your own loop: feed it observations, call tick, and apply the actions it returns. See Integrating rampgate in your scheduler. Adapters:
rampgate-nvml: NVIDIA GPU memory, per-process usagerampgate-psutil: host RAM and CPUrampgate-docker: runs jobs as containers, classifies their exits
Results and limits
In six simulated scenarios (freeze 2, held-out seeds 2000–2019), rampgate had no OOMs except a few first-contact ones (a median of 0–1 per run, all in cold runs) and finished in 0.12–0.75× the makespan of Serial, the other strategy that is OOM-free in every scenario. The price is makespan: warm rampgate took 1.07–1.59× as long as GreedyFree (per-seed medians), which OOMs hundreds of times per run in five of the six scenarios, and it missed its own ≤ 1.2× target (ratio of medians) in four of six. In the TrainQ-like scenario (e) no strategy OOMs, so rampgate's extra makespan (1.20× warm, 1.50× cold) buys nothing there; this scenario likely has too little memory pressure.
All benchmark results are from rampgate's deterministic simulator. Demonstrated (not benchmarked) on one laptop GPU (RTX 4050, 6 GB) with synthetic memory-hog containers: probation, a Rule V vacate and an OOM→Rule O cycle, checked by script. Not yet tested: multiple GPUs, gang jobs, CPU devices, a real framework's caching allocator, orchestrator restart, sub-second spikes.
Status: alpha. The API may change while the version is 0.x. The first held-out evaluation failed its gates (6 OOMs); the second passed after the fixes listed in the benchmark methodology.
Links
Documentation · Source · Changelog
Apache-2.0.
Metadata
Release files for rampgate 0.2.0
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 |
|---|---|---|---|---|
| rampgate-0.2.0.tar.gz | 129.4 kB | With provenance | Details for rampgate-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rampgate-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rampgate-0.2.0-py3-none-any.whl |
Total release size: 205.4 kB
Release files / rampgate-0.2.0.tar.gz
| Download URL | rampgate-0.2.0.tar.gz |
|---|---|
| Size | 129.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa2faef24dd0d10ad3ba01151d20eaa2257622dd330bc2f8854b67ad6ba1d4dd
|
|
BLAKE2b-256 checksum How to use checksums |
47940db67de7248d21506335cccc1064be294c7c4ab88b11f655a85a0ab9b58f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 21, 2026.
Transparency logRelease files / rampgate-0.2.0-py3-none-any.whl
| Download URL | rampgate-0.2.0-py3-none-any.whl |
|---|---|
| Size | 76.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
968b0122bf35e51ee98ae36e0472029c492f5d455fa85c94a0f792e425b706b4
|
|
BLAKE2b-256 checksum How to use checksums |
ca223e9e45825ee4e33c13a187c1ca2e0a40ef5b83ab6a4842a447d344baf69d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 21, 2026.
Transparency logSecurity for rampgate 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rampgate-0.2.0.tar.gz
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 Nov 21, 2026.
Transparency logA 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.