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(
150
150
151
151
async with build_async_engine_client_from_engine_args (
152
152
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
-
157
153
yield engine
158
154
159
155
@@ -189,6 +185,10 @@ async def build_async_engine_client_from_engine_args(
189
185
usage_context = usage_context ,
190
186
disable_log_requests = engine_args .disable_log_requests ,
191
187
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
+
192
192
yield async_llm
193
193
finally :
194
194
if async_llm :
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ def profile(self, is_start: bool = True):
289
289
def reset_mm_cache (self ):
290
290
# NOTE: Since this is mainly for debugging, we don't attempt to
291
291
# 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 ():
293
293
logger .warning ("Resetting the multi-modal cache when requests are "
294
294
"in progress may lead to desynced internal caches." )
295
295
You can’t perform that action at this time.
0 commit comments