Skip to content

feat(nemo_fabric_agent): import measured Relay tool timing - #6958

Draft
RyaliNvidia wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
RyaliNvidia:codex/import-relay-tool-timing
Draft

RyaliNvidia wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
RyaliNvidia:codex/import-relay-tool-timing

Conversation

@RyaliNvidia

Copy link
Copy Markdown
Contributor

What does this PR do?

Import tool start/end timestamps already recorded in Fabric's retained Relay ATIF trajectories into Gym's ng_agent_observations. Today the timestamps remain only in fabric_result.relay_atif, so consumers of Gym's structured observations cannot use them.

Match each interval to a tool call in the same step and retain the trajectory ID as the invocation identity, including subagent trajectories. Use the existing AgentObservationBundle, ToolCallObservation and timing normalizer. Skip copied context, unmatched calls and unusable intervals; deduplicate identical snapshots and omit conflicting measurements. Keep the raw Fabric result intact and omit the observation field when there is no usable timing.

Extend the existing Fabric /run regression and add response-serialization coverage for subagent identity, duplicates, conflicts, missing ownership, copied context, and invalid timestamps. Document the observation field in the component README.

Related: #5057 introduced the retained Relay trajectories; #5660 introduced Gym's tool-timing observations. No separate issue: this is a focused integration of those existing representations.

Validation

Base: 228a16b96df8f925220a7edbff2d7d22317c78fb. Python 3.13.14, uv 0.13.4, frozen Fabric component environment.

uv sync --project responses_api_agents/nemo_fabric_agent --python 3.13.14 --frozen
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 responses_api_agents/nemo_fabric_agent/.venv/bin/python -m pytest -p pytest_asyncio.plugin responses_api_agents/nemo_fabric_agent/tests tests/unit_tests/trajectory/test_tool_timing.py tests/unit_tests/trajectory/test_trajectory_projection.py -q -o addopts='' --tb=short
pre-commit run --all-files
git diff --check
  • Fabric component and shared timing/projection suites: 237 passed.
  • Focused timing selection: 15 passed. Restoring the component implementation to the base revision makes the two success-path regressions fail; thirteen omission/rejection cases also pass on the base.
  • All available pre-commit hooks passed, including package layering and Ruff. The private guardwords catalog was unavailable, so that hook skipped its content scan. Whitespace checks passed.
  • CI classification: server-only; trusted CI should cover core/sandbox tests and the changed Fabric component.

Rollouts and readiness

Draft pending a representative real-model Fabric + Relay smoke rollout, following the agent-change requirement in the contributing guide. Before marking ready, inspect the agent output and verifier result, and check that exported tool intervals match the retained Relay trajectory. No live-model rollout, container build or remote-sandbox qualification was performed for this commit.

The local /run test exercises response assembly and verification with deterministic Fabric and resources-server results. It does not establish live adapter instrumentation fidelity.

Compatibility and benchmark impact

This adds structured timing observations when the retained Relay artifact contains a matched, complete measurement. It introduces no dependency or configuration change and does not instrument tool execution, infer missing timestamps, change model prompts, or alter verification/rewards. Timing source remains nemo_relay; clock domain and durations are not invented. No benchmark-performance claim is made.

Checklist

  • I have read the contributing guidelines.
  • The change is focused.
  • Regression tests added and applicable local suites pass.
  • Component documentation updated.
  • Representative real-model Fabric + Relay smoke rollout and inspection.
  • Complete pre-commit content scanning: available hooks passed; private guardwords catalog unavailable.
  • Existing source license headers preserved; no new source files.
  • Commit includes DCO sign-off.

Signed-off-by: RyaliNvidia <ryali@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@RyaliNvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 57df3c4

@RyaliNvidia RyaliNvidia added area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work labels Nov 30, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the risk:mid Autobot PR risk: mid label Nov 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent harnesses and Responses API agent behavior feature New capabilities, enhancements, or enablement work risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants