Simplify test_chunked_prefill; remove redundant tests (#22652)
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
"""
|
|
||||||
python3 -m unittest test_chunked_prefill.TestChunkedPrefill.test_mixed_chunked_prefill_without_radix_cache
|
|
||||||
"""
|
|
||||||
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
|
||||||
from sglang.test.test_utils import CustomTestCase, run_mmlu_test, run_mulit_request_test
|
|
||||||
|
|
||||||
register_cuda_ci(est_time=360, suite="stage-b-test-1-gpu-small")
|
|
||||||
register_amd_ci(est_time=312, suite="stage-b-test-1-gpu-small-amd")
|
|
||||||
|
|
||||||
|
|
||||||
class TestChunkedPrefill(CustomTestCase):
|
|
||||||
def test_chunked_prefill(self):
|
|
||||||
run_mmlu_test(disable_radix_cache=False, enable_mixed_chunk=False)
|
|
||||||
|
|
||||||
def test_mixed_chunked_prefill(self):
|
|
||||||
run_mmlu_test(disable_radix_cache=False, enable_mixed_chunk=True)
|
|
||||||
|
|
||||||
def test_chunked_prefill_without_radix_cache(self):
|
|
||||||
run_mmlu_test(disable_radix_cache=True, enable_mixed_chunk=False)
|
|
||||||
|
|
||||||
def test_mixed_chunked_prefill_without_radix_cache(self):
|
|
||||||
run_mmlu_test(disable_radix_cache=True, enable_mixed_chunk=True)
|
|
||||||
|
|
||||||
def test_mixed_chunked_prefill_multi_requests(self):
|
|
||||||
run_mulit_request_test(
|
|
||||||
enable_mixed_chunk=True,
|
|
||||||
chunked_prefill_size=2048,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
import unittest
|
||||||
|
|
||||||
|
from sglang.srt.environ import envs
|
||||||
|
from sglang.srt.utils import kill_process_tree
|
||||||
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||||
|
from sglang.test.kits.eval_accuracy_kit import GSM8KMixin
|
||||||
|
from sglang.test.test_utils import (
|
||||||
|
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||||
|
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||||
|
DEFAULT_URL_FOR_TEST,
|
||||||
|
CustomTestCase,
|
||||||
|
popen_launch_server,
|
||||||
|
)
|
||||||
|
|
||||||
|
register_cuda_ci(est_time=180, suite="stage-b-test-1-gpu-small")
|
||||||
|
register_amd_ci(est_time=180, suite="stage-b-test-1-gpu-small-amd")
|
||||||
|
|
||||||
|
|
||||||
|
class TestMixedChunkedPrefill(GSM8KMixin, CustomTestCase):
|
||||||
|
model = DEFAULT_MODEL_NAME_FOR_TEST
|
||||||
|
base_url = DEFAULT_URL_FOR_TEST
|
||||||
|
gsm8k_accuracy_thres = 0.62
|
||||||
|
|
||||||
|
extra_args = [
|
||||||
|
"--enable-mixed-chunk",
|
||||||
|
"--chunked-prefill-size",
|
||||||
|
"32",
|
||||||
|
]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
with envs.SGLANG_ENABLE_STRICT_MEM_CHECK_DURING_BUSY.override(2):
|
||||||
|
cls.process = popen_launch_server(
|
||||||
|
cls.model,
|
||||||
|
cls.base_url,
|
||||||
|
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||||
|
other_args=cls.extra_args,
|
||||||
|
)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def tearDownClass(cls):
|
||||||
|
kill_process_tree(cls.process.pid)
|
||||||
|
|
||||||
|
|
||||||
|
class TestMixedChunkedPrefillNoRadixCache(TestMixedChunkedPrefill):
|
||||||
|
extra_args = [
|
||||||
|
"--enable-mixed-chunk",
|
||||||
|
"--chunked-prefill-size",
|
||||||
|
"32",
|
||||||
|
"--disable-radix-cache",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user