Fix [test]: Env:SGLANG_TORCH_PROFILER_DIR for pytest. (#10780)

This commit is contained in:
shubham singhal
2025-10-03 22:59:32 +08:00
committed by GitHub
parent 6ae3f05b33
commit 03def5e3b1
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import unittest
import requests
from sglang.srt.environ import envs
from sglang.srt.utils import kill_process_tree
from sglang.test.test_utils import (
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
@@ -25,6 +26,7 @@ class TestStartProfile(CustomTestCase):
@classmethod
def setUpClass(cls):
envs.SGLANG_TORCH_PROFILER_DIR.set(OUTPUT_DIR)
cls.model = DEFAULT_SMALL_MODEL_NAME_FOR_TEST
cls.base_url = DEFAULT_URL_FOR_TEST
cls.process = popen_launch_server(
@@ -111,5 +113,4 @@ class TestStartProfile(CustomTestCase):
if __name__ == "__main__":
os.environ["SGLANG_TORCH_PROFILER_DIR"] = OUTPUT_DIR
unittest.main()