feat(engine): surface is_sleeping as a GET control endpoint mirroring /is_paused - #1118
feat(engine): surface is_sleeping as a GET control endpoint mirroring /is_paused#1118SuperMarioYL wants to merge 1 commit into
Conversation
… /is_paused The Sleep/Wake-Up data-plane (engine.is_sleeping -> AsyncLLM.is_sleeping -> IsSleepingReq round-trip) is wired end-to-end and GPU-tested, but only /is_paused is mounted as an HTTP control route. Add /is_sleeping on both the in-engine RL-control router (vllm_compat_http) and the sidecar control_server, mirroring /is_paused, plus a WeightTransferManager.is_sleeping accessor that delegates to AsyncLLM.is_sleeping. Includes a TestRlControlProxy regression covering /is_sleeping and /is_paused proxy parity. Signed-off-by: supermario_leo <leo.stack@outlook.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6eb9be8d1c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @router.get("/is_sleeping") | ||
| async def is_sleeping(raw_request: Request) -> JSONResponse: |
There was a problem hiding this comment.
Document the new sleep-status endpoint
This exposes a new public GET /is_sleeping control API, but the commit does not update any user-facing documentation, leaving operators without a documented response contract or guidance on how this status differs from /is_paused. Add the route, response shape, and sleep-state semantics to the control-plane documentation as required for changed code.
AGENTS.md reference: AGENTS.md:L11-L14
Useful? React with 👍 / 👎.
Summary
The Sleep/Wake-Up data-plane is wired end-to-end (
engine.is_sleeping→AsyncLLM.is_sleeping→IsSleepingReqround-trip through the scheduler controlclient) and is GPU-tested in
test_sleep_wakeup_gpu.py, but the only statusroute mounted on the HTTP control surface is
/is_paused. The symmetric/is_sleepingroute was missing from both the in-engine RL-control router(
vllm_compat_http.py) and the sidecarcontrol_server.py, so callers couldpoll pause status over HTTP but not sleep status.
This adds the matching
/is_sleepingendpoint, mirroring/is_pausedend-to-end:
WeightTransferManager.is_sleeping()— async accessor delegating toAsyncLLM.is_sleeping()(mirrors the syncis_paused()accessor atmanager.py:94; carriesawaitbecauseAsyncLLM.is_sleepingis async,whereas
AsyncLLM.weight_transfer_admission_pausedis sync).@router.get("/is_sleeping")onvllm_compat_http.py— direct handlerreturning
{"is_sleeping": bool}, mirroring the/is_pausedhandler.@app.get("/is_sleeping")oncontrol_server.py— thin sidecar proxy tothe in-engine RL-control app, mirroring the
/is_pausedproxy.The change is purely additive: no existing route or control-plane behavior is
modified. The read semantics are point-in-time status polling, identical to
/is_paused, so the same transient-state reasoning applies to both — this isparity with the existing route, not a new contract.
Test Plan
TestRlControlProxyintest/runtime/test_control_server.py: spins up amock RL-control app and asserts the sidecar's
/is_sleepingand/is_pausedroutes relay
{"is_sleeping": bool}/{"is_paused": bool}byte-faithfully.A missing
/is_sleepingmount would 404 and fail the assertion, so this isa real regression guard for the new route plus parity coverage for
/is_paused(which had no proxy test before).
ruff checkandisort --check-onlyclean on all four changed files;python -m py_compileclean.tokenspeedruntime, which pullsin
triton/torch/tokenspeed_kernel, so it runs in GPU CI rather thanon a non-GPU host; CI will exercise the new test.