Skip to content

Commit 43f4c4d

Browse files
committed
add in ci
Signed-off-by: Yang Wang <[email protected]>
1 parent cfd1be3 commit 43f4c4d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/scripts/extract_benchmark_results.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ def transform(
341341
benchmark_results: List,
342342
benchmark_config: Dict[str, str],
343343
job_name: str,
344+
job_report: Any
344345
) -> List:
345346
"""
346347
Transform the benchmark results into the format writable into the benchmark database
@@ -361,6 +362,7 @@ def transform(
361362
# Just keep a copy of the benchmark config here
362363
"benchmark_config": json.dumps(benchmark_config),
363364
"job_conclusion": "SUCCESS",
365+
"job_arn": job_report.get("arn", ""),
364366
},
365367
},
366368
"model": {
@@ -446,6 +448,7 @@ def transform_failure_record(
446448
"app_type": app_type,
447449
"job_conclusion": result,
448450
"failure_type": level,
451+
"job_arn": report.get("arn", ""),
449452
"job_report": json.dumps(report),
450453
},
451454
},
@@ -512,6 +515,7 @@ def get_benchmark_config(
512515
def extract_benchmark_result_from_artifact(
513516
artifact: Dict[str, Any],
514517
benchmark_config: Dict[str, str],
518+
job_report: Any,
515519
) -> List[Any]:
516520
job_name = artifact.get("job_name", "")
517521
artifact_type = artifact.get("type", "")
@@ -532,7 +536,7 @@ def extract_benchmark_result_from_artifact(
532536
)
533537
if not benchmark_results:
534538
return []
535-
return transform(app_type, benchmark_results, benchmark_config, job_name)
539+
return transform(app_type, benchmark_results, benchmark_config, job_name, job_report)
536540

537541

538542
def get_app_type(type: str):
@@ -674,7 +678,7 @@ def process_benchmark_results(content: Any, app: str, benchmark_configs: str):
674678
for job_artifact in job_artifacts:
675679
# generate result for each schema
676680
results = extract_benchmark_result_from_artifact(
677-
job_artifact, benchmark_config
681+
job_artifact, benchmark_config,job_report
678682
)
679683
all_benchmark_results.extend(results)
680684
return all_benchmark_results

0 commit comments

Comments
 (0)