Fix unit tests for the frontend language part (#872)
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
"""
|
||||
Usage:
|
||||
python3 -m sglang.launch_server --model-path meta-llama/Meta-Llama-3-8B-Instruct --port 30000
|
||||
python3 test_bind_cache.py
|
||||
"""
|
||||
|
||||
import unittest
|
||||
|
||||
import sglang as sgl
|
||||
from sglang.lang.backend.runtime_endpoint import RuntimeEndpoint
|
||||
|
||||
|
||||
class TestBind(unittest.TestCase):
|
||||
backend = None
|
||||
|
||||
def setUp(self):
|
||||
cls = type(self)
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.backend = sgl.Runtime(model_path="meta-llama/Meta-Llama-3-8B-Instruct")
|
||||
sgl.set_default_backend(cls.backend)
|
||||
|
||||
if cls.backend is None:
|
||||
cls.backend = RuntimeEndpoint(base_url="http://localhost:30000")
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls.backend.shutdown()
|
||||
|
||||
def test_bind(self):
|
||||
@sgl.function
|
||||
@@ -54,5 +50,5 @@ if __name__ == "__main__":
|
||||
unittest.main(warnings="ignore")
|
||||
|
||||
# t = TestBind()
|
||||
# t.setUp()
|
||||
# t.setUpClass()
|
||||
# t.test_cache()
|
||||
|
||||
Reference in New Issue
Block a user