mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #4822] [Feature Request]: Ship PEP 561 typing metadata and stubs for mooncake.engine #1225
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#1225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrZ20 on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/4822
Originally assigned to: @stmatengss on GitHub.
Describe your feature request
Please consider shipping PEP 561 typing metadata and type stubs for the public
mooncake.enginePython API.The published wheels expose
mooncake.engineas a compiled pybind11 extension,but they do not include an
engine.pyistub or amooncake/py.typedmarker.Consequently, downstream projects using mypy cannot use
TransferEngineas atyped dependency and receive:
Evidence
I inspected the PyPI wheel
mooncake-transfer-engine-npu==0.3.13.post1for CPython 3.12 on x86_64. Itcontains
mooncake/engine.so, but no.pyifiles and nomooncake/py.typedmarker. The currentmaintree also has no.pyiorpy.typedfile, andmooncake-wheel/pyproject.tomlcurrently packages thecompiled
*.sowithout a corresponding stub.Minimal reproducer:
Running
mypy check.pyreportsimport-untyped.This recently affected vLLM Ascend after Mooncake became an installed lint
dependency:
https://github.com/vllm-project/vllm-ascend/actions/runs/39557520821/job/119080661493
https://github.com/vllm-project/vllm-ascend/pull/19358
Suggested implementation
mooncake/engine.pyistub for the public pybind11 API,especially
TransferEngine.mooncake/py.typedonce the distributed package is intended to bePEP 561 typed.
MUSA, EFA, and others built from the shared packaging flow).
or Pyright against a small public-API example.
Adding only
py.typedwould silence the package-levelimport-untypeddiagnostic, but an
engine.pyifile is still needed to expose useful typeinformation for the compiled extension.
Before submitting a new issue...
py.typed,PEP 561, mypy, and Python type stubs.
@github-actions[bot] commented on GitHub (Oct 21, 2026):
Thanks for opening this issue, @MrZ20!
121143079A maintainer will triage this when possible. To help us respond faster, please include:
Useful links: Documentation · Contributing guide
@stmatengss commented on GitHub (Oct 22, 2026):
@MrZ20 Please make sure https://github.com/kvcache-ai/Mooncake/pull/4836 resolve your problems