Skip to content

Conversation

@yzh119
Copy link
Collaborator

@yzh119 yzh119 commented Nov 18, 2025

📌 Description

#2097 was merged without gitlab ci finished and several UTs failed, mostly because test_utils.py was recognized as a UT, this PR fixes the issue.

🔍 Related Issues

#2097

🚀 Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.

✅ Pre-commit Checks

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • I have run the hooks manually with pre-commit run --all-files and fixed any reported issues.

If you are unsure about how to set up pre-commit, see the pre-commit documentation.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).

Reviewer Notes

Summary by CodeRabbit

  • Chores
    • Updated internal test infrastructure import paths for improved code organization and maintainability.

Note: This release contains no user-facing changes or new features.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 18, 2025

Walkthrough

Two test files in the tests/moe/ directory have been updated to import skip_checks and QuantMode from a .utils module instead of .test_utils. The import statements have been refactored with no changes to the actual functionality or usage of these utilities.

Changes

Cohort / File(s) Summary
Import path refactoring
tests/moe/test_dpsk_fused_moe_fp8.py, tests/moe/test_trtllm_gen_fused_moe.py
Updated import statements to resolve skip_checks and QuantMode from .utils instead of .test_utils

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Both changes are identical import path updates with no logic modifications
  • Verify that .utils module contains the expected exports (skip_checks, QuantMode)

Poem

🐰 A hop, a skip, imports align,
From old paths to new designs,
The utils shine with organized grace,
Tests find their home in the right place!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: renaming moe/test_utils.py to moe/utils.py, which matches the file renames reflected in the import statement changes.
Description check ✅ Passed The description includes the required sections: a clear explanation of the fix (preventing test_utils.py from being recognized as a UT), a related issues link (#2097), and completed pre-commit checks; however, the 'All tests are passing' checkbox remains unchecked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 875403e and 1c40bba.

📒 Files selected for processing (2)
  • tests/moe/test_dpsk_fused_moe_fp8.py (2 hunks)
  • tests/moe/test_trtllm_gen_fused_moe.py (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
tests/moe/test_trtllm_gen_fused_moe.py (2)
tests/moe/utils.py (1)
  • skip_checks (35-97)
tests/gemm/test_groupwise_scaled_gemm_mxfp4.py (1)
  • QuantMode (33-36)
tests/moe/test_dpsk_fused_moe_fp8.py (1)
tests/moe/utils.py (2)
  • skip_checks (35-97)
  • QuantMode (24-32)
⏰ 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: Deploy Docs
🔇 Additional comments (2)
tests/moe/test_dpsk_fused_moe_fp8.py (1)

10-10: LGTM! Import path updated correctly.

The import statement has been properly updated to reference .utils instead of .test_utils, which resolves the issue where the module was incorrectly detected as a test file.

tests/moe/test_trtllm_gen_fused_moe.py (1)

48-48: Import path correctly updated to .utils.

The import statement at line 48 has been properly updated from .test_utils to .utils. Verification confirms no remaining references to .test_utils exist anywhere in the tests/moe/ directory, and the target utils module is in place.


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.

❤️ Share

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yzh119, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request provides a hotfix to resolve CI pipeline failures stemming from a utility file being incorrectly recognized as a unit test. By renaming the problematic file and updating its import paths across the codebase, the PR ensures that the CI system correctly distinguishes between utility code and actual tests, thereby restoring pipeline stability and preventing false-positive test failures.

Highlights

  • File Renaming: The utility file moe/test_utils.py has been renamed to moe/utils.py to prevent it from being mistakenly identified and run as a unit test by the CI system.
  • Import Path Updates: All relevant import statements in tests/moe/test_dpsk_fused_moe_fp8.py and tests/moe/test_trtllm_gen_fused_moe.py have been updated to reflect the new moe/utils.py path.
  • CI Stability Fix: This hotfix addresses and resolves CI failures that occurred after the merge of refactor: update dpsk fused_moe test [2] #2097, which were caused by the previous naming convention of the utility file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@yzh119
Copy link
Collaborator Author

yzh119 commented Nov 18, 2025

/bot run

@flashinfer-bot
Copy link
Collaborator

GitLab MR !147 has been created, and the CI pipeline #38716475 is currently running. I'll report back once the pipeline job completes.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly renames tests/moe/test_utils.py to tests/moe/utils.py to fix a CI issue where the utility file was being incorrectly discovered as a test suite. The updates to import paths in dependent files are also correct. The change is sound and addresses the described problem. As a suggestion for future improvement, the skip_checks function in the newly renamed tests/moe/utils.py uses a string comparison type(moe_impl).__name__ == 'FP4Moe' to identify a specific MoE implementation, which is brittle. To avoid the circular dependency mentioned in the code, a more robust approach would be to add a property, like is_fp4, to the Moe abstract base class and override it in FP4Moe. This would allow for a safer check (moe_impl.is_fp4) and improve maintainability. This is a minor point and does not need to block this hotfix.

@yzh119 yzh119 merged commit 1c4b522 into flashinfer-ai:main Nov 18, 2025
4 checks passed
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.

3 participants