Skip to content

Conversation

2ez4bz
Copy link
Collaborator

@2ez4bz 2ez4bz commented Jul 17, 2025

Summary by CodeRabbit

  • Style

    • Improved code formatting, consistency, and readability across multiple files, including function signatures, string literals, imports, and docstrings.
    • Standardized use of double quotes for string literals and reformatted multi-line statements for clarity.
    • Removed extraneous blank lines and improved whitespace usage.
    • Reformatted asynchronous function signatures and logging messages for clarity.
    • Adjusted comments and string concatenations for better readability.
  • Chores

    • Updated configuration files to expand or clarify tool include/exclude paths for code quality tools.
    • Added .git-blame-ignore-revs file to exclude automated formatting commit from blame.
    • Enhanced comments and docstrings for better clarity and documentation.
    • Added annotations to suppress specific lint warnings in task declarations.
  • Bug Fixes

    • Improved exception handling specificity in some areas (e.g., catching specific exceptions instead of bare excepts).

[linting] Enable ruff on more files (wave 2/N)

Description

This commit is the second in a series to add more files in the include list. The order is roughly from least to most frequently updated files / directories.

Test Coverage

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--disable-fail-fast --skip-test --stage-list "A10-1, xxx" --gpu-type "A30, H100_PCIe" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-[Post-Merge]-1, xxx"]

Launch build/test pipelines. All previously running jobs will be killed.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests. Will also run L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-[Post-Merge]-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-[Post-Merge]-1, xxx".

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@2ez4bz 2ez4bz requested a review from a team as a code owner July 17, 2025 23:33
@2ez4bz 2ez4bz requested review from yilin-void and liji-nv July 17, 2025 23:33
Copy link
Contributor

coderabbitai bot commented Jul 17, 2025

Walkthrough

This update primarily focuses on code style and formatting improvements across a wide range of files, including model implementations, configuration classes, utility scripts, and scaffolding modules. The changes standardize string literal usage, reformat argument lists and dictionary constructions, and enhance code readability. There are also updates to configuration exclusions/inclusions in pyproject.toml and minor comment clarifications. No logic, behavior, or public interface changes were introduced.

Changes

File(s) Change Summary
pyproject.toml Expanded tooling exclude/include paths for isort, yapf, autoflake, and ruff; minor comment rewording.
.../_tensorrt_engine/init.py, .../_torch/shared_tensor/init.py, .../contrib/mcp/init.py Reformatted __all__ lists and import statements for style consistency.
.../_torch/debug/debug_hook.py, .../scaffolding/contrib/AsyncGeneration/stream_generation.py Reformatted function signatures and multi-line expressions for clarity; no logic changes.
.../_torch/peft/lora/layer.py, .../_torch/shared_tensor/shared_tensor.py Reformatted enums, class constructors, and dictionary constructions; standardized string literals.
.../evaluate/lm_eval_tasks/gpqa/cot_zeroshot_aa/utils.py, .../contrib/mcp/mcp_worker.py, .../contrib/mcp/mcp_utils.py Removed extraneous blank lines; minor docstring and print statement adjustments.
.../models/clip/model.py, .../models/mmdit_sd3/config.py, .../models/mmdit_sd3/model.py, .../models/multimodal_encoders/config.py, .../models/multimodal_encoders/model.py, .../models/stdit/config.py, .../models/stdit/model.py Reformatted constructors, method signatures, and internal logic for style and readability; no logic changes.
.../scaffolding/contrib/Dynasor/dynasor_controller.py, .../scaffolding/contrib/Dynasor/evaluator.py Improved docstrings, exception handling, string formatting, and code style; no functional changes.
.../scaffolding/contrib/mcp/chat_handler.py, .../scaffolding/contrib/mcp/mcp_controller.py, .../scaffolding/contrib/mcp/mcp_task.py Reformatted function calls, string literals, added noqa comments, and improved list comprehensions.
.git-blame-ignore-revs Added file containing commit hash for ignoring automated formatting commit in git blame.

Poem

The code is neat, the lines aligned,
With double quotes and docs refined.
No logic changed, just style anew—
A rabbit’s hop through code review!
From configs deep to models wide,
Clean code’s a burrow we provide. 🐇✨

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb20553 and 701822c.

📒 Files selected for processing (24)
  • .git-blame-ignore-revs (1 hunks)
  • pyproject.toml (5 hunks)
  • tensorrt_llm/_tensorrt_engine/__init__.py (1 hunks)
  • tensorrt_llm/_torch/debug/debug_hook.py (7 hunks)
  • tensorrt_llm/_torch/peft/lora/layer.py (4 hunks)
  • tensorrt_llm/_torch/shared_tensor/__init__.py (1 hunks)
  • tensorrt_llm/_torch/shared_tensor/shared_tensor.py (14 hunks)
  • tensorrt_llm/evaluate/lm_eval_tasks/gpqa/cot_zeroshot_aa/utils.py (0 hunks)
  • tensorrt_llm/models/clip/model.py (5 hunks)
  • tensorrt_llm/models/mmdit_sd3/config.py (2 hunks)
  • tensorrt_llm/models/mmdit_sd3/model.py (16 hunks)
  • tensorrt_llm/models/multimodal_encoders/config.py (5 hunks)
  • tensorrt_llm/models/multimodal_encoders/model.py (3 hunks)
  • tensorrt_llm/models/stdit/config.py (2 hunks)
  • tensorrt_llm/models/stdit/model.py (40 hunks)
  • tensorrt_llm/scaffolding/contrib/AsyncGeneration/stream_generation.py (2 hunks)
  • tensorrt_llm/scaffolding/contrib/Dynasor/dynasor_controller.py (4 hunks)
  • tensorrt_llm/scaffolding/contrib/Dynasor/evaluator.py (40 hunks)
  • tensorrt_llm/scaffolding/contrib/mcp/__init__.py (1 hunks)
  • tensorrt_llm/scaffolding/contrib/mcp/chat_handler.py (2 hunks)
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_controller.py (3 hunks)
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_task.py (2 hunks)
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_utils.py (3 hunks)
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_worker.py (0 hunks)
💤 Files with no reviewable changes (2)
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_worker.py
  • tensorrt_llm/evaluate/lm_eval_tasks/gpqa/cot_zeroshot_aa/utils.py
✅ Files skipped from review due to trivial changes (2)
  • tensorrt_llm/scaffolding/contrib/Dynasor/dynasor_controller.py
  • tensorrt_llm/models/mmdit_sd3/model.py
🚧 Files skipped from review as they are similar to previous changes (20)
  • tensorrt_llm/scaffolding/contrib/mcp/init.py
  • tensorrt_llm/_tensorrt_engine/init.py
  • .git-blame-ignore-revs
  • tensorrt_llm/_torch/shared_tensor/init.py
  • tensorrt_llm/scaffolding/contrib/mcp/chat_handler.py
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_utils.py
  • tensorrt_llm/models/multimodal_encoders/config.py
  • tensorrt_llm/_torch/peft/lora/layer.py
  • tensorrt_llm/scaffolding/contrib/AsyncGeneration/stream_generation.py
  • tensorrt_llm/models/clip/model.py
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_controller.py
  • tensorrt_llm/models/mmdit_sd3/config.py
  • tensorrt_llm/scaffolding/contrib/Dynasor/evaluator.py
  • tensorrt_llm/models/stdit/config.py
  • pyproject.toml
  • tensorrt_llm/_torch/debug/debug_hook.py
  • tensorrt_llm/_torch/shared_tensor/shared_tensor.py
  • tensorrt_llm/scaffolding/contrib/mcp/mcp_task.py
  • tensorrt_llm/models/multimodal_encoders/model.py
  • tensorrt_llm/models/stdit/model.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
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@@ -0,0 +1,2 @@
# Ruff formatting / linting adoption.
dc52b67492b2f6531e310bed90f88c8427ad3908
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for the commit from #5140.

I will add more commits in here once PRs get merged.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the files in this branch it seems to work fine on the GitHub web file browser.

@2ez4bz
Copy link
Collaborator Author

2ez4bz commented Jul 18, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12274 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12274 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #9114 completed with status: 'FAILURE'

@2ez4bz
Copy link
Collaborator Author

2ez4bz commented Jul 18, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12288 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12288 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #9125 completed with status: 'FAILURE'

@2ez4bz
Copy link
Collaborator Author

2ez4bz commented Jul 18, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12324 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12324 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #9155 completed with status: 'FAILURE'

@2ez4bz
Copy link
Collaborator Author

2ez4bz commented Jul 18, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12351 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12351 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #9173 completed with status: 'FAILURE'

@2ez4bz 2ez4bz closed this Aug 12, 2025
@2ez4bz
Copy link
Collaborator Author

2ez4bz commented Aug 12, 2025

Closing due to lack of interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants