Skip to content

Commit b0827e5

Browse files
update evaluation logging
1 parent 8005294 commit b0827e5

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

ads/aqua/evaluation/evaluation.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ def create(
193193
eval_inference_configuration = (
194194
container.spec.evaluation_configuration
195195
)
196-
except Exception:
196+
except Exception as ex:
197197
logger.debug(
198198
f"Could not load inference config details for the evaluation source id: "
199199
f"{create_aqua_evaluation_details.evaluation_source_id}. Please check if the container"
200-
f" runtime has the correct SMC image information."
200+
f" runtime has the correct SMC image information.\nError: {str(ex)}"
201201
)
202202
elif (
203203
DataScienceResource.MODEL
@@ -283,7 +283,7 @@ def create(
283283
f"Invalid experiment name. Please provide an experiment with `{Tags.AQUA_EVALUATION}` in tags."
284284
)
285285
except Exception:
286-
logger.debug(
286+
logger.info(
287287
f"Model version set {experiment_model_version_set_name} doesn't exist. "
288288
"Creating new model version set."
289289
)
@@ -705,14 +705,16 @@ def get(self, eval_id) -> AquaEvaluationDetail:
705705
try:
706706
log = utils.query_resource(log_id, return_all=False)
707707
log_name = log.display_name if log else ""
708-
except Exception:
708+
except Exception as ex:
709+
logger.debug(f"Failed to get associated log name. Error: {ex}")
709710
pass
710711

711712
if loggroup_id:
712713
try:
713714
loggroup = utils.query_resource(loggroup_id, return_all=False)
714715
loggroup_name = loggroup.display_name if loggroup else ""
715-
except Exception:
716+
except Exception as ex:
717+
logger.debug(f"Failed to get associated loggroup name. Error: {ex}")
716718
pass
717719

718720
try:
@@ -1041,6 +1043,7 @@ def download_report(self, eval_id) -> AquaEvalReport:
10411043
return report
10421044

10431045
with tempfile.TemporaryDirectory() as temp_dir:
1046+
logger.info(f"Downloading evaluation artifact for {eval_id}.")
10441047
DataScienceModel.from_id(eval_id).download_artifact(
10451048
temp_dir,
10461049
auth=self._auth,
@@ -1194,6 +1197,7 @@ def _delete_job_and_model(job, model):
11941197
def load_evaluation_config(self, container: Optional[str] = None) -> Dict:
11951198
"""Loads evaluation config."""
11961199

1200+
logger.info("Loading evaluation container config.")
11971201
# retrieve the evaluation config by container family name
11981202
evaluation_config = get_evaluation_service_config(container)
11991203

@@ -1273,9 +1277,9 @@ def _get_source(
12731277
raise AquaRuntimeError(
12741278
f"Not supported source type: {resource_type}"
12751279
)
1276-
except Exception:
1280+
except Exception as ex:
12771281
logger.debug(
1278-
f"Failed to retrieve source information for evaluation {evaluation.identifier}."
1282+
f"Failed to retrieve source information for evaluation {evaluation.identifier}.\nError: {ex}"
12791283
)
12801284
source_name = ""
12811285

0 commit comments

Comments
 (0)