MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / setUpClass

Method setUpClass

tests/entrypoints/test_generation.py:47–60  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

45
46 @classmethod
47 def setUpClass(cls):
48 try:
49 llm = LLM(
50 model=MODEL_NAME,
51 max_num_batched_tokens=4096,
52 tensor_parallel_size=1,
53 lm_head_fp32=True,
54 engine_worker_queue_port=int(os.getenv("FD_ENGINE_QUEUE_PORT")),
55 cache_queue_port=int(os.getenv("FD_CACHE_QUEUE_PORT")),
56 )
57 cls.llm = weakref.proxy(llm)
58 except Exception as e:
59 print(f"Setting up LLM failed: {e}")
60 raise unittest.SkipTest(f"LLM initialization failed: {e}")
61
62 @classmethod
63 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 2

LLMClass · 0.90
printFunction · 0.85

Tested by

no test coverage detected