From 152465a0cb6c57978495896b4c0d99a49088c676 Mon Sep 17 00:00:00 2001 From: GoldenAnpu Date: Tue, 23 Jul 2024 20:07:20 +0200 Subject: [PATCH] Update error handling --- supervisely/serve/src/workflow.py | 2 +- supervisely/train/src/workflow.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/supervisely/serve/src/workflow.py b/supervisely/serve/src/workflow.py index 2f76c41e0d0c..33fc3f653428 100644 --- a/supervisely/serve/src/workflow.py +++ b/supervisely/serve/src/workflow.py @@ -49,7 +49,7 @@ def add_input(self, checkpoint_url: str): else: sly.logger.debug(f"Checkpoint {checkpoint_url} not found in Team Files. Cannot set workflow input") except Exception as e: - sly.logger.error(f"Failed to add input to the workflow: {e}") + sly.logger.debug(f"Failed to add input to the workflow: {e}") @check_compatibility def add_output(self): diff --git a/supervisely/train/src/workflow.py b/supervisely/train/src/workflow.py index 204c5c3532e6..7e9c373c871f 100644 --- a/supervisely/train/src/workflow.py +++ b/supervisely/train/src/workflow.py @@ -49,7 +49,7 @@ def add_input(self, project_info: sly.ProjectInfo, state: dict): project_info, "Train YOLO v5", f"This backup was created automatically by Supervisely before the Train YOLO task with ID: {self.api.task_id}" ) except Exception as e: - sly.logger.error(f"Failed to create a project version: {e}") + sly.logger.warning(f"Failed to create a project version: {repr(e)}") project_version_id = None try: @@ -62,7 +62,7 @@ def add_input(self, project_info: sly.ProjectInfo, state: dict): self.api.app.workflow.add_input_file(file_info, model_weight=True) sly.logger.debug(f"Workflow Input: Project ID - {project_info.id}, Project Version ID - {project_version_id}, Input File - {True if file_info else False}") except Exception as e: - sly.logger.error(f"Failed to add input to the workflow: {e}") + sly.logger.debug(f"Failed to add input to the workflow: {repr(e)}") @check_compatibility def add_output(self, state: dict, team_files_dir: str): @@ -105,4 +105,4 @@ def add_output(self, state: dict, team_files_dir: str): else: sly.logger.debug(f"File with the best weighs not found in Team Files. Cannot set workflow output.") except Exception as e: - sly.logger.error(f"Failed to add output to the workflow: {e}") + sly.logger.debug(f"Failed to add output to the workflow: {repr(e)}")