[HiCache] Check in-flight async ops in is_fully_idle() before attach/detach (#20746)
This commit is contained in:
@@ -14,6 +14,7 @@ from sglang.test.server_fixtures.disaggregation_fixture import (
|
||||
from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
flush_cache_with_retry,
|
||||
popen_launch_pd_server,
|
||||
)
|
||||
|
||||
@@ -114,9 +115,9 @@ class DisaggregationHiCacheBase(PDDisaggregationServerBase):
|
||||
# Trigger offloading
|
||||
self.send_request(self.gen_prompt(1), max_tokens=150)
|
||||
|
||||
# Flush device cache to force remote storage access
|
||||
# Flush device cache to force remote storage access.
|
||||
time.sleep(2)
|
||||
requests.post(self.prefill_url + "/flush_cache")
|
||||
flush_cache_with_retry(self.prefill_url)
|
||||
|
||||
|
||||
class TestDisaggregationPrefillWithHiCache(DisaggregationHiCacheBase):
|
||||
|
||||
@@ -18,6 +18,7 @@ from sglang.test.test_utils import (
|
||||
DEFAULT_MODEL_NAME_FOR_TEST,
|
||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||
find_available_port,
|
||||
flush_cache_with_retry,
|
||||
popen_launch_server,
|
||||
)
|
||||
|
||||
@@ -180,11 +181,7 @@ class TestPPWithHiCache(unittest.TestCase):
|
||||
return False
|
||||
|
||||
def flush_cache(self) -> bool:
|
||||
try:
|
||||
response = requests.post(f"{self.base_url}/flush_cache", timeout=10)
|
||||
return response.status_code == 200
|
||||
except requests.RequestException:
|
||||
return False
|
||||
return flush_cache_with_retry(self.base_url)
|
||||
|
||||
def test_eval_accuracy(self):
|
||||
args = SimpleNamespace(
|
||||
|
||||
Reference in New Issue
Block a user