"vscode:/vscode.git/clone" did not exist on "2c175a5d1436b40105cd73898cbcbed74f053e07"
Unverified Commit f3bf6110 authored by Junrong Lin's avatar Junrong Lin Committed by GitHub
Browse files

feat: add flush cache to EngineBase and HttpServerEngineAdapter (#6009)

parent 198b9056
...@@ -27,6 +27,11 @@ class EngineBase(ABC): ...@@ -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): ...@@ -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")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment