Skip to content

Commit

Permalink
Format linting
Browse files Browse the repository at this point in the history
Signed-off-by: Flavia Beo <[email protected]>
  • Loading branch information
flaviabeo committed Oct 28, 2024
1 parent 9c32660 commit ae73f4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ def get_pooling_config(
if not pooling_type_arg and not normalize_arg:
return PoolingConfig(
pooling_type=self.get_pooling_type(pooling_type),
normalize=normalize
)
normalize=normalize)
if pooling_type_arg:
pooling_type = pooling_type_arg
if normalize_arg:
Expand Down
4 changes: 2 additions & 2 deletions vllm/transformers_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def get_pooling_config(model, revision='main', token: Optional[str] = None):
token)
pooling_type_name = next(
(item for item, val in pooling_dict.items() if val is True), None)

pooling_type_name = get_pooling_config_name(pooling_type_name)

Check failure on line 321 in vllm/transformers_utils/config.py

View workflow job for this annotation

GitHub Actions / mypy (3.8)

Argument 1 to "get_pooling_config_name" has incompatible type "Optional[Any]"; expected "str" [arg-type]

Check failure on line 321 in vllm/transformers_utils/config.py

View workflow job for this annotation

GitHub Actions / mypy (3.9)

Argument 1 to "get_pooling_config_name" has incompatible type "Optional[Any]"; expected "str" [arg-type]

Check failure on line 321 in vllm/transformers_utils/config.py

View workflow job for this annotation

GitHub Actions / mypy (3.10)

Argument 1 to "get_pooling_config_name" has incompatible type "Optional[Any]"; expected "str" [arg-type]

Check failure on line 321 in vllm/transformers_utils/config.py

View workflow job for this annotation

GitHub Actions / mypy (3.11)

Argument 1 to "get_pooling_config_name" has incompatible type "Optional[Any]"; expected "str" [arg-type]

Check failure on line 321 in vllm/transformers_utils/config.py

View workflow job for this annotation

GitHub Actions / mypy (3.12)

Argument 1 to "get_pooling_config_name" has incompatible type "Optional[Any]"; expected "str" [arg-type]

return {"pooling_type": pooling_type_name, "normalize": normalize}
Expand All @@ -336,7 +336,7 @@ def get_pooling_config_name(pooling_name: str):
pooling_name = "last"

pooling_type_name = pooling_name.upper()

return pooling_type_name


Expand Down

0 comments on commit ae73f4b

Please sign in to comment.