fix black in pre-commit (#1940)
This commit is contained in:
@@ -56,7 +56,7 @@ ALL_OTHER_MODELS = [
|
||||
ModelCase("HuggingFaceTB/SmolLM-135M-Instruct", skip_long_prompt=True),
|
||||
ModelCase("allenai/OLMo-1B-0724-hf", decode_tolerance=8e-2, skip_long_prompt=True),
|
||||
ModelCase("THUDM/glm-4-9b-chat"),
|
||||
ModelCase("openai-community/gpt2")
|
||||
ModelCase("openai-community/gpt2"),
|
||||
]
|
||||
|
||||
TORCH_DTYPES = [torch.float16]
|
||||
|
||||
@@ -3,6 +3,7 @@ python3 -m unittest test_openai_server.TestOpenAIServer.test_batch
|
||||
python3 -m unittest test_openai_server.TestOpenAIServer.test_completion
|
||||
|
||||
"""
|
||||
|
||||
import json
|
||||
import time
|
||||
import unittest
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""
|
||||
python3 -m unittest test_skip_tokenizer_init.TestSkipTokenizerInit.test_parallel_sample
|
||||
"""
|
||||
|
||||
import json
|
||||
import unittest
|
||||
|
||||
|
||||
@@ -110,7 +110,6 @@ class TestSRTEngine(unittest.TestCase):
|
||||
def test_5_prompt_input_ids_consistency(self):
|
||||
prompt = "The capital of UK is"
|
||||
|
||||
|
||||
model_path = DEFAULT_MODEL_NAME_FOR_TEST
|
||||
engine = sgl.Engine(model_path=model_path, random_seed=42, log_level="error")
|
||||
sampling_params = {"temperature": 0, "max_new_tokens": 8}
|
||||
@@ -118,7 +117,9 @@ class TestSRTEngine(unittest.TestCase):
|
||||
|
||||
tokenizer = get_tokenizer(model_path)
|
||||
token_ids = tokenizer.encode(prompt)
|
||||
out2 = engine.generate(input_ids=token_ids, sampling_params=sampling_params)["text"]
|
||||
out2 = engine.generate(input_ids=token_ids, sampling_params=sampling_params)[
|
||||
"text"
|
||||
]
|
||||
|
||||
engine.shutdown()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user