Repository navigation
refactor: make MUSA registration entry points explicit - #362
yeahdongcn wants to merge 1 commit into
Conversation
yeahdongcn
left a comment
There was a problem hiding this comment.
Merge verdict: no blocking findings — ready to merge.
Verified at 7fa376a: the 15-module list moved verbatim into registration.py, and no in-tree consumer of the old side effect remains. The PR is still a draft, so marking it ready is the author's call.
Findings: 0 blocking · 3 nit
| nit | location | problem | fix |
|---|---|---|---|
| nit | docs/vllm_musa/registration.md:7 |
rows imply disjoint lists, but layers.activation sits in both |
say a layer that registers ops also joins custom_op_modules.py |
| nit | vllm_musa/model_executor/registration.py:5 |
comment narrates a future migration, not the current constraint | state that import order matters; drop the migration clause |
| nit | tests/test_quant_fp8_oot_source.py:22 |
init_source now holds registration.py |
rename it to registration_source |
What changed · what I could not verify
Diff map. model_executor/__init__.py drops 15 side-effect imports; the same 15 move to _EXTENSION_MODULES in the new registration.py; _register_ops() calls register_model_executor_extensions() where it used to do import vllm_musa.model_executor; one source test is repointed; a new developer page plus a README link.
Verified at this head (read-only).
- Module list identity: base
56f8deevllm_musa/model_executor/__init__.pyvs headregistration.py→ 15 vs 15, order identical, nothing lost or added. - No in-tree consumer of the removed side effect: scanned 431 text files of the head tarball for
import vllm_musa.model_executor,from vllm_musa.model_executor import,from .model_executor import→ one hit,vllm_musa/__init__.py:148, the new explicit import. - Load order kept:
custom_op_modules.pyhas no import-time side effect beyondfrom importlib import import_module, andpreload_custom_op_modules()still runs after registration. - Packaging:
pyproject.tomluses[tool.setuptools.packages.find] include = ["vllm_musa*"], so the new module ships. - Changed test: all 7 assertions evaluated against the head sources in memory → PASS.
- Docs page: linked from
docs/vllm_musa/README.md:100; one H1, no heading level jump, no relative link to resolve; a head-tarball scan formkdocs.y*ml,docusaurus.config.*,nav.yml,.pages,SUMMARY.mdreturned zero hits, so the README is the only index. Every API the page names exists at head:register_oot(model_executor/layers/layernorm.py:37),register_impl(kernels/musa_ops.py:66),MUSAPlatformBase.import_ir_kernels(platform.py:303, importsvllm_musa.kernels),custom_op_modules.py. - Pass 0 pins/flags: these 6 files change no
name==versionpin and no--flag, so those sweeps are empty by construction, not by omission. gh pr checks 362:deploy skipping,build pass 8s,offline-series pass 1m15s.
Gate: 14/14 hooks passed @ 7fa376a
Not verified. GitHub Actions CI cannot exercise MUSA plugin registration, and this read-only session ran no runtime import probe, so the registration path is unverified on hardware. The refactor is also an intentional API change for any out-of-tree code that imported the bare package for its side effects; I can only prove no such caller inside this repo.
Observed, not raised as findings. _EXTENSION_MODULES has no completeness guard, while CUSTOM_OP_MODULES has test_custom_op_manifest_covers_all_custom_op_modules (tests/test_custom_op_preload.py:43), so a forgotten entry fails silently. The README places the new link at the tail of the _custom_ops.py section rather than under Module Overview.
auto-review round 1/3 · verdict: clean
@/tmp/tmp.IqPs7cUfSx