Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
b422d496
Unverified
Commit
b422d496
authored
Jul 10, 2024
by
Benjamin Muskalla
Committed by
GitHub
Jul 10, 2024
Browse files
[CI/Build] Enable mypy typing for remaining folders (#6268)
parent
c38eba30
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
20 deletions
+21
-20
.github/workflows/mypy.yaml
.github/workflows/mypy.yaml
+10
-8
format.sh
format.sh
+9
-9
vllm/platforms/cuda.py
vllm/platforms/cuda.py
+2
-3
No files found.
.github/workflows/mypy.yaml
View file @
b422d496
...
...
@@ -32,20 +32,22 @@ jobs:
pip install types-setuptools
-
name
:
Mypy
run
:
|
mypy tests --config-file pyproject.toml
mypy vllm/*.py --config-file pyproject.toml
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
mypy vllm/logging --config-file pyproject.toml
mypy vllm/lora --config-file pyproject.toml
mypy vllm/model_executor --config-file pyproject.toml
mypy vllm/multimodal --config-file pyproject.toml
mypy vllm/
usage
--config-file pyproject.toml
mypy vllm/
*.py
--config-file pyproject.toml
mypy vllm/
platforms
--config-file pyproject.toml
mypy vllm/
spec_decode
--config-file pyproject.toml
mypy vllm/transformers_utils --config-file pyproject.toml
mypy vllm/
engine
--config-file pyproject.toml
mypy vllm/
usage
--config-file pyproject.toml
mypy vllm/worker --config-file pyproject.toml
mypy vllm/spec_decode --config-file pyproject.toml
mypy vllm/model_executor --config-file pyproject.toml
mypy vllm/lora --config-file pyproject.toml
mypy vllm/logging --config-file pyproject.toml
mypy tests --config-file pyproject.toml
format.sh
View file @
b422d496
...
...
@@ -96,23 +96,23 @@ echo 'vLLM yapf: Done'
# Run mypy
echo
'vLLM mypy:'
mypy tests
--config-file
pyproject.toml
mypy vllm/
*
.py
--config-file
pyproject.toml
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/logging
--config-file
pyproject.toml
mypy vllm/lora
--config-file
pyproject.toml
mypy vllm/model_executor
--config-file
pyproject.toml
mypy vllm/multimodal
--config-file
pyproject.toml
mypy vllm/
usage
--config-file
pyproject.toml
mypy vllm/
*
.py
--config-file
pyproject.toml
mypy vllm/
prompt_adapter
--config-file
pyproject.toml
mypy vllm/
spec_decode
--config-file
pyproject.toml
mypy vllm/transformers_utils
--config-file
pyproject.toml
mypy vllm/
engine
--config-file
pyproject.toml
mypy vllm/
usage
--config-file
pyproject.toml
mypy vllm/worker
--config-file
pyproject.toml
mypy vllm/spec_decode
--config-file
pyproject.toml
mypy vllm/model_executor
--config-file
pyproject.toml
mypy vllm/lora
--config-file
pyproject.toml
mypy vllm/logging
--config-file
pyproject.toml
mypy vllm/prompt_adapter
--config-file
pyproject.toml
mypy tests
--config-file
pyproject.toml
# If git diff returns a file that is in the skip list, the file may be checked anyway:
...
...
vllm/platforms/cuda.py
View file @
b422d496
...
...
@@ -34,11 +34,10 @@ def get_physical_device_capability(device_id: int = 0) -> Tuple[int, int]:
def
device_id_to_physical_device_id
(
device_id
:
int
)
->
int
:
if
"CUDA_VISIBLE_DEVICES"
in
os
.
environ
:
device_ids
=
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
].
split
(
","
)
device_ids
=
[
int
(
device_id
)
for
device_id
in
device_ids
]
physical_device_id
=
device_ids
[
device_id
]
return
int
(
physical_device_id
)
else
:
physical_device_id
=
device_id
return
physical_device_id
return
device_id
class
CudaPlatform
(
Platform
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment