Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
This was referenced Oct 1, 2026
ananthsub
force-pushed
the
ananthsub/partial-ckpt-workplace-assistant
branch
from
October 1, 2026 21:53
5c5b53b to
4a44fa9
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-e2e
branch
from
October 1, 2026 21:53
87e1f0c to
207f588
Compare
This was referenced Oct 1, 2026
ananthsub
force-pushed
the
ananthsub/partial-ckpt-e2e
branch
from
October 1, 2026 22:05
207f588 to
afee845
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-workplace-assistant
branch
from
October 1, 2026 22:05
4a44fa9 to
44260b9
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-e2e
branch
from
October 2, 2026 13:22
afee845 to
6a3c667
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-workplace-assistant
branch
from
October 2, 2026 13:22
44260b9 to
031e9f6
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-e2e
branch
from
October 2, 2026 19:43
6a3c667 to
f3ade85
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-workplace-assistant
branch
from
October 2, 2026 19:43
031e9f6 to
7948699
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-e2e
branch
from
October 2, 2026 21:17
f3ade85 to
ca27fd2
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-workplace-assistant
branch
from
October 2, 2026 21:17
7948699 to
4317d35
Compare
Declare the Workplace Assistant resources server checkpoint_mode = "exported" and implement the three session hooks over each session's tool environment. Export encodes every in-memory table column by column, keeping dtypes, index labels, and the difference between empty CSV cells (NaN) and values a tool stored as None. Restore rebuilds every session before installing any, so one invalid state installs nothing. Export leaves out a session /verify already discarded, and retire drops the session's tool environment. /verify keeps the default "wait" mode because it discards the session. Ported from #2946 onto the v2 checkpoint hooks, without the execution-to-session index and identity lookups that v2 replaces with cookie session IDs. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
force-pushed
the
ananthsub/partial-ckpt-e2e
branch
from
October 2, 2026 23:32
ca27fd2 to
f98be7a
Compare
ananthsub
force-pushed
the
ananthsub/partial-ckpt-workplace-assistant
branch
from
October 2, 2026 23:32
4317d35 to
92c9aad
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ananthsub/partial-ckpt-workplace-assistantananthsub/partial-ckpt-e2efeature,area:env-infra(draft, so no state label yet)What changed and why
Workplace Assistant sessions used to block a checkpoint, because the server used the default
restart_onlymode. Every rollout with a live Workplace session had to be retired and restarted from scratch. This PR lets those sessions be checkpointed and continued.checkpoint_mode = "exported"and implements the three session hooks over its per-session state. That state is the tool environment created at/seed_session: a set of in-memory pandas tables for email, calendar, analytics, project management, the customer relationship manager, and the company directory.export_session_statesencodes every table column by column. It keeps column dtypes, such as the booleanuser_engagedcolumn, and index labels, which matter because the analytics tool appends rows by label. It also keeps the difference between empty CSV cells, which load as NaN, and values a tool stored asNone. JSON writes both asnull, so NaN positions are listed separately. Encoding runs in a worker thread. Admission is closed during a commit, so no tool call changes the tables while they are encoded.restore_session_statesrebuilds every session's tool environment first and installs them only after all of them are valid. A state with missing or extra containers or tables, or with mismatched column lengths, raisesValueErrorand installs nothing./verifydiscards the session's tool environment in afinallyblock. If verify raises, the session is gone but the participant still tracks it, so the commit must not fail on it.retire_session_statedrops the session's tool environment.checkpoint_verifystays at the defaultwait. Verify computes the reward only from the response and the ground truth, but it deletes the session's state, so it is not replay-safe._TOOLKITS, instead of being repeated inseed_sessionandmcp_tools.How it works
Where this PR sits in the overall flow
The highlighted part is what this PR adds.
flowchart LR C["Controller<br/>NeMo RL, or rollout collection"] CO["Coordination<br/>prepare, commit, restore, resume, retire"] K["Control plane on every server<br/>phases, lease, storage,<br/>retire: stop, then free"] subgraph G["One participant per Gym server"] E["Environment server<br/>episode steps"] M["Policy model<br/>held responses, generation cuts"] A["Agent<br/>sessions parked at boundaries"] R["Resources server<br/>session state"] end W["Inference worker<br/>stages cut prefixes"] D[("Checkpoint directory<br/>records, then manifest")] L[("Capture ledger<br/>retire and delete from #3938, #3939")] C --> CO --> K K --> E & M & A & R M --> W M --> L G --> D classDef this fill:#fde68a,stroke:#b45309,stroke-width:2px,color:#1f2937 class R thisOne checkpoint, a crash, and the restore, end to end:
This PR
Each session's tool environment is a set of tables. A checkpoint exports them whole, and a restore rebuilds them before any of them is installed.
Where this sits in the stack
This PR builds on the partial-rollout checkpointing stack: #3882 (core) through #3889 (end-to-end suite), plus #3893 (rollout collection). It is one of five PRs that port the environments the old stack checkpointed onto the new hooks. Each one is based on #3889 and can be reviewed on its own, except Blackjack, which builds on the Gymnasium fix:
ananthsub/partial-ckpt-workplace-assistant): feat(checkpoint): checkpoint Workplace Assistant sessions (this PR)ananthsub/partial-ckpt-gymnasium): fix(gymnasium): build Gymnasium servers on the shared resources server setupananthsub/partial-ckpt-blackjack): feat(checkpoint): export Blackjack game state for partial-rollout checkpoints (on the Gymnasium PR)ananthsub/partial-ckpt-indirect-prompt-injection): feat(checkpoint): export indirect prompt injection session stateananthsub/partial-ckpt-proof-refinement): feat(checkpoint): continue proof refinement agent turns from their boundariesRelationship to the old stack
execution_to_sessionmap and the identity lookups in the tool route and verify. The v2 hooks are keyed by the cookie session ID, so neither is needed.checkpoint:<rollout>:a<attempt>session IDs on restore. The restored session keeps its original cookie session ID.to_json(orient="split")and repaired types after reading the JSON back. That turned NaN intoNoneand lost the difference between them. The new encoding keeps it.checkpoint_test_app.py) and its test. Both depend on old-stack rollout identities and on the test agent from that PR.Issue
No tracking issue exists for this re-cut. The re-cut series and the old stack's PRs carry the discussion.
Validation
Run on this branch:
RAY_TMPDIR=/tmp .venv/bin/python -m pytest -q resources_servers/workplace_assistant/tests: 36 passed, 4 of them new intests/test_checkpoint.py. The new tests drive the real control routes over ASGI:/verify. Tool outputs, every table, and the reward all match an uncheckpointed run of the same steps./verifyraised is left out of the export. The commit succeeds with only the live session, which then continues after restore.RAY_TMPDIR=/tmp .venv/bin/python -m pytest -q tests/unit_tests/test_checkpoint_*.py: 136 passed.ruff checkandruff format --checkon the changed files: clean.pre-commit run --files <changed files>: all hooks passed.Signed-off-byline.Rollout evidence
Compatibility
checkpoint:block set toenabled: true, behavior is unchanged. The hooks are only called by the checkpoint control routes.