Repository navigation
Description
Observed problem
At vllm-project/vllm-ascend main 5e1647c, requirements-dev.txt includes requirements.txt and repeats xgrammar, regex and scipy; pytest-mock is also repeated under its normalized alias pytest_mock. These add no constraint and obscure dependency ownership. Separately, the build/runtime mirror comments are misleading, isolated builds contain runtime packages, and published wheel metadata has no dedicated dependency contract verification.
Scope and existing work
This audit complements #17791 (build-isolation design), #17789 / #17908 (build/runtime contract and torchvision pin), #17780 / #17812 (requirements reader errors), and #14195 (CPU build verification). It will not duplicate those fixes or change torch/torch-npu/triton-ascend/NumPy pins.
Evidence and proposed batches
- Remove redundant development entries, with a regression check that follows includes, normalizes PEP 503 names, and permits distinct constraints/markers/extras.
- Add an offline wheel Requires-Dist verification command, negative regression tests, and dependency ownership/validation documentation. Verify actual CPU-only wheel output without claiming NPU validation.
- Follow-up only after native-build evidence: prune runtime-only PEP 518 requirements and consider requirements/ layering, preserving existing installation entry points.
NumPy investigation
Triton-Ascend main b492bef958e1d29acb8de648462a5bcd5663b0bd has numpy==1.26.4 in root requirements.txt under '#from CANN'. Its pyproject.toml build requirements do not include NumPy, and setup.py install_requires only declares conditional importlib-metadata. Source development pins alone do not establish transitive wheel dependencies. Published 3.2.2 wheels are being inspected independently. The comment is provenance evidence, not proof that NumPy 2.x is incompatible. No relaxation is proposed without CANN/NPU tests.
Acceptance
- Runtime wheel requirements and plugin registration remain unchanged.
- Developer effective constraints remain unchanged.
- Wheel metadata drift fails an automated check.
- Report resolver/pip check results separately from ABI, native build, and NPU validation.
AI assistance was used for this audit and proposed changes; conclusions are checked against repository source and local experiments.
Published artifact verification (completed)
Downloaded from https://repo.huaweicloud.com/ascend/repos/pypi:
- triton_ascend-3.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl: Requires-Dist includes numpy==1.26.4, attrs==24.2.0, scipy==1.13.1 for Python <3.13, pytest==8.3.2, pytest-xdist==3.6.1, and triton==3.2.0. The v3.2.2 release source python/setup.py:875-889 agrees. Current main packaging is not representative of this release artifact.
- torch_npu-2.10.0.post4-cp312-cp312-manylinux_2_28_x86_64.whl: Requires-Dist is torch==2.10.0+cpu. PyPI JSON for the same version advertises torch==2.10.0; index/artifact identity matters.
- pip dry-run with the Triton-Ascend wheel and numpy==2.0.2 fails with ResolutionImpossible, specifically citing numpy==1.26.4. This verifies a real downstream resolver constraint, independently of development requirements.
- Python 3.12/Linux x86_64: NumPy 1.26.4 + PyArrow 16.1.0 and NumPy 2.0.2 + PyArrow 16.1.0 both pass array conversion, Parquet roundtrip and pip check in the CPU probe environment. PyArrow metadata requires numpy>=1.16.6. Therefore the exact NumPy pin does not prohibit every PyArrow upgrade; compatibility depends on the chosen version/artifact.
- Built a Python-only vLLM-Ascend wheel, verified 32 Requires-Dist entries exactly match requirements.txt, installed with --no-deps, and inspected importlib.metadata and the ascend platform entry point. Full installation/ABI/native/NPU validation remains outstanding.
Recommendation: start with option A (explicit build/runtime responsibilities and artifact verification), reuse #17908 rather than duplicate its mirror-contract changes. Option C (layered requirements with dynamic setup.py metadata) is the longer-term alignment; option B creates a broader migration/export-tool burden without removing native build dependencies.
Submitted independent batches
- [Refactor][Build] Remove redundant development requirements #18780: redundant development dependency cleanup (signed commit 6c95d1c); focused regression test and Linux changed-file checks pass.
- [CI][Build] Verify wheel runtime dependency metadata #18783: actual wheel dependency metadata validation, eight tests, packaging-only CI and dependency ownership documentation (signed commit dd304aa). The new wheel-metadata GitHub Actions job has passed.
Remaining native/ABI/NPU and full-environment resolution work is explicitly deferred until supported-stack evidence is available. Existing overlapping issues/PRs remain the ownership points for build isolation and shared-version drift.
Activity