Migrate parsing tests to test/registered/parser/ (#16467)
This commit is contained in:
@@ -526,6 +526,49 @@ jobs:
|
|||||||
# temporarily put backend-independent cpu tests here
|
# temporarily put backend-independent cpu tests here
|
||||||
python3 run_suite.py --hw cpu --suite default $CONTINUE_ON_ERROR_FLAG
|
python3 run_suite.py --hw cpu --suite default $CONTINUE_ON_ERROR_FLAG
|
||||||
|
|
||||||
|
stage-a-cpu-only:
|
||||||
|
needs: [check-changes, call-gate]
|
||||||
|
if: |
|
||||||
|
always() &&
|
||||||
|
(
|
||||||
|
(inputs.target_stage == 'stage-a-cpu-only') ||
|
||||||
|
(
|
||||||
|
!inputs.target_stage &&
|
||||||
|
(github.event_name == 'schedule' || (!failure() && !cancelled())) &&
|
||||||
|
(needs.check-changes.outputs.main_package == 'true')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Free disk space
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
||||||
|
df -h
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.pr_head_sha || inputs.ref || github.sha }}
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pip install -e "python/[dev]"
|
||||||
|
|
||||||
|
- name: Run test
|
||||||
|
timeout-minutes: 10
|
||||||
|
run: |
|
||||||
|
cd test/
|
||||||
|
CONTINUE_ON_ERROR_FLAG=""
|
||||||
|
if [[ "${{ needs.check-changes.outputs.continue_on_error }}" == "true" ]]; then
|
||||||
|
CONTINUE_ON_ERROR_FLAG="--continue-on-error"
|
||||||
|
fi
|
||||||
|
python3 run_suite.py --hw cpu --suite stage-a-cpu-only $CONTINUE_ON_ERROR_FLAG
|
||||||
|
|
||||||
stage-b-test-small-1-gpu:
|
stage-b-test-small-1-gpu:
|
||||||
needs: [check-changes, call-gate, stage-a-test-1, sgl-kernel-build-wheels]
|
needs: [check-changes, call-gate, stage-a-test-1, sgl-kernel-build-wheels]
|
||||||
if: |
|
if: |
|
||||||
@@ -1752,6 +1795,7 @@ jobs:
|
|||||||
multimodal-gen-test-2-gpu,
|
multimodal-gen-test-2-gpu,
|
||||||
|
|
||||||
stage-a-test-1,
|
stage-a-test-1,
|
||||||
|
stage-a-cpu-only,
|
||||||
stage-b-test-small-1-gpu,
|
stage-b-test-small-1-gpu,
|
||||||
stage-b-test-large-1-gpu,
|
stage-b-test-large-1-gpu,
|
||||||
stage-b-test-large-2-gpu,
|
stage-b-test-large-2-gpu,
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ def handle_rerun_stage(
|
|||||||
# Valid NVIDIA stage names that support target_stage
|
# Valid NVIDIA stage names that support target_stage
|
||||||
nvidia_stages = [
|
nvidia_stages = [
|
||||||
"stage-a-test-1",
|
"stage-a-test-1",
|
||||||
|
"stage-a-cpu-only",
|
||||||
"stage-b-test-small-1-gpu",
|
"stage-b-test-small-1-gpu",
|
||||||
"stage-b-test-large-1-gpu",
|
"stage-b-test-large-1-gpu",
|
||||||
"stage-b-test-large-2-gpu",
|
"stage-b-test-large-2-gpu",
|
||||||
|
|||||||
@@ -9,8 +9,11 @@ from sglang.srt.parser.harmony_parser import (
|
|||||||
iter_tokens,
|
iter_tokens,
|
||||||
prefix_hold,
|
prefix_hold,
|
||||||
)
|
)
|
||||||
|
from sglang.test.ci.ci_register import register_cpu_ci
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
|
register_cpu_ci(est_time=6, suite="stage-a-cpu-only")
|
||||||
|
|
||||||
|
|
||||||
class TestEvent(CustomTestCase):
|
class TestEvent(CustomTestCase):
|
||||||
def test_init(self):
|
def test_init(self):
|
||||||
@@ -8,8 +8,11 @@ from sglang.srt.parser.reasoning_parser import (
|
|||||||
ReasoningParser,
|
ReasoningParser,
|
||||||
StreamingParseResult,
|
StreamingParseResult,
|
||||||
)
|
)
|
||||||
|
from sglang.test.ci.ci_register import register_cpu_ci
|
||||||
from sglang.test.test_utils import CustomTestCase
|
from sglang.test.test_utils import CustomTestCase
|
||||||
|
|
||||||
|
register_cpu_ci(est_time=5, suite="stage-a-cpu-only")
|
||||||
|
|
||||||
|
|
||||||
class TestStreamingParseResult(CustomTestCase):
|
class TestStreamingParseResult(CustomTestCase):
|
||||||
def test_init_default(self):
|
def test_init_default(self):
|
||||||
+1
-1
@@ -17,7 +17,7 @@ HW_MAPPING = {
|
|||||||
|
|
||||||
# Per-commit test suites (run on every PR)
|
# Per-commit test suites (run on every PR)
|
||||||
PER_COMMIT_SUITES = {
|
PER_COMMIT_SUITES = {
|
||||||
HWBackend.CPU: ["default"],
|
HWBackend.CPU: ["default", "stage-a-cpu-only"],
|
||||||
HWBackend.AMD: ["stage-a-test-1", "stage-b-test-small-1-gpu"],
|
HWBackend.AMD: ["stage-a-test-1", "stage-b-test-small-1-gpu"],
|
||||||
HWBackend.CUDA: [
|
HWBackend.CUDA: [
|
||||||
"stage-a-test-1",
|
"stage-a-test-1",
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ suites = {
|
|||||||
TestFile("test_fp8_utils.py", 9),
|
TestFile("test_fp8_utils.py", 9),
|
||||||
TestFile("rotary_embedding/test_mrope.py", 10),
|
TestFile("rotary_embedding/test_mrope.py", 10),
|
||||||
TestFile("test_gpt_oss_1gpu.py", 402),
|
TestFile("test_gpt_oss_1gpu.py", 402),
|
||||||
TestFile("test_harmony_parser.py", 6),
|
|
||||||
TestFile("test_hidden_states.py", 55),
|
TestFile("test_hidden_states.py", 55),
|
||||||
TestFile("test_input_embeddings.py", 38),
|
TestFile("test_input_embeddings.py", 38),
|
||||||
TestFile("test_io_struct.py", 8),
|
TestFile("test_io_struct.py", 8),
|
||||||
@@ -62,7 +61,6 @@ suites = {
|
|||||||
TestFile("test_prefill_adder.py", 1),
|
TestFile("test_prefill_adder.py", 1),
|
||||||
TestFile("test_priority_scheduling.py", 130),
|
TestFile("test_priority_scheduling.py", 130),
|
||||||
TestFile("test_pytorch_sampling_backend.py", 66),
|
TestFile("test_pytorch_sampling_backend.py", 66),
|
||||||
TestFile("test_reasoning_parser.py", 5),
|
|
||||||
TestFile("test_request_queue_validation.py", 47),
|
TestFile("test_request_queue_validation.py", 47),
|
||||||
TestFile("test_retract_decode.py", 259),
|
TestFile("test_retract_decode.py", 259),
|
||||||
TestFile("test_score_api.py", 260),
|
TestFile("test_score_api.py", 260),
|
||||||
@@ -207,7 +205,6 @@ suite_amd = {
|
|||||||
TestFile("test_constrained_decoding.py", 120),
|
TestFile("test_constrained_decoding.py", 120),
|
||||||
TestFile("test_eval_fp8_accuracy.py", 303),
|
TestFile("test_eval_fp8_accuracy.py", 303),
|
||||||
TestFile("test_external_models.py", 45),
|
TestFile("test_external_models.py", 45),
|
||||||
TestFile("test_harmony_parser.py", 20),
|
|
||||||
TestFile("test_input_embeddings.py", 38),
|
TestFile("test_input_embeddings.py", 38),
|
||||||
TestFile("test_io_struct.py", 8),
|
TestFile("test_io_struct.py", 8),
|
||||||
TestFile("test_jinja_template_utils.py", 1),
|
TestFile("test_jinja_template_utils.py", 1),
|
||||||
@@ -224,7 +221,6 @@ suite_amd = {
|
|||||||
TestFile("test_profile_merger.py", 12),
|
TestFile("test_profile_merger.py", 12),
|
||||||
TestFile("test_profile_merger_http_api.py", 15),
|
TestFile("test_profile_merger_http_api.py", 15),
|
||||||
TestFile("test_pytorch_sampling_backend.py", 66),
|
TestFile("test_pytorch_sampling_backend.py", 66),
|
||||||
TestFile("test_reasoning_parser.py", 5),
|
|
||||||
TestFile("test_request_queue_validation.py", 70),
|
TestFile("test_request_queue_validation.py", 70),
|
||||||
TestFile("test_retract_decode.py", 450),
|
TestFile("test_retract_decode.py", 450),
|
||||||
TestFile("test_rope_rocm.py", 3),
|
TestFile("test_rope_rocm.py", 3),
|
||||||
|
|||||||
Reference in New Issue
Block a user