Skip to content

[Feature Request] Add job_arn to benchmark result #10372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 23, 2025
Merged
Changes from all 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
10 changes: 8 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,9 @@ 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 +680,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