Skip to content

[TRTLLM-16757][fix] Forward-port configuration model-list telemetry capture to main - #19811

Merged
Mgluhovskoi merged 6 commits into
NVIDIA:mainfrom
Mgluhovskoi:fix/telemetry-model-list-capture-main
Oct 5, 2026
Merged

Mgluhovskoi merged 6 commits into
NVIDIA:mainfrom
Mgluhovskoi:fix/telemetry-model-list-capture-main

Conversation

@Mgluhovskoi

@Mgluhovskoi Mgluhovskoi commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Cherry-pick forward-port of #19779 from release/1.3 to main, including Brian's duplicate-route guard and the truncation-metadata fix.

Capture safe fields inside lists of configuration models and describe their outer lists in the manifest, for example list[tuple[int|literal]]. Privacy exclusions and size limits remain enforced. Field policy version advances to 4; the event schema is unchanged.

The old traversal listed fields beneath tuple/set model containers but could not capture them. Those containers now stay out of the manifest too; no existing golden entries are removed. Tuple-valued scalar fields remain supported. The documentation diff refreshes stale rows from the existing golden, not additional collection introduced here.

Neither this main snapshot nor the release PR's snapshot contains the extra-input declarations from #19736, so there are no list-projection golden/doc rows yet. Regenerate the golden after combining the corresponding feature with this fix.

Validation: 70 focused capture tests passed on each branch, plus 19 manifest/documentation tests on main. Lint checks passed and the main golden matches generated output. No GPU inference or live ingestion testing was performed.

Dev Engineer Review

  • Field policy version advances to 4. The event schema remains unchanged.
  • Manifest traversal follows nested models through unions and lists. It excludes tuple, set, and dict model containers. Runtime capture checks model types against the manifest route and preserves list positions. If a list element is absent or unsafe, capture omits the whole projected field.
  • List projection adds the outer container to each reported capture policy. The implementation retains sequence and payload limits, explicit exclusions, and per-union-arm policies.
  • The change rejects duplicate model routes and conflicting manifest kinds. No current review findings or severity counts were supplied.
  • The PR objective says tuple-valued scalar fields remain supported. Model-sequence tests specifically check that tuple, set, and other unsupported model containers do not enroll or capture children.

QA Engineer Review

  • tests/unittest/usage/test_llmapi_config_capture.py updates the expected field policy version to 4.
  • tests/unittest/usage/test_llmapi_model_sequences.py adds CPU-only coverage for manifest and payload agreement, empty and unset parents, duplicate routes, nullable leaves, unsupported containers, union-arm policies, unsafe elements, truncation, payload limits, and excluded fields.
  • The supplied test results report 70 focused capture tests passing on each branch and 19 manifest/documentation tests passing on main. They also report lint passing and the main golden matching generated output. No GPU inference or live ingestion testing was performed.
  • The changed tests are unit tests, not integration tests. No integration test-list update applies. Coverage verdict: sufficient for the targeted capture and manifest behavior; GPU inference and live ingestion remain untested.

Per-File QA Perspective

  • tensorrt_llm/usage/llmapi_config.py — Verify that list projections include only fields allowed by the active model route. Check that exclusions, unsafe elements, truncation, and payload limits produce the expected capture metadata.
  • docs/source/developer-guide/telemetry.md — Verify that manifest counts, captured fields, and categorical choices match the generated golden. The supplied objectives note that extra-input declarations are absent from both snapshots, so related list-projection documentation and golden rows are not included.
  • tests/unittest/usage/test_llmapi_config_capture.py — Checks failure metadata’s field policy version and existing capture-safety behavior. This unit test is not listed in the integration CI or manual-QA lists.
  • tests/unittest/usage/test_llmapi_model_sequences.py — Checks nested model-list capture, route matching, privacy exclusions, and size limits. This unit test is not listed in the integration CI or manual-QA lists.

Signed-off-by: Maxim Gluhovskoi <[email protected]>
(cherry picked from commit b2e156a)
Signed-off-by: Maxim Gluhovskoi <[email protected]>
(cherry picked from commit 0b04f8f)
Signed-off-by: Maxim Gluhovskoi <[email protected]>
(cherry picked from commit 6c82a3a)
Signed-off-by: Maxim Gluhovskoi <[email protected]>
(cherry picked from commit 271a669)
Signed-off-by: Maxim Gluhovskoi <[email protected]>
(cherry picked from commit 837e238)
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/TensorRT-LLM/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f43586f4-ba80-4c46-a71c-f243c7f03394

📥 Commits

Reviewing files that changed from the base of the PR and between 4c5f64c and 95e9326.

📒 Files selected for processing (3)
  • docs/source/developer-guide/telemetry.md
  • tensorrt_llm/usage/llmapi_config.py
  • tests/unittest/usage/test_llmapi_model_sequences.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.


Walkthrough

Telemetry capture now records nested model routes in its field manifest and uses matching routes to capture safe values at runtime. The documentation and tests reflect the updated policy version, captured fields, and sequence handling.

Changes

Telemetry capture

Layer / File(s) Summary
Route-aware manifest
tensorrt_llm/usage/llmapi_config.py, tests/unittest/usage/test_llmapi_model_sequences.py, docs/source/developer-guide/telemetry.md
Manifest discovery follows unions and lists, records model routes, and derives policies that include enclosing lists. Tests cover route discovery and supported shapes. Documentation lists additional captured fields and categorical values.
Runtime route projection
tensorrt_llm/usage/llmapi_config.py, tests/unittest/usage/test_llmapi_model_sequences.py, tests/unittest/usage/test_llmapi_config_capture.py
The collector matches runtime values against each route and captures safe values. List projection preserves positions and applies sequence and payload limits. Tests cover union-arm matching, unsafe or missing elements, truncation, and the updated policy version.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant collector
  participant capture_path as _capture_path
  participant route as PolicyVariant route
  collector->>capture_path: request capture for a field
  capture_path->>route: traverse runtime models and lists
  capture_path-->>collector: return presence, safety, and sanitized value
  collector->>collector: add present safe value to payload
Loading

Suggested reviewers: bowenfu, brnguyen2

Merge Risk: ⚪ Minimal · up to 95e93

The telemetry changes are ready to merge after normal checks; no unresolved issue was established in the reviewed paths.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 3 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the ticket, fix type, forward-port action, and configuration-model telemetry capture change.
Description check ✅ Passed The description explains the issue, solution, scope, compatibility impact, test coverage, and known testing limits. It does not include the template's explicit section headings or completed PR checkli…
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@Mgluhovskoi

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76087 [ run ] triggered by Bot. Commit: 4c5f64c Link to invocation

@brnguyen2 brnguyen2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving — the comments below are optional touch-ups, not blockers.

Ran the three tests/unittest/usage files locally against this head: 89 passed, including the committed-golden match. Route/segment handling in _capture_path holds up: the model count in every route equals the path segment count, so the shared segment_index stays consistent across variants.

Two whole-PR notes:

  • The telemetry.md refresh is already two rows behind the golden in this branch's own base (see inline). Since the description says the doc diff "refreshes stale rows from the existing golden", regenerate it from the current golden before merge.
  • [None] on a behavior-changing fix with a field-policy-version bump: fine if the release PR #19779 carries the tracking, but if that one also has no ticket, this is the place to add one since the wire format for list-projected keys is new.

Comment thread tensorrt_llm/usage/llmapi_config.py Resolved
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements.

@Mgluhovskoi

Copy link
Copy Markdown
Collaborator Author

/bot run

@Mgluhovskoi Mgluhovskoi changed the title [None][fix] Forward-port configuration model-list telemetry capture to main [TRTLLM-16757][fix] Forward-port configuration model-list telemetry capture to main Oct 2, 2026
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76114 [ run ] triggered by Bot. Commit: 95e9326 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76087 [ run ] completed with state ABORTED. Commit: 4c5f64c

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #76114 [ run ] completed with state SUCCESS. Commit: 95e9326
/LLM/main/L0_MergeRequest_PR pipeline #62751 completed with status: 'SUCCESS'

CI Report

Link to invocation

@Mgluhovskoi
Mgluhovskoi merged commit 276cc12 into NVIDIA:main Oct 5, 2026
farazkh80 added a commit to farazkh80/TensorRT-LLM that referenced this pull request Oct 13, 2026
…atches_committed_golden

The golden manifest is current again on main (regenerated most recently
in NVIDIA#20077, after drifting via NVIDIA#19811 while this waiver hid the gate), so
re-enable the premerge privacy gate.

Signed-off-by: Faraz Khoubsirat <[email protected]>
farazkh80 added a commit to farazkh80/TensorRT-LLM that referenced this pull request Oct 14, 2026
…atches_committed_golden

The golden manifest is current again on main (regenerated most recently
in NVIDIA#20077, after drifting via NVIDIA#19811 while this waiver hid the gate), so
re-enable the premerge privacy gate.

Signed-off-by: Faraz Khoubsirat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants