Skip to content

Commit c2ba8e4

Browse files
authored
Update test_generation.py
1 parent 1100f4e commit c2ba8e4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/entrypoints/test_generation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from fastdeploy.engine.request import RequestOutput
99
from fastdeploy.engine.sampling_params import SamplingParams
1010
from fastdeploy.entrypoints.llm import LLM
11-
from fastdeploy.utils import get_random_port
1211

1312
MODEL_NAME = os.getenv("MODEL_PATH") + "/ernie-45-21b-a3b-bf16-paddle"
1413

@@ -32,7 +31,6 @@ class TestGeneration(unittest.TestCase):
3231

3332
@classmethod
3433
def setUpClass(cls):
35-
"""Set up test environment before any tests run"""
3634
try:
3735
llm = LLM(
3836
model=MODEL_NAME,
@@ -42,7 +40,8 @@ def setUpClass(cls):
4240
)
4341
cls.llm = weakref.proxy(llm)
4442
except Exception as e:
45-
return
43+
print(f"Setting up LLM failed: {e}")
44+
raise unittest.SkipTest(f"LLM initialization failed: {e}")
4645

4746
@classmethod
4847
def tearDownClass(cls):

0 commit comments

Comments
 (0)