Skip to content

Commit

Permalink
Consolidate checked directories in a single command to reduce executi…
Browse files Browse the repository at this point in the history
…on time
  • Loading branch information
DarkLight1337 committed Jul 23, 2024
1 parent d2b633a commit 9833350
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 46 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,17 @@ jobs:
pip install types-setuptools
- name: Mypy
run: |
mypy tests --config-file pyproject.toml
mypy vllm/*.py --config-file pyproject.toml --follow-imports silent
mypy vllm/adapter_commons --config-file pyproject.toml --follow-imports silent
mypy vllm/assets --config-file pyproject.toml --follow-imports silent
mypy vllm/attention --config-file pyproject.toml
mypy vllm/core --config-file pyproject.toml
mypy vllm/distributed --config-file pyproject.toml
mypy vllm/engine --config-file pyproject.toml
mypy vllm/entrypoints --config-file pyproject.toml
mypy vllm/executor --config-file pyproject.toml
mypy vllm/inputs --config-file pyproject.toml --follow-imports silent
mypy vllm/logging --config-file pyproject.toml --follow-imports silent
mypy vllm/lora --config-file pyproject.toml
mypy vllm/model_executor --config-file pyproject.toml
mypy vllm/multimodal --config-file pyproject.toml --follow-imports silent
mypy vllm/platforms --config-file pyproject.toml --follow-imports silent
mypy vllm/prompt_adapter --config-file pyproject.toml
mypy vllm/spec_decode --config-file pyproject.toml
mypy vllm/transformers_utils --config-file pyproject.toml --follow-imports silent
mypy vllm/triton_utils --config-file pyproject.toml --follow-imports silent
mypy vllm/usage --config-file pyproject.toml --follow-imports silent
mypy vllm/worker --config-file pyproject.toml
mypy tests --follow_imports skip
mypy vllm/attention --follow_imports skip
mypy vllm/core --follow_imports skip
mypy vllm/distributed --follow_imports skip
mypy vllm/engine --follow_imports skip
mypy vllm/entrypoints --follow_imports skip
mypy vllm/executor --follow_imports skip
mypy vllm/lora --follow_imports skip
mypy vllm/model_executor --follow_imports skip
mypy vllm/prompt_adapter --follow_imports skip
mypy vllm/spec_decode --follow_imports skip
mypy vllm/worker --follow_imports skip
mypy
35 changes: 13 additions & 22 deletions format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,28 +96,19 @@ echo 'vLLM yapf: Done'

# Run mypy
echo 'vLLM mypy:'
mypy tests --config-file pyproject.toml
mypy vllm/*.py --config-file pyproject.toml --follow-imports silent
mypy vllm/adapter_commons --config-file pyproject.toml --follow-imports silent
mypy vllm/assets --config-file pyproject.toml --follow-imports silent
mypy vllm/attention --config-file pyproject.toml
mypy vllm/core --config-file pyproject.toml
mypy vllm/distributed --config-file pyproject.toml
mypy vllm/engine --config-file pyproject.toml
mypy vllm/entrypoints --config-file pyproject.toml
mypy vllm/executor --config-file pyproject.toml
mypy vllm/inputs --config-file pyproject.toml --follow-imports silent
mypy vllm/logging --config-file pyproject.toml --follow-imports silent
mypy vllm/lora --config-file pyproject.toml
mypy vllm/model_executor --config-file pyproject.toml
mypy vllm/multimodal --config-file pyproject.toml --follow-imports silent
mypy vllm/platforms --config-file pyproject.toml --follow-imports silent
mypy vllm/prompt_adapter --config-file pyproject.toml
mypy vllm/spec_decode --config-file pyproject.toml
mypy vllm/transformers_utils --config-file pyproject.toml --follow-imports silent
mypy vllm/triton_utils --config-file pyproject.toml --follow-imports silent
mypy vllm/usage --config-file pyproject.toml --follow-imports silent
mypy vllm/worker --config-file pyproject.toml
mypy tests --follow-imports skip
mypy vllm/attention --follow-imports skip
mypy vllm/core --follow-imports skip
mypy vllm/distributed --follow-imports skip
mypy vllm/engine --follow-imports skip
mypy vllm/entrypoints --follow-imports skip
mypy vllm/executor --follow-imports skip
mypy vllm/lora --follow-imports skip
mypy vllm/model_executor --follow-imports skip
mypy vllm/prompt_adapter --follow-imports skip
mypy vllm/spec_decode --follow-imports skip
mypy vllm/worker --follow-imports skip
mypy


# If git diff returns a file that is in the skip list, the file may be checked anyway:
Expand Down
17 changes: 15 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,22 @@ python_version = "3.8"

ignore_missing_imports = true
check_untyped_defs = true
follow_imports = "skip"
follow_imports = "silent"

files = "vllm"
# After fixing type errors resulting from follow_imports: "skip" -> "silent",
# move the directory here and remove it from format.sh and mypy.yaml
files = [
"vllm/*.py",
"vllm/adapter_commons",
"vllm/assets",
"vllm/inputs",
"vllm/logging",
"vllm/multimodal",
"vllm/platforms",
"vllm/transformers_utils",
"vllm/triton_utils",
"vllm/usage",
]
# TODO(woosuk): Include the code from Megatron and HuggingFace.
exclude = [
"vllm/model_executor/parallel_utils/|vllm/model_executor/models/",
Expand Down

0 comments on commit 9833350

Please sign in to comment.