Open simon-mo opened 3 months ago
The current remaining
[rkooo567] mypy vllm/engine/*.py --follow-imports=skip --config-file pyproject.toml
[rkooo567] mypy vllm/worker/*.py --follow-imports=skip --config-file pyproject.toml
[rkooo567] mypy vllm/spec_decode/*.py --follow-imports=skip --config-file pyproject.toml
[rkooo567] mypy vllm/model_executor/*.py --follow-imports=skip --config-file pyproject.toml
mypy vllm/lora/*.py --follow-imports=skip --config-file pyproject.toml
mypy vlllm/entrypoints/openai/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/transformers_utils/configs/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/transformers_utils/tokenizers/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/distributed/device_communicators/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/attention/backends/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/transformers_utils/tokenizer_group/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/core/block/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/model_executor/layers/*.py --follow-imports=skip --config=file pyprojet.toml
mypy vllm/model_executor/layers/*.py --follow-imports=skip --config=file pyprojet.toml
and misc after
For those who are new to the vLLM repo, determining the correct type of each variable is a great way to enhance your understanding of how the code is connected together.
Quick update on the latest progress:
vllm
library (#4555 being the last PR)tests
directory (#5017)However, the effectiveness of type checking is still quite minimal because imported types are currently treated as Any
due to the setting --follow_imports=skip
:
My IDE, which uses Pyright basic mode, still flags a lot of errors, showing that there is much work to be done.
Moving forward, we should work on gradually applying --follow_imports=normal
for each directory, fixing errors as we go. I recommend going through the directories following a similar order as @rkooo567 did (these search filters should be able to locate the relevant PRs).
Cool, looking forward to the progress.
This is a great issue to improve the code quality of the repo, so please feel free to work on it if anyone is interested! One example PR in the past https://github.com/vllm-project/vllm/pull/4043
Anything you want to discuss about vllm.
Even though vLLM is type annotated but we did not enable type checking. It would be useful to add it, even incrementally.