[Bugfix] Avoid repeatedly creating dummy data during engine startup (#17935)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-05-12 22:40:19 -07:00
committed by GitHub
parent 1df491c522
commit 61e0a506a3
15 changed files with 99 additions and 4 deletions
+15
View File
@@ -88,6 +88,9 @@ class EngineCoreClient(ABC):
def profile(self, is_start: bool = True) -> None:
raise NotImplementedError
def reset_mm_cache(self) -> None:
raise NotImplementedError
def reset_prefix_cache(self) -> None:
raise NotImplementedError
@@ -143,6 +146,9 @@ class EngineCoreClient(ABC):
async def profile_async(self, is_start: bool = True) -> None:
raise NotImplementedError
async def reset_mm_cache_async(self) -> None:
raise NotImplementedError
async def reset_prefix_cache_async(self) -> None:
raise NotImplementedError
@@ -214,6 +220,9 @@ class InprocClient(EngineCoreClient):
def profile(self, is_start: bool = True) -> None:
self.engine_core.profile(is_start)
def reset_mm_cache(self) -> None:
self.engine_core.reset_mm_cache()
def reset_prefix_cache(self) -> None:
self.engine_core.reset_prefix_cache()
@@ -600,6 +609,9 @@ class SyncMPClient(MPClient):
def profile(self, is_start: bool = True) -> None:
self.call_utility("profile", is_start)
def reset_mm_cache(self) -> None:
self.call_utility("reset_mm_cache")
def reset_prefix_cache(self) -> None:
self.call_utility("reset_prefix_cache")
@@ -787,6 +799,9 @@ class AsyncMPClient(MPClient):
async def profile_async(self, is_start: bool = True) -> None:
await self.call_utility_async("profile", is_start)
async def reset_mm_cache_async(self) -> None:
await self.call_utility_async("reset_mm_cache")
async def reset_prefix_cache_async(self) -> None:
await self.call_utility_async("reset_prefix_cache")