change dbg print

This commit is contained in:
Eugen Ajechiloae 2024-08-14 20:50:57 +03:00
parent f95939cffe
commit 67325df4d5

View File

@ -872,7 +872,7 @@ class ModelRequestProcessor(object):
poll_frequency_sec = float(poll_frequency_sec)
# force mark started on the main serving service task
self._task.mark_started(force=True)
self._report_text("Launching - configuration sync every {} sec".format(poll_frequency_sec))
self._report_text("Launching - configuration sync every {} sec -- dbg print".format(poll_frequency_sec))
cleanup = False
model_monitor_update = False
self._update_serving_plot()
@ -909,24 +909,18 @@ class ModelRequestProcessor(object):
self._engine_processor_lookup = dict()
except Exception as ex:
print("Exception occurred in monitoring thread: {}".format(ex))
print("before sleep")
self._report_text("before sleep")
sleep(poll_frequency_sec)
print("after sleep")
self._report_text("after sleep")
try:
# we assume that by now all old deleted endpoints requests already returned
print("before if")
if model_monitor_update and not cleanup:
print("before 1")
for k in list(self._engine_processor_lookup.keys()):
print("before 2")
if k not in self._endpoints:
print("before 3")
# atomic
self._engine_processor_lookup[k]._model = None
print("clearml-serving --id c1a4ebd2586040ad906cf338d16bcb87 model remove --endpoint test_model_sklearn")
gc.collect()
if hasattr(self._engine_processor_lookup[k]._preprocess, "unload"):
print("hasattr")
try:
self._engine_processor_lookup[k]._preprocess.unload()
except Exception as ex: