Skip to content

Commit d4772c0

Browse files
merrymercytarinkk
authored andcommitted
Fix flush cache (sgl-project#5590)
1 parent a8cc4b5 commit d4772c0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

python/sglang/srt/entrypoints/http_server.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@
2525
import os
2626
import threading
2727
import time
28-
from ast import Mult
2928
from http import HTTPStatus
30-
from typing import AsyncIterator, Callable, Dict, Optional, Union
31-
32-
from sglang.srt.model_executor.model_runner import LocalSerializedTensor
29+
from typing import AsyncIterator, Callable, Dict, Optional
3330

3431
# Fix a bug of Python threading
3532
setattr(threading, "_register_atexit", lambda *args, **kwargs: None)
@@ -84,7 +81,6 @@
8481
from sglang.srt.reasoning_parser import ReasoningParser
8582
from sglang.srt.server_args import ServerArgs
8683
from sglang.srt.utils import (
87-
MultiprocessingSerializer,
8884
add_api_key_middleware,
8985
add_prometheus_middleware,
9086
delete_directory,

python/sglang/srt/managers/tokenizer_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ async def _handle_batch_request(
716716
pass
717717

718718
async def flush_cache(self) -> FlushCacheReqOutput:
719-
return await self.flush_cache_communicator(FlushCacheReqInput())
719+
return (await self.flush_cache_communicator(FlushCacheReqInput()))[0]
720720

721721
def abort_request(self, rid: str):
722722
if rid not in self.rid_to_state:

0 commit comments

Comments
 (0)