Skip to content

Commit ed9504d

Browse files
update evaluation logging
1 parent b0827e5 commit ed9504d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ads/aqua/evaluation/evaluation.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,11 @@ def get(self, eval_id) -> AquaEvaluationDetail:
721721
introspection = json.loads(
722722
self._get_attribute_from_model_metadata(resource, "ArtifactTestResults")
723723
)
724-
except Exception:
724+
except Exception as ex:
725+
logger.debug(
726+
f"There was an issue loading the model attribute as json object for evaluation {eval_id}. "
727+
f"Setting introspection to empty.\n Error:{ex}"
728+
)
725729
introspection = {}
726730

727731
summary = AquaEvaluationDetail(
@@ -874,13 +878,13 @@ def get_status(self, eval_id: str) -> dict:
874878
try:
875879
log_id = job_run_details.log_details.log_id
876880
except Exception as e:
877-
logger.debug(f"Failed to get associated log. {str(e)}")
881+
logger.debug(f"Failed to get associated log.\nError: {str(e)}")
878882
log_id = ""
879883

880884
try:
881885
loggroup_id = job_run_details.log_details.log_group_id
882886
except Exception as e:
883-
logger.debug(f"Failed to get associated log. {str(e)}")
887+
logger.debug(f"Failed to get associated log.\nError: {str(e)}")
884888
loggroup_id = ""
885889

886890
loggroup_url = get_log_links(region=self.region, log_group_id=loggroup_id)
@@ -954,7 +958,7 @@ def load_metrics(self, eval_id: str) -> AquaEvalMetrics:
954958
)
955959
except Exception as e:
956960
logger.debug(
957-
"Failed to load `report.json` from evaluation artifact" f"{str(e)}"
961+
f"Failed to load `report.json` from evaluation artifact.\nError: {str(e)}"
958962
)
959963
json_report = {}
960964

@@ -1279,7 +1283,7 @@ def _get_source(
12791283
)
12801284
except Exception as ex:
12811285
logger.debug(
1282-
f"Failed to retrieve source information for evaluation {evaluation.identifier}.\nError: {ex}"
1286+
f"Failed to retrieve source information for evaluation {evaluation.identifier}.\nError: {str(ex)}"
12831287
)
12841288
source_name = ""
12851289

0 commit comments

Comments
 (0)