Skip to content

[NVBug 6900453] Fix xlam_fc string-typed schema and all-turn scoring that zero correct calls #4532

Closed

Description

@qiaochuz-nv

Queue rank 43/48 · Difficulty 3/5 · Status on main: not_fixed

NVBug: https://nvbugspro.nvidia.com/bug/6900453 · NVBug priority: Unprioritized (suggested P2) · ARB: Ananth Subramaniam
GitHub: no fix PR found · origin #262 (merged) · precedent #2270 (NVBug 6533992, added a tool route)

Summary

xlam_fc is a single-turn function-calling environment. Two defects give reward 0 to correct tool calls. (a) generate_dataset.py maps compound xlam type strings (int, optional, List[int], bool, optional, Tuple[...]) to JSON-schema "string", so a schema-conforming call sends "30" and the verifier's strict != scores 0. 24.84% of train and 25.0% of valid rows are affected (figures from the QA-run regenerated data). (b) The resources server defines no tool routes, so every call returns HTTP 404; with no max_steps, the model retries, and the verifier counts function_call items from all turns, failing rows whose first turn was correct.

Reproduction

Deterministic, offline, no GPU. Run the bug's Evidence-A script from the Gym checkout root. It prints: generated schema {'nums': {'type': 'string'}}; List[int] -> string; schema-conforming string reward=0.0; POST routes lack any tool route; POST /timezone_for_location -> 404; first-turn-correct reward=1.0, with one 404 retry reward=0.0.

Root cause

(a) generate_dataset.py:41 return type_mapping.get(param_type.lower(), "string") knows only bare names; app.py:_function_calls_match (app.py:70) compares native expected values with !=. (b) base_resources_server.py:250-260 registers only seed/close/verify/aggregate; xlam_fc adds no route; simple_agent/app.py forwards each call to /{name} (404 becomes the tool output); app.py:_extract_function_calls_from_response (:78) counts all turns and requires num_correct == len(expected) == len(predicted) (:107).

Status on main (not_fixed)

HEAD 75bb53e. All four xlam_fc blobs byte-identical to the bug. git log efe58abe..HEAD -- resources_servers/xlam_fc/ is empty; yaml still has no max_steps. simple_agent blob changed (now a90bc0e3ba via #4449/#4111) but the forwarding/max_steps lines are intact, so (b) still holds. No fix PR.

Proposed fix

(a) Rewrite convert_parameter_type to strip , optional/, default=, map List/Tuple/Set[...]->array (with items), Dict[...]->object, Union->untyped; regenerate train/valid + example data; bump gitlab artifact xlam_function_calling_60k to 0.0.2. (b, verifier-side) in app.py, score only function_call items before the first function_call_output. Optionally add a catch-all POST /{tool_name} (precedent citation_if/app.py:134, #2270). Add CPU unit tests; regenerate example_rollouts.jsonl.

Validation

testcases/environments/xlam_fc.py (in nmfw_tests, not Gym; registry already status: fail, nvbugs_status: open): update converted() line 118 and oracle() 141-163, add a first-turn-then-404 control. Re-run ./run.sh test xlam_fc. Note data/train.jsonl/valid.jsonl are gitignored regenerated outputs.

Triage

Difficulty 3/5 — root cause pinpointed, but spans two files, a part-(b) scoring-contract design choice needing maintainer agreement, new tests, and dataset regeneration + artifact version bump. Effort ~10 h. Needs GPU/model: no. External dependency: HF gated xlam-60k (HF_TOKEN) + GitLab artifact republish.

Reviewer notes

Verifier confirmed not_fixed and difficulty 3 (high confidence). Corrections applied: flagged that data/train.jsonl/valid.jsonl are gitignored regenerated outputs and xlam_fc.py lives in nmfw_tests (both kept in scope); noted the 24.84%/25.0% figures come from QA-run regenerated data; updated the stale simple_agent blob note (now a90bc0e3ba, forwarding unchanged). Verifier also suggested the title read "zero correct tool calls".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions