Repository navigation
Conversation
Give new users a complete README for the stateful counter example so they can learn session_id → counter without leaving the folder (closes NVIDIA-NeMo#222). Signed-off-by: Muhib Waqar <muhibwaqar@hotmail.com>
7 tasks done
cmunley1
added a commit
that referenced
this pull request
Sep 29, 2026
…3758) ## What does this PR do? `client.py` for `example_session_state_mgmt` sends only `expected_count`, but `StatefulCounterSeedSessionRequest` requires `initial_count`. The agent's `/seed_session` call returns 422 (`initial_count: Field required`), so the example never gets to a rollout. This adds `"initial_count": 0`, which matches the prompt ("add 4 then add 3", expected 7). Found while reviewing #3512, which documents this client. ## Validation Ran `client.py` against `gym env start --resources-server example_session_state_mgmt --model-type vllm_model` (Nemotron 3.5 Lightning): - Before: agent `/seed_session` returns 422 `initial_count: Field required`, no rollout. - After: `increment_counter(4)`, `increment_counter(3)`, `get_counter_value` returns 7, reward 1.0. `ruff check` and `ruff format --check` pass. ## Rollouts The one `client.py` run above. The dataset rows already carry `initial_count`, so `gym eval run` on `example.jsonl` was unaffected. ## Compatibility and benchmark impact None. Example client only. ## Checklist - [x] I have read the [contributing guidelines](https://github.com/NVIDIA-NeMo/Gym/blob/main/CONTRIBUTING.md). - [x] The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs. - [x] Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable). - [x] Documentation added or updated, or N/A with justification. - [x] Pre-commit checks pass locally (`pre-commit run --all-files`) (so CI lint/format checks pass). - [x] New source files include the required Apache-2.0 SPDX header. - [x] All commits have DCO sign-off (`git commit -s`) (so the DCO check passes). Signed-off-by: Christian Munley <cmunley@nvidia.com>
This was referenced Oct 22, 2026
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.
What does this PR do?
Closes #222.
Fills in
resources_servers/example_session_state_mgmt/README.mdso the stateful counter example can be used as an onboarding step: what it shows, session id → counter, when in-memory state is enough, a walk throughapp.py, how to run, and how to test. Adds simple NVIDIA-styled diagrams and points at larger session-state environments (Workplace Assistant, ToolSandbox, Calendar, ns_tools, Harbor).Validation
app.py/tests/test_app.py/ the YAML agent name.graphics/gym.htmllocally to check diagrams.gym env start/ live eval (docs-only; needs a model key).pre-commit run --all-fileson the whole tree; happy to if requested.Rollouts
N/A — documentation only. No environment or agent behavior change.
Compatibility and benchmark impact
None.
Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).Proposed labels:
documentation,env-infra(matching #222).A short note on why I picked this issue: I saw the NeMo Gym team is hiring interns. I am a second-year Mathematics student at the University of Waterloo, and I have been using NeMo Gym because I like the way environments are built here. I wanted this PR both as a concrete way to introduce myself and as a chance to spend more time in the repo — starting with the stateful-example onboarding gap in #222. Happy to iterate on review.