Skip to content

fix: small changes to enable test_mrope.py#14082

Merged
Kangyan-Zhou merged 2 commits intosgl-project:mainfrom
raayandhar:fix-mrope-test
Nov 28, 2025
Merged

fix: small changes to enable test_mrope.py#14082
Kangyan-Zhou merged 2 commits intosgl-project:mainfrom
raayandhar:fix-mrope-test

Conversation

@raayandhar
Copy link
Copy Markdown
Contributor

Motivation

Currently test_mrope.py is broken. There are two issues: one related to server args, and one related to using forward_native and not _forward_native

Modifications

Add dummy server args and change the test back to _forward_native. The original pr (#11859) used forward_native but in a follow-up pr this was changed to _forward_native: #11859

Accuracy Tests

Benchmarking and Profiling

Checklist

raayandhar and others added 2 commits November 27, 2025 20:40
Signed-off-by: Raayan Dhar raayan.dhar@gmail.com <raayan.dhar@gmail.com>
@raayandhar raayandhar marked this pull request as ready for review November 28, 2025 04:49
@raayandhar
Copy link
Copy Markdown
Contributor Author

cc: @yuan-luo

@raayandhar
Copy link
Copy Markdown
Contributor Author

I also noticed that some PRs made changes to this file. But it is clear that it was not tested since when testing on their commit, it still failed. Just as FYI.

@yuan-luo
Copy link
Copy Markdown
Collaborator

@raayandhar Please paste the UT passed result.

@raayandhar
Copy link
Copy Markdown
Contributor Author

@raayandhar Please paste the UT passed result.

Thanks, here it is:

UT test results (click to expand)
(sglang) ynez% pytest test/srt/rotary_embedding/test_mrope.py -v
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.12.3, pytest-9.0.1, pluggy-1.6.0 -- /home/raayan/projects/sglang/.venv/bin/python3
cachedir: .pytest_cache
rootdir: /home/raayan/projects/sglang/test
configfile: pytest.ini
plugins: anyio-4.11.0
collected 24 items                                                                                                                                                         

test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype0-1-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                        [  4%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype0-1-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                       [  8%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype0-1-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                     [ 12%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype0-2-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                        [ 16%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype0-2-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                       [ 20%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype0-2-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                     [ 25%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype1-1-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                        [ 29%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype1-1-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                       [ 33%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype1-1-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                     [ 37%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype1-2-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                        [ 41%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype1-2-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                       [ 45%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[11-dtype1-2-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                     [ 50%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype0-1-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                      [ 54%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype0-1-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                     [ 58%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype0-1-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                   [ 62%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype0-2-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                      [ 66%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype0-2-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                     [ 70%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype0-2-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                   [ 75%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype1-1-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                      [ 79%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype1-1-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                     [ 83%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype1-1-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                   [ 87%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype1-2-model_info0-Qwen/Qwen2-VL-7B-Instruct] PASSED                                                      [ 91%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype1-2-model_info1-Qwen/Qwen2-VL-72B-Instruct] PASSED                                                     [ 95%]
test/srt/rotary_embedding/test_mrope.py::test_mrope[8192-dtype1-2-model_info2-Qwen/Qwen2.5-VL-72B-Instruct] PASSED                                                   [100%]

============================================================================= warnings summary =============================================================================
.venv/lib/python3.12/site-packages/_pytest/config/__init__.py:1397
  /home/raayan/projects/sglang/.venv/lib/python3.12/site-packages/_pytest/config/__init__.py:1397: PytestConfigWarning: Unknown config option: asyncio_mode
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute

<frozen importlib._bootstrap>:488
  <frozen importlib._bootstrap>:488: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================ 24 passed, 3 warnings in 72.46s (0:01:12) =================================================================
sys:1: DeprecationWarning: builtin type swigvarlink has no __module__ attribute
(sglang) ynez% 

@raayandhar
Copy link
Copy Markdown
Contributor Author

Also, I imagine that this test was disabled in CI ... once we are happy with the fix, how should we re-enable it?

@yuan-luo
Copy link
Copy Markdown
Collaborator

Also, I imagine that this test was disabled in CI ... once we are happy with the fix, how should we re-enable it?

Sure, we should re-enable the test in CI.

@raayandhar
Copy link
Copy Markdown
Contributor Author

Also, I imagine that this test was disabled in CI ... once we are happy with the fix, how should we re-enable it?

Sure, we should re-enable the test in CI.

I found it here:

TestFile("rotary_embedding/test_mrope.py", 10),

So I guess it was never disabled? Not sure how this is possible

@Kangyan-Zhou Kangyan-Zhou merged commit 91d249c into sgl-project:main Nov 28, 2025
49 of 55 checks passed
harvenstar pushed a commit to harvenstar/sglang that referenced this pull request Dec 4, 2025
Signed-off-by: Raayan Dhar raayan.dhar@gmail.com <raayan.dhar@gmail.com>
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