feat: add flush cache to EngineBase and HttpServerEngineAdapter (#6009)
This commit is contained in:
@@ -27,6 +27,11 @@ class EngineBase(ABC):
|
|||||||
"""Generate outputs based on given inputs."""
|
"""Generate outputs based on given inputs."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def flush_cache(self):
|
||||||
|
"""Flush the cache of the engine."""
|
||||||
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def update_weights_from_tensor(
|
def update_weights_from_tensor(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -140,3 +140,6 @@ class HttpServerEngineAdapter(EngineBase):
|
|||||||
|
|
||||||
def resume_memory_occupation(self):
|
def resume_memory_occupation(self):
|
||||||
return self._make_request("resume_memory_occupation")
|
return self._make_request("resume_memory_occupation")
|
||||||
|
|
||||||
|
def flush_cache(self):
|
||||||
|
return self._make_request("flush_cache")
|
||||||
|
|||||||
Reference in New Issue
Block a user