Skip to content

[Refactor] Remove unused runtime helpers - #582

Open
jiangkuaixue123 wants to merge 1 commit into
vllm-project:mainfrom
jiangkuaixue123:codex/cleanup-unused-runtime-helpers
Open

jiangkuaixue123 wants to merge 1 commit into
vllm-project:mainfrom
jiangkuaixue123:codex/cleanup-unused-runtime-helpers

Conversation

@jiangkuaixue123

Copy link
Copy Markdown
Collaborator

Purpose

Unused runtime helpers remained in the production package after the runner migrations. Remove the obsolete microbatch wrapper, DeepSeek attention-builder input isolation helper, unused configuration helpers, and unused connector key export. Move FP8 test-weight generation and runtime class resolution into test helpers.

Issue

No linked issue.

Scope

  • Production helper cleanup, associated tests, design documentation, and review guidance.
  • The DeepSeek V2/V3 Async CAM model execution path is outside this change.

Implementation Notes

  • Keep the active MRV2 metadata installer and RoPE materialization functions. Use the MRV2 installer in the retained test that checks child contexts do not resend control messages.
  • Delete the two tests dedicated to retired helpers; preserve native-stage isolation, FP8 dequantization, and runtime classpath coverage.
  • Share test-weight generation through tests/unit/fakes/weights.py and class resolution through tests/unit/fakes/runtime.py, including the isolated NPU import script.
  • Add a type-only cast to coerce_extra_int() to fix an existing mypy overload error reproduced on the base revision. Conversion and error handling remain unchanged.
  • No new patches, native source changes, or intended serving behavior changes.

Test Plan

  • .venv/bin/python -m pytest tests/unit -m 'not gpu and not vllm_runtime' -ra
  • .venv/bin/python -m pytest tests/unit/config -o addopts= -q
  • Run pre-commit on every changed file; check removed-symbol references and git diff --check.

Test Result

  • CPU unit suite: 751 passed, 106 skipped, 8 deselected, 10 subtests passed.
  • Configuration suite after the type-only correction: 135 passed.
  • Moved class-resolution helper: dotted/colon paths and invalid-path errors checked directly.
  • Pre-commit passed, including Ruff, mypy for Python 3.11, Markdown lint, typos, and SPDX checks. Commit hooks also passed.
  • Removed helpers have no remaining source/documentation references; migrated helpers have no production imports.
  • Environment: macOS, Python 3.12.13, without torch, vLLM, or vLLM-Ascend. Dependency- and build-tool-gated cases were skipped using existing guards.
  • Target pins remain vLLM 0.32.0 (5df63a7203cdb9328d824a27b682e77c7b9928be) and vLLM-Ascend bd42eea01d8312c4df469fabaed45f77a12df4d3.
  • GPU/NPU runtime tests and native builds were not run; native sources and ABI are unchanged.

Docs Impact

Update the module design index, Attention runtime and model integration pages, and the review skill's worker/engine references to describe the remaining production paths.


Essential PR Checklist
  • Purpose is clear and linked to public context when possible.
  • Scope is bounded.
  • Compatibility with vLLM v0.32.0 and, for NPU changes, the pinned vLLM-Ascend source is considered, as applicable.
  • No changes are made to the vLLM source checkout.
  • Plugin-owned classes or explicit dotted class paths are preferred over monkey patches.
  • Any compat shim or monkey patch is isolated, idempotent, version-guarded, documented, and tested. No new shims or patches.
  • Imports remain CPU-safe; CUDA-heavy work is delayed or GPU-gated.
  • Validation evidence is included, including skipped GPU tests when applicable.
  • Documentation impact is stated.

Signed-off-by: jiangkuaixue123 <jiangxiaozhou111@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ascend Ascend NPU platform and related changes documentation Improvements or additions to documentation NVIDIA NVIDIA GPU, CUDA, and related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant