Repository navigation
removed simple_agent_stateful, uses fastapi to keep track of session - #44
Merged
Merged
Conversation
RahulSChand
force-pushed
the
python_math_exec_nostateful
branch
from
September 12, 2025 19:32
eab3f9e to
afacdab
Compare
bxyu-nvidia
requested changes
Sep 15, 2025
| result: Optional[str] = None | ||
| # NEW: always echo the session back so the client can reuse it | ||
| session_id: str | ||
| session_id: str # keep for debugging/visibility |
Contributor
There was a problem hiding this comment.
won't this be sent to the model? if so, can we remove this?
…ack of session Signed-off-by: Rahul Chand <[email protected]>
Signed-off-by: Rahul Chand <[email protected]>
Signed-off-by: Rahul Chand <[email protected]>
Signed-off-by: Rahul Chand <[email protected]>
RahulSChand
force-pushed
the
python_math_exec_nostateful
branch
from
September 17, 2025 16:03
6377c4a to
3770ad5
Compare
bxyu-nvidia
approved these changes
Sep 18, 2025
abhibha-nvidia
pushed a commit
that referenced
this pull request
Sep 28, 2025
…44) ### Switch python_math_exec to use session cookies and fix tool usage ### Changes 1. Updated `python_math_exec` server to use built-in session cookies: - Removed manual `session_id` handling from request/response models - Now using `request.session[SESSION_ID_KEY]` for state tracking 2. Removed `simple_agent_stateful/*` ### To test, follow these steps from the README.md of `python_math_exec` 1. Download dataset ``` ng_download_dataset_from_gitlab \ +dataset_name=open_math_reasoning_problems_tool \ +version=0.0.1 \ +artifact_fpath=open_math_reasoning_problems_tool.jsonl \ +output_fpath=data/open_math_reasoning_problems_tool.jsonl ``` 2. Start server ``` ng_run "+config_paths=[responses_api_agents/simple_agent/configs/simple_agent.yaml,responses_api_models/openai_model/configs/openai_model.yaml,resources_servers/python_math_exec/configs/python_math_exec.yaml]" +simple_agent.responses_api_agents.simple_agent.resources_server.name=python_math_exec ``` 3. Collect trajectories ``` ng_collect_rollouts +agent_name=simple_agent +input_jsonl_fpath=data/open_math_reasoning_problems_tool.jsonl +output_jsonl_fpath=results/open_math_reasoning_problems_tool_output_new.jsonl +limit=1 ``` --------- Signed-off-by: Rahul Chand <[email protected]> Co-authored-by: Rahul Chand <[email protected]> Signed-off-by: Abhibha Gupta <[email protected]>
abhibha-nvidia
pushed a commit
that referenced
this pull request
Sep 29, 2025
…44) ### Switch python_math_exec to use session cookies and fix tool usage ### Changes 1. Updated `python_math_exec` server to use built-in session cookies: - Removed manual `session_id` handling from request/response models - Now using `request.session[SESSION_ID_KEY]` for state tracking 2. Removed `simple_agent_stateful/*` ### To test, follow these steps from the README.md of `python_math_exec` 1. Download dataset ``` ng_download_dataset_from_gitlab \ +dataset_name=open_math_reasoning_problems_tool \ +version=0.0.1 \ +artifact_fpath=open_math_reasoning_problems_tool.jsonl \ +output_fpath=data/open_math_reasoning_problems_tool.jsonl ``` 2. Start server ``` ng_run "+config_paths=[responses_api_agents/simple_agent/configs/simple_agent.yaml,responses_api_models/openai_model/configs/openai_model.yaml,resources_servers/python_math_exec/configs/python_math_exec.yaml]" +simple_agent.responses_api_agents.simple_agent.resources_server.name=python_math_exec ``` 3. Collect trajectories ``` ng_collect_rollouts +agent_name=simple_agent +input_jsonl_fpath=data/open_math_reasoning_problems_tool.jsonl +output_jsonl_fpath=results/open_math_reasoning_problems_tool_output_new.jsonl +limit=1 ``` --------- Signed-off-by: Rahul Chand <[email protected]> Co-authored-by: Rahul Chand <[email protected]> Signed-off-by: Abhibha Gupta <[email protected]>
abubakaria56
pushed a commit
to abubakaria56/Gym
that referenced
this pull request
Mar 2, 2026
…VIDIA-NeMo#44) ### Switch python_math_exec to use session cookies and fix tool usage ### Changes 1. Updated `python_math_exec` server to use built-in session cookies: - Removed manual `session_id` handling from request/response models - Now using `request.session[SESSION_ID_KEY]` for state tracking 2. Removed `simple_agent_stateful/*` ### To test, follow these steps from the README.md of `python_math_exec` 1. Download dataset ``` ng_download_dataset_from_gitlab \ +dataset_name=open_math_reasoning_problems_tool \ +version=0.0.1 \ +artifact_fpath=open_math_reasoning_problems_tool.jsonl \ +output_fpath=data/open_math_reasoning_problems_tool.jsonl ``` 2. Start server ``` ng_run "+config_paths=[responses_api_agents/simple_agent/configs/simple_agent.yaml,responses_api_models/openai_model/configs/openai_model.yaml,resources_servers/python_math_exec/configs/python_math_exec.yaml]" +simple_agent.responses_api_agents.simple_agent.resources_server.name=python_math_exec ``` 3. Collect trajectories ``` ng_collect_rollouts +agent_name=simple_agent +input_jsonl_fpath=data/open_math_reasoning_problems_tool.jsonl +output_jsonl_fpath=results/open_math_reasoning_problems_tool_output_new.jsonl +limit=1 ``` --------- Signed-off-by: Rahul Chand <[email protected]> Co-authored-by: Rahul Chand <[email protected]>
abubakaria56
pushed a commit
to abubakaria56/Gym
that referenced
this pull request
Mar 2, 2026
…VIDIA-NeMo#44) ### Switch python_math_exec to use session cookies and fix tool usage ### Changes 1. Updated `python_math_exec` server to use built-in session cookies: - Removed manual `session_id` handling from request/response models - Now using `request.session[SESSION_ID_KEY]` for state tracking 2. Removed `simple_agent_stateful/*` ### To test, follow these steps from the README.md of `python_math_exec` 1. Download dataset ``` ng_download_dataset_from_gitlab \ +dataset_name=open_math_reasoning_problems_tool \ +version=0.0.1 \ +artifact_fpath=open_math_reasoning_problems_tool.jsonl \ +output_fpath=data/open_math_reasoning_problems_tool.jsonl ``` 2. Start server ``` ng_run "+config_paths=[responses_api_agents/simple_agent/configs/simple_agent.yaml,responses_api_models/openai_model/configs/openai_model.yaml,resources_servers/python_math_exec/configs/python_math_exec.yaml]" +simple_agent.responses_api_agents.simple_agent.resources_server.name=python_math_exec ``` 3. Collect trajectories ``` ng_collect_rollouts +agent_name=simple_agent +input_jsonl_fpath=data/open_math_reasoning_problems_tool.jsonl +output_jsonl_fpath=results/open_math_reasoning_problems_tool_output_new.jsonl +limit=1 ``` --------- Signed-off-by: Rahul Chand <[email protected]> Co-authored-by: Rahul Chand <[email protected]>
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.
Switch python_math_exec to use session cookies and fix tool usage
Changes
Updated
python_math_execserver to use built-in session cookies:session_idhandling from request/response modelsrequest.session[SESSION_ID_KEY]for state trackingRemoved
simple_agent_stateful/*To test, follow these steps from the README.md of
python_math_exec