Skip to content

Commit

Permalink
remove unnecessary columns in results gathering
Browse files Browse the repository at this point in the history
  • Loading branch information
achew010 committed May 27, 2024
1 parent f39d03c commit 04702cc
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 66 deletions.
18 changes: 14 additions & 4 deletions scripts/benchmarks/display_bench_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@

# First Party
# import this because of alot of internal contants
from scripts.benchmarks.benchmark import gather_report
from scripts.benchmarks.benchmark import gather_report, DIR_SAMP_CONFIGS
from typing import List


def main(*directories: str, output_filename: str = "results.csv"):
def main(*directories: str, output_filename: str = "results.csv", remove_columns: List[str]):
"gather outputs from a list of directories and output to a csv"

df, constant = gather_report(*directories, raw=False)
# filter result columns to keep by the inverse of remove_columns
df = df[df.columns[~df.columns.isin(remove_columns)]]
# remove root dir from config filename
df["acceleration_framework_config_file"] = df["acceleration_framework_config_file"].str.replace(f"{DIR_SAMP_CONFIGS}", "sample-configurations")
errors = []
try:
# remove error messages if any
Expand Down Expand Up @@ -44,5 +48,11 @@ def main(*directories: str, output_filename: str = "results.csv"):
default="results.csv",
help="name of final csv report file.",
)
parser.add_argument(
"--remove_columns",
nargs="+",
help="list of columns to ignore from results.csv",
)

args = parser.parse_args()
main(args.bench_outputs, output_filename=args.result_file)
main(args.bench_outputs, output_filename=args.result_file, remove_columns=args.remove_columns)
Loading

0 comments on commit 04702cc

Please sign in to comment.