Skip to content
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

Update benchmark field mapping #15

Merged
merged 1 commit into from
Dec 24, 2024
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
11 changes: 8 additions & 3 deletions .github/actions/collect_data/src/benchmark.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# SPDX-FileCopyrightText: (c) 2024 Tenstorrent AI ULC
#
# SPDX-License-Identifier: Apache-2.0

import os
import pathlib
import json
from loguru import logger
from pydantic_models import BenchmarkMeasurement, CompleteBenchmarkRun

"""
Generate benchmark data from perf reports.
"""


def create_json_from_report(pipeline, workflow_outputs_dir):
results = []
Expand Down Expand Up @@ -62,7 +67,7 @@ def _map_benchmark_data(pipeline, job_id, report_data):
return CompleteBenchmarkRun(
run_start_ts=pipeline.pipeline_start_ts,
run_end_ts=pipeline.pipeline_end_ts,
run_type="",
run_type=report_data["model"],
git_repo_name=None,
git_commit_hash=pipeline.git_commit_hash,
git_commit_ts=None,
Expand All @@ -79,7 +84,7 @@ def _map_benchmark_data(pipeline, job_id, report_data):
ml_model_type=None,
num_layers=None,
batch_size=report_data.get("batch_size", None),
config_params={},
config_params=None,
precision=None,
dataset_name=None,
profiler_name=None,
Expand All @@ -93,7 +98,7 @@ def _map_benchmark_data(pipeline, job_id, report_data):
step_start_ts=job.job_start_ts,
step_end_ts=job.job_end_ts,
iteration=0,
step_name="",
step_name=report_data["model"],
step_warm_up_num_iterations=None,
name="samples_per_sec",
value=report_data["samples_per_sec"],
Expand Down
Loading