From c82d20d48ecc643ab2a84a0961b8b71901eeffb1 Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Fri, 20 Mar 2026 01:04:32 -0700 Subject: [PATCH] Fix DeepSeek V32 FP4 test (#20984) --- python/sglang/test/test_utils.py | 3 ++- test/registered/quant/test_deepseek_v32_fp4_4gpu.py | 9 +++++++++ test/registered/quant/test_deepseek_v32_fp4_mtp_4gpu.py | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/python/sglang/test/test_utils.py b/python/sglang/test/test_utils.py index 32db3c07d..a987f3e9a 100644 --- a/python/sglang/test/test_utils.py +++ b/python/sglang/test/test_utils.py @@ -865,6 +865,7 @@ def popen_launch_server( Started subprocess.Popen object """ other_args = other_args or [] + offline_force_disabled = env.get("HF_HUB_OFFLINE") == "0" # Auto-detect device if needed if device == "auto": @@ -885,7 +886,7 @@ def popen_launch_server( try: from sglang.utils import is_in_ci - if is_in_ci(): + if is_in_ci() and not offline_force_disabled: per_run_marker_path = _try_enable_offline_mode_if_cache_complete( model, env, other_args ) diff --git a/test/registered/quant/test_deepseek_v32_fp4_4gpu.py b/test/registered/quant/test_deepseek_v32_fp4_4gpu.py index 4bdcd1367..cc59c0a4c 100644 --- a/test/registered/quant/test_deepseek_v32_fp4_4gpu.py +++ b/test/registered/quant/test_deepseek_v32_fp4_4gpu.py @@ -1,3 +1,4 @@ +import os import unittest from types import SimpleNamespace @@ -46,6 +47,10 @@ class TestDeepseekV32FP4DP(CustomTestCase): cls.base_url, timeout=SERVER_LAUNCH_TIMEOUT, other_args=other_args, + env={ + **os.environ, + "HF_HUB_OFFLINE": "0", + }, ) @classmethod @@ -113,6 +118,10 @@ class TestDeepseekV32FP4TP(CustomTestCase): cls.base_url, timeout=SERVER_LAUNCH_TIMEOUT, other_args=other_args, + env={ + **os.environ, + "HF_HUB_OFFLINE": "0", + }, ) @classmethod diff --git a/test/registered/quant/test_deepseek_v32_fp4_mtp_4gpu.py b/test/registered/quant/test_deepseek_v32_fp4_mtp_4gpu.py index 3a99f6ad9..e3f0fdabd 100644 --- a/test/registered/quant/test_deepseek_v32_fp4_mtp_4gpu.py +++ b/test/registered/quant/test_deepseek_v32_fp4_mtp_4gpu.py @@ -1,3 +1,4 @@ +import os import unittest from types import SimpleNamespace @@ -60,6 +61,10 @@ class TestDeepseekV32FP4DPSpecV2(CustomTestCase): cls.base_url, timeout=SERVER_LAUNCH_TIMEOUT, other_args=other_args, + env={ + **os.environ, + "HF_HUB_OFFLINE": "0", + }, ) @classmethod @@ -150,6 +155,10 @@ class TestDeepseekV32FP4TPSpecV2(CustomTestCase): cls.base_url, timeout=SERVER_LAUNCH_TIMEOUT, other_args=other_args, + env={ + **os.environ, + "HF_HUB_OFFLINE": "0", + }, ) @classmethod