Skip to content

Commit 38e0838

Browse files
Adding logging in update metrics
1 parent ec98228 commit 38e0838

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

ads/aqua/evaluation/evaluation.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -954,16 +954,17 @@ def load_metrics(self, eval_id: str) -> AquaEvalMetrics:
954954

955955
dsc_model = DataScienceModel.from_id(eval_id)
956956
if dsc_model.if_model_custom_metadata_artifact_exist(
957-
eval_id, EVALUATION_REPORT_MD
957+
EVALUATION_REPORT_MD
958+
) and dsc_model.if_model_custom_metadata_artifact_exist(
959+
EVALUATION_REPORT_JSON
958960
):
961+
logger.info(
962+
f"Fetching {EVALUATION_REPORT_MD} and {EVALUATION_REPORT_JSON} from custom metadata..."
963+
)
959964
dsc_model.get_custom_metadata_artifact(EVALUATION_REPORT_MD, temp_dir)
960-
if dsc_model.if_model_custom_metadata_artifact_exist(
961-
eval_id, EVALUATION_REPORT_JSON
962-
):
963-
dsc_model.get_custom_metadata_artifact(
964-
EVALUATION_REPORT_JSON, temp_dir
965-
)
965+
dsc_model.get_custom_metadata_artifact(EVALUATION_REPORT_JSON, temp_dir)
966966
else:
967+
logger.info("Fetching Evaluation Reports from OSS bucket...")
967968
dsc_model.download_artifact(
968969
temp_dir,
969970
auth=self._auth,
@@ -1090,6 +1091,8 @@ def download_report(self, eval_id) -> AquaEvalReport:
10901091
temp_dir, get_files(temp_dir), EVALUATION_REPORT
10911092
)
10921093

1094+
print("type of content: ", type(content))
1095+
print("content: ", content)
10931096
report = AquaEvalReport(
10941097
evaluation_id=eval_id, content=base64.b64encode(content).decode()
10951098
)

0 commit comments

Comments
 (0)