mirror of
https://github.com/clearml/clearml-serving
synced 2025-06-26 18:16:00 +00:00
call gc on remove as well
This commit is contained in:
parent
d0131d0b58
commit
fd8b7604a9
@ -388,6 +388,8 @@ class ModelRequestProcessor(object):
|
|||||||
return False
|
return False
|
||||||
self._endpoints.pop(endpoint_url, None)
|
self._endpoints.pop(endpoint_url, None)
|
||||||
self._remove_registered_input_model(endpoint_url)
|
self._remove_registered_input_model(endpoint_url)
|
||||||
|
self._engine_processor_lookup.pop(endpoint_url, None)
|
||||||
|
gc.collect()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def add_canary_endpoint(
|
def add_canary_endpoint(
|
||||||
|
@ -94,7 +94,10 @@ class BasePreprocessRequest(object):
|
|||||||
def __del__(self):
|
def __del__(self):
|
||||||
super_ = super(PreprocessDelWrapper, self)
|
super_ = super(PreprocessDelWrapper, self)
|
||||||
if callable(getattr(super_, "unload", None)):
|
if callable(getattr(super_, "unload", None)):
|
||||||
super_.unload()
|
try:
|
||||||
|
super_.unload()
|
||||||
|
except Exception as ex:
|
||||||
|
print("Failed unloading model: {}".format(ex))
|
||||||
if callable(getattr(super_, "__del__", None)):
|
if callable(getattr(super_, "__del__", None)):
|
||||||
super_.__del__()
|
super_.__del__()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user