Skip to content

[CI] Migrate LoRA tests to test/registered/lora/#15176

Merged
Kangyan-Zhou merged 8 commits intomainfrom
ci/migrate-lora-tests
Dec 17, 2025
Merged

[CI] Migrate LoRA tests to test/registered/lora/#15176
Kangyan-Zhou merged 8 commits intomainfrom
ci/migrate-lora-tests

Conversation

@alisonshao
Copy link
Copy Markdown
Collaborator

@alisonshao alisonshao commented Dec 15, 2025

Summary

Part of CI reorganization effort (#13808).

This PR migrates all LoRA tests to test/registered/lora/ with proper CI registration.

Changes

Per-commit tests:

  • Move 6 LoRA test files from test/srt/lora/ to test/registered/lora/
  • Add CI registration for per-commit suites
  • Add stage-b-test-2-gpu workflow job for 2-GPU tests
  • Add stage-b-test-small-2-gpu to PER_COMMIT_SUITES

Nightly tests:

  • Move test_lora_hf_sgl_logprob_diff.py from test/srt/lora/ to test/registered/lora/
  • Move 5 nightly tests from test/nightly/ to test/registered/lora/:
    • test_lora_eviction_policy.py
    • test_lora_openai_api.py
    • test_lora_openai_compatible.py
    • test_lora_qwen3.py
    • test_lora_radix_cache.py
  • Remove is_in_ci() skip logic so nightly tests actually run
  • Fix relative imports (from lora_utilsfrom sglang.test.lora_utils)

Infrastructure fixes:

  • Add python/sglang/test/ci/__init__.py to fix ModuleNotFoundError: No module named 'sglang.test.ci'
  • Move lora_utils.py to python/sglang/test/lora_utils.py for proper imports
  • Remove LoRA entries from old test/srt/run_suite.py
  • Remove outdated comment about nightly test location

Test Files Migrated

Per-commit (stage-b-test-small-1-gpu):

Test Est Time
test_lora.py 82s
test_lora_backend.py 200s
test_lora_eviction.py 224s
test_lora_update.py 451s
test_multi_lora_backend.py 60s

Per-commit (stage-b-test-small-2-gpu):

Test Est Time
test_lora_tp.py 116s

Nightly (nightly-1-gpu):

Test Est Time
test_lora_hf_sgl_logprob_diff.py 300s
test_lora_eviction_policy.py 200s
test_lora_openai_api.py 30s
test_lora_openai_compatible.py 150s
test_lora_qwen3.py 97s
test_lora_radix_cache.py 200s

Test plan

  • CI passes for migrated per-commit tests
  • CI passes for stage-b-test-2-gpu job
  • Nightly tests run successfully
  • Old test suite runs without errors (LoRA tests removed)
  • Lint passes

@github-actions github-actions bot added the lora label Dec 15, 2025
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @alisonshao, 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 is a significant step in the ongoing CI reorganization effort, specifically targeting the LoRA test suite. It systematically migrates existing LoRA tests to a new, dedicated directory (test/registered/lora/), integrates them with the CI registration mechanism, and refines import paths to improve code structure and maintainability. The changes ensure that LoRA tests are properly discovered, executed, and tracked within the continuous integration pipeline, contributing to a more robust and efficient testing environment.

Highlights

  • Test Relocation: LoRA tests have been moved from the test/srt/lora/ directory to test/registered/lora/ to centralize and properly register them within the CI system.
  • CI Registration: Six LoRA tests are now explicitly registered for CI, with five assigned to the stage-b-test-small-1-gpu suite (totaling approximately 1017 seconds) and one (a TP test) to the stage-b-test-small-2-gpu suite (approximately 116 seconds).
  • Dependency Management Improvement: The lora_utils.py file has been relocated to python/sglang/test/lora_utils.py to facilitate proper sglang.test imports and eliminate previous sys.path manipulation hacks.
  • CI Suite Update: The stage-b-test-small-2-gpu suite has been added to the per-commit CUDA test suites to ensure comprehensive testing for multi-GPU configurations.
  • Cleanup of Old Test Entries: Obsolete LoRA test entries have been removed from the test/srt/run_suite.py file, streamlining the old test runner.
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.

@alisonshao
Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

Copy link
Copy Markdown
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 effectively migrates the LoRA tests to the new test/registered/lora/ directory as part of the ongoing CI reorganization. The changes are clean and well-executed. Key improvements include:

  • Moving lora_utils.py to a shared location for better importability.
  • Migrating all specified LoRA tests and registering them with the new CI system.
  • Cleaning up sys.path hacks in favor of proper imports, which greatly improves code quality and maintainability.
  • Updating the old test suites to remove the migrated tests, and adding helpful comments about the migration, especially regarding the AMD tests that need to be re-enabled in the new system.
  • Adding the new stage-b-test-small-2-gpu suite for the TP test.

Overall, this is a solid contribution to improving the CI structure. The changes are correct and align with the stated goals.

@alisonshao alisonshao force-pushed the ci/migrate-lora-tests branch 3 times, most recently from 7e32c10 to 3746066 Compare December 15, 2025 11:12
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 15, 2025
@alisonshao alisonshao force-pushed the ci/migrate-lora-tests branch from 3746066 to 6a768ea Compare December 15, 2025 11:26
@alisonshao
Copy link
Copy Markdown
Collaborator Author

nightly tested at: https://github.com/sgl-project/sglang/actions/runs/20287097914/job/58263191790
(failure of lora eviction is addressed in #15283 )

alisonshao and others added 8 commits December 16, 2025 22:41
Part of CI reorganization effort (#13808).

Changes:
- Move lora_utils.py to python/sglang/test/lora_utils.py
- Migrate 6 LoRA test files from test/srt/lora/ to test/registered/lora/
- Add CI registration with appropriate suites:
  - 5 tests -> stage-b-test-small-1-gpu
  - 1 test (TP) -> stage-b-test-small-2-gpu
- Add stage-b-test-small-2-gpu to per-commit CUDA suites
- Remove LoRA entries from old test/srt/run_suite.py
- Clean up sys.path hacks, use proper sglang.test imports

Not migrated (nightly test):
- test_lora_hf_sgl_logprob_diff.py (already registered)
1. Add python/sglang/test/ci/__init__.py to fix ModuleNotFoundError
   when importing from sglang.test.ci module (missing since PR #13345)

2. Add stage-b-test-2-gpu workflow job to run the stage-b-test-small-2-gpu
   suite which is used by test_lora_tp.py
- Move test_lora_hf_sgl_logprob_diff.py from test/srt/lora/ to test/registered/lora/
- Remove is_in_ci() skip logic so tests actually run during nightly
- Remove entry from __not_in_ci__ section in run_suite.py
- Remove outdated comment about nightly test location
- Test is registered with suite="nightly-1-gpu" and nightly=True
Moved files (all registered with nightly-1-gpu suite):
- test_lora_eviction_policy.py
- test_lora_openai_api.py
- test_lora_openai_compatible.py
- test_lora_qwen3.py
- test_lora_radix_cache.py

Also fix isort lint issue in test_lora_hf_sgl_logprob_diff.py
Change relative imports to absolute imports:
- from lora_utils import ... -> from sglang.test.lora_utils import ...
- Remove sys.path.insert hack that was causing ModuleNotFoundError
…t-2-gpu to slash handler

- Change partition count from 2 to 3 for stage-b-test-small-1-gpu (was timing out)
- Add stage-b-test-2-gpu to slash command handler for rerun-stage support
@alisonshao alisonshao force-pushed the ci/migrate-lora-tests branch from 1177e0f to 1404c7e Compare December 17, 2025 06:41
@Kangyan-Zhou Kangyan-Zhou merged commit 4128d4f into main Dec 17, 2025
138 of 151 checks passed
@Kangyan-Zhou Kangyan-Zhou deleted the ci/migrate-lora-tests branch December 17, 2025 21:19
Liwansi added a commit to iforgetmyname/sglang that referenced this pull request Dec 19, 2025
…n3_pp

* 'main' of https://github.com/sgl-project/sglang: (74 commits)
  [bug fix][pp] fix inconsistent latency between tp (sgl-project#15379)
  Fix warp illegal instruction in kimi k2 thinking PCG (sgl-project#15306)
  Fix gpt-oss yarn with `truncate` argument (sgl-project#14270)
  Monkey patch deepseek-ocr's `v_head_dim` (sgl-project#15384)
  [model-gateway] Replace PolicyRegistry RwLock with DashMap for lock-free policy lookups (sgl-project#15361)
  [PP] Fix dynamic chunking strategy for PP (sgl-project#15372)
  Fix issue: ENABLE_BELOW_SM90 cannot be enabled on aarch64 CPU (sgl-project#12967)
  Split test_piecewise_cuda_graph.py to optimize CI resource usage (sgl-project#15290)
  unified management of environment variables for vlm cuda ipc transport  (sgl-project#14501)
  Mistral Large 3 NVFP4 TRTLLM MoE support (sgl-project#15049)
  fix: adjust time for test_epd_disaggregation.py (sgl-project#15354)
  Add doc for qwen3 next (sgl-project#15337)
  feat: DeepSeek-V3.2 Streaming tool call output (sgl-project#15278)
  Feature/trtllm mha workspace size configurable sgl-project#15089 (sgl-project#15131)
  [VLM] Support cos sin cache for Qwen3-VL & GLM-4.1V (sgl-project#15205)
  [Deepseek V3.2] Support Overlap Spec + NSA (sgl-project#15307)
  Add request-level timestamp for when prefill finishes (sgl-project#14860)
  [CI] Migrate LoRA tests to test/registered/lora/ (sgl-project#15176)
  Reserve more memory for DeepSeekOCR model and adjust server start timeout for DeepGEMM to reduce flakiness (sgl-project#15277)
  Fix condition check for require_gathered_buffer (sgl-project#15328)
  ...
Prozac614 pushed a commit to Prozac614/sglang that referenced this pull request Dec 23, 2025
jiaming1130 pushed a commit to zhuyijie88/sglang that referenced this pull request Dec 25, 2025
bingxche added a commit to bingxche/sglang that referenced this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lora run-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants