Unverified Commit 7be3a59d authored by Ning Xie's avatar Ning Xie Committed by GitHub
Browse files

[Misc] enhance static type hint (#23059)


Signed-off-by: default avatarAndy Xie <andy.xning@gmail.com>
parent 8ea0c275
...@@ -8,6 +8,7 @@ from contextlib import contextmanager ...@@ -8,6 +8,7 @@ from contextlib import contextmanager
from typing import Union from typing import Union
import numpy as np import numpy as np
import torch
import torch.nn as nn import torch.nn as nn
from vllm.config import LoRAConfig, ModelConfig, SchedulerConfig from vllm.config import LoRAConfig, ModelConfig, SchedulerConfig
...@@ -31,7 +32,8 @@ class LoRAModelRunnerMixin: ...@@ -31,7 +32,8 @@ class LoRAModelRunnerMixin:
def load_lora_model(self, model: nn.Module, model_config: ModelConfig, def load_lora_model(self, model: nn.Module, model_config: ModelConfig,
scheduler_config: SchedulerConfig, scheduler_config: SchedulerConfig,
lora_config: LoRAConfig, device: str) -> nn.Module: lora_config: LoRAConfig,
device: torch.device) -> nn.Module:
if not supports_lora(model): if not supports_lora(model):
raise ValueError( raise ValueError(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment