Skip to content

Commit

Permalink
Fixing lint
Browse files Browse the repository at this point in the history
Signed-off-by: Flavia Beo <[email protected]>
  • Loading branch information
flaviabeo committed Oct 29, 2024
1 parent 3d36a8c commit fbcd540
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Mapping, Optional, Set, Tuple, Type, Union)

import torch
from transformers import PretrainedConfig

import vllm.envs as envs
from transformers import PretrainedConfig
from vllm.logger import init_logger
from vllm.model_executor.layers.pooler import PoolingConfig, PoolingType
from vllm.model_executor.layers.quantization import QUANTIZATION_METHODS
Expand Down Expand Up @@ -420,7 +420,8 @@ def _verify_bnb_config(self) -> None:
"fallback to the eager mode.")
self.enforce_eager = True

def get_pooling_type(self, pooling_type_name: str) -> PoolingType:
def get_pooling_type(self,
pooling_type_name: str) -> Optional[PoolingType]:
pooling_types = {i.name: i for i in PoolingType}
return pooling_types.get(pooling_type_name)

Expand Down
2 changes: 1 addition & 1 deletion vllm/transformers_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
from huggingface_hub.utils import (EntryNotFoundError, LocalEntryNotFoundError,
RepositoryNotFoundError,
RevisionNotFoundError)
from transformers import GenerationConfig, PretrainedConfig
from transformers.models.auto.image_processing_auto import (
get_image_processor_config)
from transformers.models.auto.modeling_auto import (
MODEL_FOR_CAUSAL_LM_MAPPING_NAMES)
from transformers.utils import CONFIG_NAME as HF_CONFIG_NAME

from transformers import GenerationConfig, PretrainedConfig
from vllm.envs import VLLM_USE_MODELSCOPE
from vllm.logger import init_logger
from vllm.model_executor.layers.pooler import PoolingType
Expand Down

0 comments on commit fbcd540

Please sign in to comment.