add .isort.cfg (#378)

This commit is contained in:
Liangsheng Yin
2024-04-22 22:38:09 +08:00
committed by GitHub
parent cf9d8efdd3
commit 9acc6e3504
57 changed files with 125 additions and 139 deletions

View File

@@ -1,7 +1,6 @@
import argparse
import glob
import multiprocessing
import os
import time
import unittest

View File

@@ -1,9 +1,7 @@
import json
import unittest
from sglang.test.test_programs import test_mt_bench, test_stream
from sglang import Anthropic, set_default_backend
from sglang.test.test_programs import test_mt_bench, test_stream
class TestAnthropicBackend(unittest.TestCase):

View File

@@ -1,8 +1,7 @@
import unittest
from sglang.backend.runtime_endpoint import RuntimeEndpoint
import sglang as sgl
from sglang.backend.runtime_endpoint import RuntimeEndpoint
class TestBind(unittest.TestCase):

View File

@@ -1,5 +1,6 @@
import unittest
from sglang import OpenAI, set_default_backend
from sglang.test.test_programs import (
test_decode_int,
test_decode_json,
@@ -15,8 +16,6 @@ from sglang.test.test_programs import (
test_tool_use,
)
from sglang import OpenAI, set_default_backend
class TestOpenAIBackend(unittest.TestCase):
backend = None

View File

@@ -2,9 +2,9 @@
python3 -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --port 30000
"""
import json
import unittest
import sglang as sgl
from sglang.test.test_programs import (
test_decode_int,
test_decode_json_regex,
@@ -12,16 +12,12 @@ from sglang.test.test_programs import (
test_few_shot_qa,
test_mt_bench,
test_parallel_decoding,
test_parallel_encoding,
test_react,
test_regex,
test_select,
test_stream,
test_tool_use,
)
import sglang as sgl
class TestSRTBackend(unittest.TestCase):
backend = None

View File

@@ -1,10 +1,9 @@
import unittest
import sglang as sgl
from sglang.backend.base_backend import BaseBackend
from sglang.lang.chat_template import get_chat_template
import sglang as sgl
class TestTracing(unittest.TestCase):
def test_few_shot_qa(self):
@@ -111,7 +110,7 @@ class TestTracing(unittest.TestCase):
forks = s.fork(3)
for i in range(3):
forks[i] += f"Now, expand tip {i+1} into a paragraph:\n"
forks[i] += sgl.gen(f"detailed_tip")
forks[i] += sgl.gen("detailed_tip")
s += "Tip 1:" + forks[0]["detailed_tip"] + "\n"
s += "Tip 2:" + forks[1]["detailed_tip"] + "\n"

View File

@@ -1,5 +1,6 @@
import unittest
from sglang import VertexAI, set_default_backend
from sglang.test.test_programs import (
test_expert_answer,
test_few_shot_qa,
@@ -10,8 +11,6 @@ from sglang.test.test_programs import (
test_stream,
)
from sglang import VertexAI, set_default_backend
class TestVertexAIBackend(unittest.TestCase):
backend = None