Skip to content

Conversation

@merrymercy
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @merrymercy, 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 focuses on enhancing the project's testing infrastructure and documentation. It refines CI dependency handling, updates test execution instructions and best practices, and reorganizes test suites for improved clarity and efficiency. Additionally, a small configuration error in a specific test file has been resolved, contributing to overall test stability.

Highlights

  • CI Dependency Cleanup: The CI installation script (ci_install_dependency.sh) has been updated to no longer uninstall torch and torchaudio during cleanup, streamlining the dependency management process.
  • Test Documentation Updates: The test/README.md file now includes revised examples for running single tests, updated guidelines for adding tests to CI (including a new instruction for unittest.main()/pytest.main()), and expanded advice on writing efficient and elegant test cases.
  • Test Suite Refactoring: The test/srt/run_suite.py script has renamed the per-commit test suite to per-commit-1-gpu and introduced new empty nightly-1-gpu and nightly-8-gpu suites to better categorize and manage longer-running tests.
  • Test Configuration Fix: A minor syntax error (missing comma) was corrected in test_mla_int8_deepseek_v3.py within the sglang.launch_server arguments, ensuring proper test setup.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/nightly-test.yml
    • .github/workflows/pr-test.yml
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.

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 aims to fix unit tests by updating CI dependency installation, correcting test command arguments, and refining test documentation and suite configurations. The changes are generally good and improve the testing infrastructure. I've provided a couple of suggestions: one important fix for a CI script to prevent it from failing in non-interactive environments, and a minor grammatical correction in the README for better clarity.


# Clean up existing installations
$PIP_CMD uninstall flashinfer_python sgl-kernel sglang vllm torch torchaudio || true
$PIP_CMD uninstall flashinfer_python sgl-kernel sglang vllm || true
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The uv pip uninstall command requires a -y flag to run non-interactively in CI environments. Without it, the command will prompt for confirmation and likely fail. A similar command in this script on line 27 correctly uses the -y flag.

Suggested change
$PIP_CMD uninstall flashinfer_python sgl-kernel sglang vllm || true
$PIP_CMD uninstall -y flashinfer_python sgl-kernel sglang vllm || true

- The CI will run the `per-commit` and `nightly` automatically. If you need special setup or custom test groups, you may modify the workflows in [`.github/workflows/`](https://github.com/sgl-project/sglang/tree/main/.github/workflows).

- Ensure they are referenced in the respective `run_suite.py` (e.g., `test/srt/run_suite.py`) so they are picked up in CI. For most small test cases, they can be added to the `per-commit-1-gpu` suite. Sort the test cases alphabetically by name.
- Ensure you added `unittest.main()` for unittest and `pytest.main([__file__])` for pytest in the scripts. The CI run them via `python3 test_file.py`.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a minor grammatical error here. For improved clarity, "run" should be "runs".

Suggested change
- Ensure you added `unittest.main()` for unittest and `pytest.main([__file__])` for pytest in the scripts. The CI run them via `python3 test_file.py`.
- Ensure you added `unittest.main()` for unittest and `pytest.main([__file__])` for pytest in the scripts. The CI runs them via `python3 test_file.py`.

@merrymercy merrymercy merged commit 5a6ec8f into main Oct 12, 2025
14 of 52 checks passed
@merrymercy merrymercy deleted the lianmin/fix-unit-tests branch October 12, 2025 14:45
lpc0220 pushed a commit to lpc0220/sglang that referenced this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants