Repository navigation
Conversation
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
Signed-off-by: Nikolai Ludwig <[email protected]>
|
/claude review |
cmunley1
left a comment
There was a problem hiding this comment.
could u include example rollouts somewhere https://docs.nvidia.com/nemo/gym/main/contribute/environments/new-environment/#4-generate-example-rollouts
|
SHIP — no reliability concerns. New
Two NOTE-level trajectory-extraction fragilities posted inline (structured content parts → |
|
|
||
| for message in messages: | ||
| if isinstance(message.get("content"), list): | ||
| message["content"] = "".join(elem["text"] for elem in message["content"]) |
There was a problem hiding this comment.
NOTE: "".join(elem["text"] for elem in message["content"]) assumes every list element is a dict with a "text" key. BenchFlow/vLLM content parts can include non-text types (e.g. image_url, tool-result blocks, or {"type": "text", ...} variants that store the string elsewhere) — any such part raises KeyError/TypeError.
BLAST RADIUS: contained — extract_trajectory is called inside a try/except in run() (app.py:411), so a raised exception only drops the trajectory to []; reward and usage still come through. Not a scoring bug, but it silently zeroes out training-signal trajectories for any task whose final exchange has structured content.
FIX: guard the extraction, e.g. "".join(e.get("text", "") for e in message["content"] if isinstance(e, dict)).
| if not trajectory_file.is_file(): | ||
| return [] | ||
|
|
||
| last_line = subprocess.check_output(["tail", "-1", str(trajectory_file)], text=True).strip() |
There was a problem hiding this comment.
NOTE: extract_trajectory shells out to tail -1 via subprocess.check_output(["tail", ...]). This adds a hard dependency on the tail binary being on PATH (fine on Linux, but a needless external process per rollout) and does not decode with errors="replace", so a non-UTF8 byte in the trajectory file raises UnicodeDecodeError. Reading the last line in pure Python (or text=True, errors="replace") avoids both. Contained by the try/except in run(), so worst case is a dropped trajectory, not a bad reward.
| @staticmethod | ||
| def _parse_task_name(instance_id: str) -> str: | ||
| """Extracts the task name from an instance id of form '<alias>::<task>' or '<task>'.""" | ||
| head, sep, tail = instance_id.partition("::") |
There was a problem hiding this comment.
This accepts absolute paths and .. components, and task_name is later used in job_name and filesystem joins. Can we restrict it to a task-directory basename and verify the resolved task path remains under tasks_dir
| response["output"] = [] | ||
| metadata["global_error"] = error_message | ||
|
|
||
| return BenchFlowVerifyResponse( |
There was a problem hiding this comment.
should it preserve instance_id and any other extra input row fields
| @@ -0,0 +1,4 @@ | |||
| -e nemo-gym[dev] @ ../../ | |||
| # Fork based on BenchFlow v0.6.3. Branch: `gym` | |||
| benchflow @ git+https://github.com/ludwig-n/benchflow@a7ccd891e4fb924f616777b49ddebc295c4c2570 | |||
There was a problem hiding this comment.
The pinned fork uses host-side httpx.AsyncClient in its Singularity and ACP transports. Gym requires async HTTP to use the shared aiohttp transport because httpx pooling can hang under concurrency. Could we adapt these transports if possible
cmunley1
left a comment
There was a problem hiding this comment.
Could it use the sandbox api in gym also? https://docs.nvidia.com/nemo/gym/infrastructure/sandbox/
|
We’re doing some cleanup of the open PR list. This PR has had no activity for over a month, so I’ve moved it back to draft. If this change is still needed, please resolve any merge conflicts and mark the PR ready for review again when it’s ready to merge. Thanks! |
Adds a new
benchflow_agentagent server integrating the BenchFlow framework into NeMo-Gym, and adds the SkillsBench benchmark that runs through it.Supports running BenchFlow through Singularity/Apptainer containers via a custom fork of BenchFlow that adds support for Singularity.
For details on how to run, see the README for
benchflow_agent.Evaluation results compared to the official SkillsBench leaderboard:
Note that the leaderboard reports an average over 3 runs. Both my runs and the official runs use OpenHands as the harness. To adapt for the cluster hardware setup, I increased the memory limit to 128 MB and disabled the timeout on the agent rollout for all tasks.