-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[None][doc] fix example in docstring #7410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[None][doc] fix example in docstring #7410
Conversation
Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
|
/bot run |
📝 WalkthroughWalkthroughDocstring example in cu_seqlens_to_chunk_indices_offsets updated: for cu_seqlens = [0, 5, 10] and chunk_size = 8, chunk_indices corrected from [0, 1, 0] to [0, 0, 1]. No code or behavior changes; chunk_offsets remains [0, 5, 0]. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tensorrt_llm/_torch/modules/mamba/mamba2_metadata.py (2)
1-2: Consider updating the header year range to include 2025.Repo guideline says to prepend the current year; this header ends at 2024. If policy permits, update to 2022–2025.
-# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
81-84: Typo in comment: “inidces” → “indices”.Minor readability nit.
- # adjust inidces and offsets + # adjust indices and offsets
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
tensorrt_llm/_torch/modules/mamba/mamba2_metadata.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{cpp,cc,cxx,cu,h,hpp,hh,hxx,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.{cpp,cc,cxx,cu,h,hpp,hh,hxx,cuh,py}: Use spaces only; no tabs; indent with 4 spaces
Prepend NVIDIA copyright header (current year) to all source files (.cpp, .h, .cu, .py, etc.)
Files:
tensorrt_llm/_torch/modules/mamba/mamba2_metadata.py
**/*.py
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.py: Python code must target Python 3.8+
Indent Python with 4 spaces; no tabs
Preserve module namespaces when importing: from package.subpackage import foo; then call foo.SomeClass() instead of importing the class directly
Python naming: files snake_case; classes PascalCase; functions/methods snake_case; locals snake_case (prefix k_ when starting with a number); globals UPPER_SNAKE_CASE with G_ prefix; constants UPPER_SNAKE_CASE
Avoid shadowing outer-scope variables; initialize all externally visible members in init
Prefer docstrings for interfaces used outside a file; limit comments to function-internal or file-local interfaces
Use Google-style docstrings for classes and functions; document attributes/variables inline so Sphinx can render them
Avoid reflection when simpler alternatives exist; prefer explicit parameters and return dicts over locals()/dynamic tricks
In try/except, catch the narrowest exceptions possible; keep try bodies minimal and use else for the main logic when doing duck-typing checks
Files:
tensorrt_llm/_torch/modules/mamba/mamba2_metadata.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
🔇 Additional comments (1)
tensorrt_llm/_torch/modules/mamba/mamba2_metadata.py (1)
48-49: Docstring example fix is correct.For cu_seqlens = [0, 5, 10] and chunk_size = 8, the logical chunks map to physical chunks [0, 0, 1] with offsets [0, 5, 0]. Change aligns with the explanation.
Signed-off-by: Tomer Asida <57313761+tomeras91@users.noreply.github.com>
|
/bot run |
|
PR_Github #17121 [ run ] triggered by Bot |
|
PR_Github #17122 [ run ] triggered by Bot |
|
PR_Github #17121 [ run ] completed with state |
|
/bot run |
|
PR_Github #17125 [ run ] triggered by Bot |
|
PR_Github #17122 [ run ] completed with state |
|
PR_Github #17125 [ run ] completed with state |
|
/bot run |
|
PR_Github #17129 [ run ] triggered by Bot |
|
PR_Github #17129 [ run ] completed with state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
/bot run |
|
PR_Github #17156 [ run ] triggered by Bot |
|
PR_Github #17156 [ run ] completed with state |
|
/bot run |
|
PR_Github #17304 [ run ] triggered by Bot |
|
PR_Github #17304 [ run ] completed with state |
Summary by CodeRabbit
Description
Fix a wrong expected output in the docstring of
cu_seqlens_to_chunk_indices_offsets. The explanation was correct, but the expected output had a typo and didn't matchPR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.