Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/srt/nightly/test_deepseek_v31_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def setUpClass(cls):
"--trust-remote-code",
"--tp",
"8",
"--dp",
"8",
"--model-loader-extra-config",
'{"enable_multithread_load": true}',
Comment on lines +28 to +29
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These arguments are now common to all test variants in this file. To improve maintainability and avoid duplication, consider defining a list of common arguments and reusing it for each variant. This would make future changes to these shared arguments easier to manage.

For example:

# At the top of the file or inside the class
COMMON_SERVER_ARGS = [
    "--trust-remote-code",
    "--tp",
    "8",
    "--model-loader-extra-config",
    '{"enable_multithread_load": true}',
]

# Inside setUpClass
cls.variants = [
    {
        "name": "basic",
        "other_args": COMMON_SERVER_ARGS,
    },
    {
        "name": "mtp",
        "other_args": COMMON_SERVER_ARGS + [
            "--speculative-algorithm",
            "EAGLE",
            "--speculative-num-steps",
            "3",
            "--speculative-eagle-topk",
            "1",
            "--speculative-num-draft-tokens",
            "4",
            "--mem-frac",
            "0.7",
        ],
    },
]

],
},
{
Expand All @@ -35,8 +35,6 @@ def setUpClass(cls):
"--trust-remote-code",
"--tp",
"8",
"--dp",
"8",
"--speculative-algorithm",
"EAGLE",
"--speculative-num-steps",
Expand All @@ -47,6 +45,8 @@ def setUpClass(cls):
"4",
"--mem-frac",
"0.7",
"--model-loader-extra-config",
'{"enable_multithread_load": true}',
],
},
]
Expand Down
12 changes: 6 additions & 6 deletions test/srt/nightly/test_deepseek_v32_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def setUpClass(cls):
"--trust-remote-code",
"--tp",
"8",
"--dp",
"8",
"--model-loader-extra-config",
'{"enable_multithread_load": true}',
Comment on lines +28 to +29
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Similar to test_deepseek_v31_perf.py, these arguments are now duplicated across all test variants. To improve maintainability, consider extracting common arguments into a shared list.

For example:

# At the top of the file or inside the class
COMMON_SERVER_ARGS = [
    "--trust-remote-code",
    "--tp",
    "8",
    "--model-loader-extra-config",
    '{"enable_multithread_load": true}',
]

# Inside setUpClass
cls.variants = [
    {
        "name": "basic",
        "other_args": COMMON_SERVER_ARGS,
    },
    {
        "name": "mtp",
        "other_args": COMMON_SERVER_ARGS + [
            "--speculative-algorithm",
            "EAGLE",
            "--speculative-num-steps",
            "3",
            "--speculative-eagle-topk",
            "1",
            "--speculative-num-draft-tokens",
            "4",
            "--mem-frac",
            "0.7",
        ],
    },
    {
        "name": "nsa",
        "other_args": COMMON_SERVER_ARGS + [
            "--attention-backend",
            "nsa",
            "--nsa-prefill-backend",
            "flashmla_sparse",
            "--nsa-decode-backend",
            "flashmla_kv",
        ],
    },
]

This would make the test setup cleaner and easier to manage.

],
},
{
Expand All @@ -35,8 +35,6 @@ def setUpClass(cls):
"--trust-remote-code",
"--tp",
"8",
"--dp",
"8",
"--speculative-algorithm",
"EAGLE",
"--speculative-num-steps",
Expand All @@ -47,6 +45,8 @@ def setUpClass(cls):
"4",
"--mem-frac",
"0.7",
"--model-loader-extra-config",
'{"enable_multithread_load": true}',
],
},
{
Expand All @@ -55,14 +55,14 @@ def setUpClass(cls):
"--trust-remote-code",
"--tp",
"8",
"--dp",
"8",
"--attention-backend",
"nsa",
"--nsa-prefill-backend",
"flashmla_sparse",
"--nsa-decode-backend",
"flashmla_kv",
"--model-loader-extra-config",
'{"enable_multithread_load": true}',
],
},
]
Expand Down
Loading