Skip to content

Create test_deepseek_v32_config.py#35247

Closed
puririshi98 wants to merge 20 commits intovllm-project:mainfrom
puririshi98:patch-2
Closed

Create test_deepseek_v32_config.py#35247
puririshi98 wants to merge 20 commits intovllm-project:mainfrom
puririshi98:patch-2

Conversation

@puririshi98
Copy link

@puririshi98 puririshi98 commented Feb 25, 2026

This test aims to cover: #34899

Not sure where this test would be put in the tests folder, open to suggestions from reviewers.

This is part of the NVIDIA effort to add CI to upstream github.

This test aims to cover: vllm-project#34899

Not sure where this test would be put in the tests folder, open to suggestions from reviewers.

Signed-off-by: Rishi Puri <riship@nvidia.com>
@mergify mergify bot added the deepseek Related to DeepSeek models label Feb 25, 2026
Copy link
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 introduces a new test file, test_deepseek_v32_config.py, to validate the changes from PR #34899. The tests cover the architectural changes and config update logic for DeepseekV32ForCausalLM. While the tests are generally well-structured, I've found a significant issue where one of the tests is ineffective because it checks for a class's removal in the wrong module. This could lead to a false sense of security that the refactoring was completed correctly.

Comment on lines +42 to +46
from vllm.model_executor.models import config as config_module

assert not hasattr(config_module, 'DeepseekV3ForCausalLM'), (
"DeepseekV3ForCausalLM workaround class should be removed"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This test is intended to verify the removal of the DeepseekV3ForCausalLM class. However, it only checks for its absence in the vllm.model_executor.models.config module. Based on the existing codebase, this class is defined elsewhere (e.g., in vllm.model_executor.models.deepseek_v2.py) and is not expected to be in the config module. This means the test will pass regardless of whether the class has been properly removed, making it ineffective.

To correctly verify the removal, the assertion should check against the vllm.model_executor.models package, which is where the class would be exposed if it still exists.

Suggested change
from vllm.model_executor.models import config as config_module
assert not hasattr(config_module, 'DeepseekV3ForCausalLM'), (
"DeepseekV3ForCausalLM workaround class should be removed"
)
from vllm.model_executor import models
assert not hasattr(models, 'DeepseekV3ForCausalLM'), (
"DeepseekV3ForCausalLM workaround class should be removed"
)

@mergify
Copy link

mergify bot commented Feb 25, 2026

Hi @puririshi98, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@puririshi98 puririshi98 marked this pull request as draft February 25, 2026 00:42
@puririshi98 puririshi98 marked this pull request as ready for review February 27, 2026 08:46
puririshi98 and others added 2 commits February 27, 2026 00:46
Signed-off-by: Rishi Puri <riship@nvidia.com>
@mergify
Copy link

mergify bot commented Feb 27, 2026

Hi @puririshi98, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@mergify
Copy link

mergify bot commented Feb 27, 2026

Hi @puririshi98, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

puririshi98 and others added 2 commits March 6, 2026 11:01
@mergify mergify bot added the v1 label Mar 6, 2026
@wzhao18
Copy link
Contributor

wzhao18 commented Mar 9, 2026

kv cache dtype is not converted automatically from "fp8" to "fp8_ds_mla" after PR #35891 for DS v3.2

@jasonlizhengjian
Copy link
Contributor

/gemini review

Copy link
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 introduces a new test file to validate changes from a previous pull request related to DeepseekV32ForCausalLM configuration. The tests are generally well-structured and use mocking effectively to isolate the logic under test. However, I've identified a significant issue in two of the tests that are intended to verify the removal of a class; they are checking the wrong module, which could lead to a false sense of security. I've provided specific suggestions to correct this.

Comment on lines +47 to +51
from vllm.model_executor.models import config as config_module

assert not hasattr(config_module, "DeepseekV3ForCausalLM"), (
"DeepseekV3ForCausalLM workaround class should be removed"
)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This test incorrectly checks for the removal of DeepseekV3ForCausalLM from the config module. This class was originally defined in vllm.model_executor.models.deepseek_v2, so the test should check that module to correctly verify its removal. As written, this test does not provide the intended verification.

Suggested change
from vllm.model_executor.models import config as config_module
assert not hasattr(config_module, "DeepseekV3ForCausalLM"), (
"DeepseekV3ForCausalLM workaround class should be removed"
)
from vllm.model_executor.models import deepseek_v2 as models_module
assert not hasattr(models_module, "DeepseekV3ForCausalLM"), (
"DeepseekV3ForCausalLM workaround class should be removed"
)

Comment on lines +176 to +178
from vllm.model_executor.models import config as config_module

assert not hasattr(config_module, "DeepseekV3ForCausalLM")
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Similar to the test_deepseek_v3_class_removed test, this check for the removal of DeepseekV3ForCausalLM is targeting the wrong module. The class was defined in vllm.model_executor.models.deepseek_v2, not config. The test should be updated to check the correct module to ensure the test is effective.

Suggested change
from vllm.model_executor.models import config as config_module
assert not hasattr(config_module, "DeepseekV3ForCausalLM")
from vllm.model_executor.models import deepseek_v2 as models_module
assert not hasattr(models_module, "DeepseekV3ForCausalLM")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek Related to DeepSeek models v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants