Skip to content

Commit

Permalink
add columns filling for --forked
Browse files Browse the repository at this point in the history
  • Loading branch information
kshpv committed Feb 11, 2025
1 parent 5adaf4f commit ec1d5f6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/post_training/test_quantize_conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,22 @@ def fixture_report_data(output_dir, run_benchmark_app, pytestconfig):
if pytestconfig.getoption("forked") and output_file.exists():
# When run test with --forked to run test in separate process
# Used in post_training_performance jobs
df.to_csv(output_file, index=False, mode="a", header=False)
existing_df = pd.read_csv(output_file)

# Ensure all columns are present in both DataFrames
for column in existing_df.columns:
if column not in df.columns:
df[column] = None
for column in df.columns:
if column not in existing_df.columns:
existing_df[column] = None

# Reorder columns to match
df = df[existing_df.columns]

# Append new data to existing data
combined_df = pd.concat([existing_df, df], ignore_index=True)
combined_df.to_csv(output_file, index=False)
else:
df.to_csv(output_file, index=False)

Expand Down

0 comments on commit ec1d5f6

Please sign in to comment.