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:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user