Tiny add Engine.flush_cache API (#5241)

This commit is contained in:
fzyzcjy
2025-04-21 09:15:03 +08:00
committed by GitHub
parent 5239d79568
commit 1195182040
5 changed files with 29 additions and 11 deletions

View File

@@ -279,6 +279,10 @@ class Engine(EngineBase):
self.shutdown()
return False
def flush_cache(self):
loop = asyncio.get_event_loop()
return loop.run_until_complete(self.tokenizer_manager.flush_cache())
def start_profile(self):
loop = asyncio.get_event_loop()
loop.run_until_complete(self.tokenizer_manager.start_profile())