Skip to content

Commit

Permalink
Update error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu committed Jul 23, 2024
1 parent cdb7eae commit 152465a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion supervisely/serve/src/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions supervisely/train/src/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand Down Expand Up @@ -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)}")

0 comments on commit 152465a

Please sign in to comment.