Skip to content

Commit

Permalink
Add traceback for failing to load preprocess class (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
allegroai committed Sep 23, 2023
1 parent 4a737b9 commit e4c07c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clearml_serving/serving/preprocess_service.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
import threading
import traceback
from pathlib import Path
from typing import Optional, Any, Callable, List

Expand Down Expand Up @@ -48,8 +49,8 @@ def __init__(
try:
self._instantiate_custom_preprocess_cls(task)
except Exception as ex:
raise ValueError("Error: Failed loading preprocess code for \'{}\': {}".format(
self.model_endpoint.preprocess_artifact, ex))
raise ValueError("Error: Failed loading preprocess code for \'{}\': {}\n\n{}".format(
self.model_endpoint.preprocess_artifact, ex, traceback.format_exc()))

def _instantiate_custom_preprocess_cls(self, task: Task) -> None:
path = task.artifacts[self.model_endpoint.preprocess_artifact].get_local_copy(extract_archive=False)
Expand Down

0 comments on commit e4c07c7

Please # to comment.