Skip to content

Commit 7050e0f

Browse files
Ignored warnings in vllm
1 parent f90e34b commit 7050e0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/fmcore/algorithm/vllm.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import numpy as np
55
from bears import FileMetadata
6-
from bears.util import EnvUtil, get_default, optional_dependency, set_param_from_alias
6+
from bears.util import EnvUtil, get_default, ignore_warnings, optional_dependency, set_param_from_alias
77
from pydantic import confloat, conint, model_validator
88

99
from fmcore.framework._task.text_generation import (
@@ -96,7 +96,8 @@ def initialize(self, model_dir: Optional[FileMetadata] = None):
9696
kwargs["hf_overrides"]["api_key"] = self.hyperparams.api_key
9797
print(f"Initializing vllm with kwargs: {kwargs}")
9898

99-
self.llm = LLM(**kwargs)
99+
with ignore_warnings():
100+
self.llm = LLM(**kwargs)
100101

101102
def predict_step(self, batch: Prompts, **kwargs) -> Dict:
102103
"""Run prediction on a batch of prompts"""

0 commit comments

Comments
 (0)