File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -150,10 +150,6 @@ async def build_async_engine_client(
150150
151151 async with build_async_engine_client_from_engine_args (
152152 engine_args , args .disable_frontend_multiprocessing ) as engine :
153-
154- # Don't keep the dummy data in memory
155- await engine .reset_mm_cache ()
156-
157153 yield engine
158154
159155
@@ -189,6 +185,10 @@ async def build_async_engine_client_from_engine_args(
189185 usage_context = usage_context ,
190186 disable_log_requests = engine_args .disable_log_requests ,
191187 disable_log_stats = engine_args .disable_log_stats )
188+
189+ # Don't keep the dummy data in memory
190+ await async_llm .reset_mm_cache ()
191+
192192 yield async_llm
193193 finally :
194194 if async_llm :
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ def profile(self, is_start: bool = True):
289289 def reset_mm_cache (self ):
290290 # NOTE: Since this is mainly for debugging, we don't attempt to
291291 # re-sync the internal caches (P0 processor, P0 mirror, P1 mirror)
292- if self .scheduler .get_num_unfinished_requests ():
292+ if self .scheduler .has_unfinished_requests ():
293293 logger .warning ("Resetting the multi-modal cache when requests are "
294294 "in progress may lead to desynced internal caches." )
295295
You can’t perform that action at this time.
0 commit comments