Skip to content

Commit

Permalink
stop the model server
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Dec 16, 2024
1 parent 83af6b7 commit 107050c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions train/src/ui/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,16 @@ def get_image_infos_by_split(split: list):
sly.logger.info(
f"Predictions project name: {bm.dt_project_info.name}. Workspace_id: {bm.dt_project_info.workspace_id}"
)

# 9. Stop the server
try:
m.app.stop()
except Exception as e:
sly.logger.warning(f"Failed to stop the model app: {e}")
try:
thread.join()
except Exception as e:
sly.logger.warning(f"Failed to stop the server: {e}")
except Exception as e:
sly.logger.error(f"Model benchmark failed. {repr(e)}", exc_info=True)
try:
Expand Down

0 comments on commit 107050c

Please sign in to comment.