diff --git a/docs/advanced_features/vlm_query.ipynb b/docs/advanced_features/vlm_query.ipynb index d9a8ae75d2ef..c753f2fd85f9 100644 --- a/docs/advanced_features/vlm_query.ipynb +++ b/docs/advanced_features/vlm_query.ipynb @@ -49,7 +49,7 @@ "image = Image.open(\n", " BytesIO(\n", " requests.get(\n", - " \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\n", + " \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\"\n", " ).content\n", " )\n", ")\n", @@ -187,7 +187,7 @@ "image = Image.open(\n", " BytesIO(\n", " requests.get(\n", - " \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\n", + " \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\"\n", " ).content\n", " )\n", ")\n", diff --git a/docs/basic_usage/openai_api_vision.ipynb b/docs/basic_usage/openai_api_vision.ipynb index 88d1ef7ddf04..1db599dcfa90 100644 --- a/docs/basic_usage/openai_api_vision.ipynb +++ b/docs/basic_usage/openai_api_vision.ipynb @@ -75,7 +75,7 @@ " {{\n", " \"type\": \"image_url\",\n", " \"image_url\": {{\n", - " \"url\": \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\n", + " \"url\": \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\"\n", " }}\n", " }}\n", " ]\n", @@ -120,7 +120,7 @@ " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", - " \"url\": \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\n", + " \"url\": \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\"\n", " },\n", " },\n", " ],\n", @@ -163,7 +163,7 @@ " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", - " \"url\": \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\n", + " \"url\": \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\"\n", " },\n", " },\n", " ],\n", @@ -203,7 +203,7 @@ " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", - " \"url\": \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\",\n", + " \"url\": \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\",\n", " },\n", " },\n", " {\n", diff --git a/docs/basic_usage/qwen3_vl.md b/docs/basic_usage/qwen3_vl.md index b8af19b26c90..f05e7832a534 100644 --- a/docs/basic_usage/qwen3_vl.md +++ b/docs/basic_usage/qwen3_vl.md @@ -56,7 +56,7 @@ data = { { "type": "image_url", "image_url": { - "url": "https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true" + "url": "https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true" }, }, ], diff --git a/docs/basic_usage/sampling_params.md b/docs/basic_usage/sampling_params.md index 5b93349abe26..a97a73686412 100644 --- a/docs/basic_usage/sampling_params.md +++ b/docs/basic_usage/sampling_params.md @@ -162,7 +162,7 @@ python3 -m sglang.launch_server --model-path lmms-lab/llava-onevision-qwen2-7b-o Download an image: ```bash -curl -o example_image.png -L https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true +curl -o example_image.png -L https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true ``` Send a request: diff --git a/docs/references/frontend/frontend_tutorial.ipynb b/docs/references/frontend/frontend_tutorial.ipynb index 836cab6273d7..1fb48972fad3 100644 --- a/docs/references/frontend/frontend_tutorial.ipynb +++ b/docs/references/frontend/frontend_tutorial.ipynb @@ -430,7 +430,7 @@ " s += assistant(gen(\"answer\", max_tokens=256))\n", "\n", "\n", - "image_url = \"https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true\"\n", + "image_url = \"https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true\"\n", "image_bytes, _ = load_image(image_url)\n", "state = image_qa(image_bytes, \"What is in the image?\")\n", "print_highlight(state[\"answer\"])" diff --git a/examples/assets/.gitignore b/examples/assets/.gitignore new file mode 100644 index 000000000000..fc787e3320a3 --- /dev/null +++ b/examples/assets/.gitignore @@ -0,0 +1 @@ +!example_image.png diff --git a/test/lang/example_image.png b/examples/assets/example_image.png similarity index 100% rename from test/lang/example_image.png rename to examples/assets/example_image.png diff --git a/examples/runtime/engine/offline_batch_inference_vlm.py b/examples/runtime/engine/offline_batch_inference_vlm.py index 3928239467bc..939e6910d7d6 100644 --- a/examples/runtime/engine/offline_batch_inference_vlm.py +++ b/examples/runtime/engine/offline_batch_inference_vlm.py @@ -19,7 +19,7 @@ def main( conv = chat_templates[server_args.chat_template].copy() image_token = conv.image_token - image_url = "https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true" + image_url = "https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true" prompt = f"What's in this image?\n{image_token}" diff --git a/examples/runtime/multimodal/llava_onevision_server.py b/examples/runtime/multimodal/llava_onevision_server.py index b5636f0a10e4..2cf16e3bd94e 100644 --- a/examples/runtime/multimodal/llava_onevision_server.py +++ b/examples/runtime/multimodal/llava_onevision_server.py @@ -98,7 +98,7 @@ def multi_image_stream_request_test(client): { "type": "image_url", "image_url": { - "url": "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png" + "url": "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png" }, "modalities": "multi-images", }, diff --git a/python/sglang/test/send_one.py b/python/sglang/test/send_one.py index d5a399f0a611..cff8ec733212 100644 --- a/python/sglang/test/send_one.py +++ b/python/sglang/test/send_one.py @@ -78,17 +78,17 @@ def send_one_prompt(args): args.prompt = ( "Human: Describe this image in a very short sentence.\n\nAssistant:" ) - image_data = "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png" + image_data = "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png" elif args.many_images: args.prompt = ( "Human: I have one reference image and many images." "Describe their relationship in a very short sentence.\n\nAssistant:" ) image_data = [ - "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png", - "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png", - "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png", - "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png", + "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png", + "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png", + "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png", + "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png", ] else: image_data = None diff --git a/python/sglang/test/test_utils.py b/python/sglang/test/test_utils.py index 9d0bfcf71912..4a7da77c98a1 100644 --- a/python/sglang/test/test_utils.py +++ b/python/sglang/test/test_utils.py @@ -123,7 +123,7 @@ DEFAULT_SMALL_MODEL_NAME_FOR_TEST_QWEN = "Qwen/Qwen2.5-1.5B-Instruct" DEFAULT_SMALL_VLM_MODEL_NAME_FOR_TEST = "Qwen/Qwen2.5-VL-3B-Instruct" -DEFAULT_IMAGE_URL = "https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true" +DEFAULT_IMAGE_URL = "https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true" DEFAULT_VIDEO_URL = "https://raw.githubusercontent.com/EvolvingLMMs-Lab/sglang/dev/onevision_local/assets/jobs.mp4" DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH = 600 diff --git a/test/lang/test_litellm_backend.py b/test/lang/test_litellm_backend.py deleted file mode 100644 index 8fcc69cf74d4..000000000000 --- a/test/lang/test_litellm_backend.py +++ /dev/null @@ -1,24 +0,0 @@ -import unittest - -from sglang import LiteLLM, set_default_backend -from sglang.test.test_programs import test_mt_bench, test_stream -from sglang.test.test_utils import CustomTestCase - - -class TestAnthropicBackend(CustomTestCase): - chat_backend = None - - @classmethod - def setUpClass(cls): - cls.chat_backend = LiteLLM("gpt-3.5-turbo") - set_default_backend(cls.chat_backend) - - def test_mt_bench(self): - test_mt_bench() - - def test_stream(self): - test_stream() - - -if __name__ == "__main__": - unittest.main() diff --git a/test/srt/ep/test_deepep_internode.py b/test/manual/ep/test_deepep_internode.py similarity index 100% rename from test/srt/ep/test_deepep_internode.py rename to test/manual/ep/test_deepep_internode.py diff --git a/test/srt/ep/test_deepep_intranode.py b/test/manual/ep/test_deepep_intranode.py similarity index 100% rename from test/srt/ep/test_deepep_intranode.py rename to test/manual/ep/test_deepep_intranode.py diff --git a/test/srt/ep/test_deepep_low_latency.py b/test/manual/ep/test_deepep_low_latency.py similarity index 100% rename from test/srt/ep/test_deepep_low_latency.py rename to test/manual/ep/test_deepep_low_latency.py diff --git a/test/srt/ep/test_eplb.py b/test/manual/ep/test_eplb.py similarity index 100% rename from test/srt/ep/test_eplb.py rename to test/manual/ep/test_eplb.py diff --git a/test/srt/ep/test_hybrid_dp_ep_tp_mtp.py b/test/manual/ep/test_hybrid_dp_ep_tp_mtp.py similarity index 100% rename from test/srt/ep/test_hybrid_dp_ep_tp_mtp.py rename to test/manual/ep/test_hybrid_dp_ep_tp_mtp.py diff --git a/test/srt/ep/test_moe_deepep.py b/test/manual/ep/test_moe_deepep.py similarity index 100% rename from test/srt/ep/test_moe_deepep.py rename to test/manual/ep/test_moe_deepep.py diff --git a/test/srt/ep/test_moe_deepep_eval_accuracy_large.py b/test/manual/ep/test_moe_deepep_eval_accuracy_large.py similarity index 100% rename from test/srt/ep/test_moe_deepep_eval_accuracy_large.py rename to test/manual/ep/test_moe_deepep_eval_accuracy_large.py diff --git a/test/lang/test_bind_cache.py b/test/manual/lang_frontend/test_bind_cache.py similarity index 100% rename from test/lang/test_bind_cache.py rename to test/manual/lang_frontend/test_bind_cache.py diff --git a/test/lang/test_choices.py b/test/manual/lang_frontend/test_choices.py similarity index 100% rename from test/lang/test_choices.py rename to test/manual/lang_frontend/test_choices.py diff --git a/test/lang/test_jump_forward.py b/test/manual/lang_frontend/test_jump_forward.py similarity index 100% rename from test/lang/test_jump_forward.py rename to test/manual/lang_frontend/test_jump_forward.py diff --git a/test/lang/test_openai_backend.py b/test/manual/lang_frontend/test_openai_backend.py similarity index 100% rename from test/lang/test_openai_backend.py rename to test/manual/lang_frontend/test_openai_backend.py diff --git a/test/lang/test_separate_reasoning.py b/test/manual/lang_frontend/test_separate_reasoning.py similarity index 100% rename from test/lang/test_separate_reasoning.py rename to test/manual/lang_frontend/test_separate_reasoning.py diff --git a/test/lang/test_separate_reasoning_execution.py b/test/manual/lang_frontend/test_separate_reasoning_execution.py similarity index 100% rename from test/lang/test_separate_reasoning_execution.py rename to test/manual/lang_frontend/test_separate_reasoning_execution.py diff --git a/test/srt/run_suite.py b/test/srt/run_suite.py index c0ad472cd412..cf9530d1162b 100644 --- a/test/srt/run_suite.py +++ b/test/srt/run_suite.py @@ -235,13 +235,6 @@ TestFile("debug_utils/test_log_parser.py", 5), TestFile("test_deepseek_v3_cutedsl_4gpu.py"), TestFile("entrypoints/http_server/test_abort_request.py"), - TestFile("ep/test_deepep_internode.py"), - TestFile("ep/test_deepep_intranode.py"), - TestFile("ep/test_deepep_low_latency.py"), - TestFile("ep/test_eplb.py"), - TestFile("ep/test_hybrid_dp_ep_tp_mtp.py"), - TestFile("ep/test_moe_deepep.py"), - TestFile("ep/test_moe_deepep_eval_accuracy_large.py"), TestFile("hicache/test_disaggregation_hicache.py"), TestFile("layers/attention/nsa/test_act_quant_triton.py"), TestFile("layers/moe/test_moe_runners.py"), diff --git a/test/srt/test_session_control.py b/test/srt/test_session_control.py index 8088f7893754..99b1128029bf 100644 --- a/test/srt/test_session_control.py +++ b/test/srt/test_session_control.py @@ -594,8 +594,8 @@ def test_session_control(self): "<|im_start|>user\nDescribe this image in a very short sentence.<|im_end|>\nassistant:", ] image_chunks = [ - "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png", - "https://raw.githubusercontent.com/sgl-project/sglang/main/test/lang/example_image.png", + "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png", + "https://raw.githubusercontent.com/sgl-project/sglang/main/examples/assets/example_image.png", "https://raw.githubusercontent.com/sgl-project/sglang/main/assets/logo.png", ] diff --git a/test/srt/test_vlm_accuracy.py b/test/srt/test_vlm_accuracy.py index 4dfa6ff45523..7f6c939f1d76 100644 --- a/test/srt/test_vlm_accuracy.py +++ b/test/srt/test_vlm_accuracy.py @@ -30,7 +30,7 @@ class VisionLLMLogitsBase(unittest.IsolatedAsyncioTestCase): @classmethod def setUpClass(cls): - cls.image_url = "https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true" + cls.image_url = "https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true" cls.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") cls.model_path = "" cls.chat_template = "" diff --git a/test/srt/test_vlm_input_format.py b/test/srt/test_vlm_input_format.py index 489f9cbba3e0..18e4a6441d47 100644 --- a/test/srt/test_vlm_input_format.py +++ b/test/srt/test_vlm_input_format.py @@ -16,7 +16,7 @@ from sglang.srt.entrypoints.openai.protocol import ChatCompletionRequest from sglang.srt.parser.conversation import generate_chat_conv -TEST_IMAGE_URL = "https://github.com/sgl-project/sglang/blob/main/test/lang/example_image.png?raw=true" +TEST_IMAGE_URL = "https://github.com/sgl-project/sglang/blob/main/examples/assets/example_image.png?raw=true" class VLMInputTestBase: