Support clear mm and encoder cache (#33452)

Signed-off-by: Roger Wang <hey@rogerw.io>
Co-authored-by: Roger Wang <hey@rogerw.io>
This commit is contained in:
jma99_2333
2026-01-31 15:22:25 +00:00
committed by GitHub
co-authored by Roger Wang
parent 13b842f271
commit 22d9a056d5
15 changed files with 212 additions and 1 deletions
+4
View File
@@ -294,6 +294,10 @@ class Executor(ABC):
"""Reset the multi-modal cache in each worker."""
self.collective_rpc("reset_mm_cache")
def reset_encoder_cache(self) -> None:
"""Reset the encoder cache in each worker to clear cached encoder outputs."""
self.collective_rpc("reset_encoder_cache")
def sleep(self, level: int = 1):
if self.is_sleeping:
logger.warning("Executor is already sleeping.")