@@ -954,16 +954,17 @@ def load_metrics(self, eval_id: str) -> AquaEvalMetrics:
954
954
955
955
dsc_model = DataScienceModel .from_id (eval_id )
956
956
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
958
960
):
961
+ logger .info (
962
+ f"Fetching { EVALUATION_REPORT_MD } and { EVALUATION_REPORT_JSON } from custom metadata..."
963
+ )
959
964
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 )
966
966
else :
967
+ logger .info ("Fetching Evaluation Reports from OSS bucket..." )
967
968
dsc_model .download_artifact (
968
969
temp_dir ,
969
970
auth = self ._auth ,
@@ -1090,6 +1091,8 @@ def download_report(self, eval_id) -> AquaEvalReport:
1090
1091
temp_dir , get_files (temp_dir ), EVALUATION_REPORT
1091
1092
)
1092
1093
1094
+ print ("type of content: " , type (content ))
1095
+ print ("content: " , content )
1093
1096
report = AquaEvalReport (
1094
1097
evaluation_id = eval_id , content = base64 .b64encode (content ).decode ()
1095
1098
)
0 commit comments