Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mypy] Enable type checking for test directory #5017

Merged
merged 31 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c2e23b5
Small improvements in type annotations
DarkLight1337 May 23, 2024
7be8fa5
Add missing type annotations
DarkLight1337 May 23, 2024
f6e5c2f
Add type annotation for list elements in tests
DarkLight1337 May 24, 2024
5da8d85
Add type annotation for list elements in main code
DarkLight1337 May 24, 2024
2e26ac5
Fix yapf
DarkLight1337 May 24, 2024
c9c0bca
Remove unnecessary type hint
DarkLight1337 May 24, 2024
490c78b
Apply formatter
DarkLight1337 May 24, 2024
2322145
Add type annotation mainly regarding dict elements
DarkLight1337 May 24, 2024
6a95e53
Fix some type errors in tests
DarkLight1337 May 24, 2024
c7922bb
More fixes
DarkLight1337 May 24, 2024
5c9a055
Fix incorrect dtype
DarkLight1337 May 24, 2024
04a40f0
Merge branch 'upstream' into improve-types
DarkLight1337 May 25, 2024
05ab69f
Fix types related to `tolist`
DarkLight1337 May 25, 2024
0f61f48
Merge branch 'upstream' into improve-types
DarkLight1337 May 29, 2024
58af1f6
Fix bad merge
DarkLight1337 May 29, 2024
b68fa6c
Merge branch 'upstream' into improve-types
DarkLight1337 May 29, 2024
a54f6e3
Merge branch 'upstream' into improve-types
DarkLight1337 May 30, 2024
9cd38f7
Fix wrong type
DarkLight1337 May 30, 2024
8081f85
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 3, 2024
01fb52b
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 3, 2024
5ef7804
Enable type checking for tests
DarkLight1337 Jun 3, 2024
71ace6c
Fix incorrect return type annotation
DarkLight1337 Jun 3, 2024
2e19d09
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 4, 2024
c3fe67c
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 6, 2024
1138733
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 7, 2024
ab68e8f
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 11, 2024
ac3708b
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 14, 2024
2732d0b
Fix type errors
DarkLight1337 Jun 14, 2024
28e470d
Merge branch 'upstream' into improve-types
DarkLight1337 Jun 15, 2024
2c79f5f
Fix mypy error
DarkLight1337 Jun 15, 2024
5185058
Fix mypy error
DarkLight1337 Jun 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'upstream' into improve-types
  • Loading branch information
DarkLight1337 committed Jun 3, 2024
commit 8081f858eabea9b2b0c80d25d148250ffd38a12e
13 changes: 11 additions & 2 deletions benchmarks/kernels/benchmark_mixtral_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,17 @@ class BenchmarkConfig(TypedDict):
num_stages: int


def run_grid(bs, method, dtype: str):
d_model = 4096
def run_grid(bs, model, method, gpu, tp_size, dtype: str):
if model == '8x7B':
d_model = 4096
model_intermediate_size = 14336
num_layers = 32
elif model == '8x22B':
d_model = 6144
model_intermediate_size = 16384
num_layers = 56
else:
raise ValueError(f'Unsupported Mixtral model {model}')
num_total_experts = 8
top_k = 2
# tp_size = 2
Expand Down
4 changes: 2 additions & 2 deletions tests/kernels/test_pos_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

IS_NEOX_STYLE = [True, False]
DTYPES = [torch.half, torch.bfloat16, torch.float]
HEAD_SIZES = [64, 80, 96, 112, 128, 256]
ROTARY_DIMS = (None, 32) # None means rotary dim == head size
HEAD_SIZES = [64, 80, 96, 112, 128, 192, 256]
ROTARY_DIMS = [None, 32] # None means rotary dim == head size
NUM_HEADS = [7, 17] # Arbitrary values for testing
BATCH_SIZES = [1, 5] # Arbitrary values for testing
SEQ_LENS = [11, 8192] # Arbitrary values for testing
Expand Down
2 changes: 1 addition & 1 deletion vllm/model_executor/layers/linear.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import abstractmethod
from typing import List, Optional, Tuple
from typing import Dict, List, Optional, Tuple

import torch
import torch.nn.functional as F
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.