Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/scripts/extract_benchmark_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ def transform(
benchmark_results: List,
benchmark_config: Dict[str, str],
job_name: str,
job_report: Any = {},
) -> List:
"""
Transform the benchmark results into the format writable into the benchmark database
Expand All @@ -361,6 +362,7 @@ def transform(
# Just keep a copy of the benchmark config here
"benchmark_config": json.dumps(benchmark_config),
"job_conclusion": "SUCCESS",
"job_arn": job_report.get("arn", ""),
},
},
"model": {
Expand Down Expand Up @@ -446,6 +448,7 @@ def transform_failure_record(
"app_type": app_type,
"job_conclusion": result,
"failure_type": level,
"job_arn": report.get("arn", ""),
"job_report": json.dumps(report),
},
},
Expand Down Expand Up @@ -512,6 +515,7 @@ def get_benchmark_config(
def extract_benchmark_result_from_artifact(
artifact: Dict[str, Any],
benchmark_config: Dict[str, str],
job_report: Any,
) -> List[Any]:
job_name = artifact.get("job_name", "")
artifact_type = artifact.get("type", "")
Expand All @@ -532,7 +536,7 @@ def extract_benchmark_result_from_artifact(
)
if not benchmark_results:
return []
return transform(app_type, benchmark_results, benchmark_config, job_name)
return transform(app_type, benchmark_results, benchmark_config, job_name, job_report)


def get_app_type(type: str):
Expand Down Expand Up @@ -674,7 +678,7 @@ def process_benchmark_results(content: Any, app: str, benchmark_configs: str):
for job_artifact in job_artifacts:
# generate result for each schema
results = extract_benchmark_result_from_artifact(
job_artifact, benchmark_config
job_artifact, benchmark_config,job_report
)
all_benchmark_results.extend(results)
return all_benchmark_results
Expand Down
Loading