Skip to content

Commit 211b917

Browse files
committed
add None filling missed columns
1 parent 39d30d8 commit 211b917

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/post_training/test_quantize_conformance.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,17 @@ def fixture_report_data(output_dir, run_benchmark_app, pytestconfig):
171171
if data:
172172
columns_to_drop = ["FPS"] if not run_benchmark_app else []
173173
test_results = OrderedDict(sorted(data.items()))
174-
df = pd.DataFrame(v.get_result_dict() for v in test_results.values())
174+
test_results = [v.get_result_dict() for v in test_results.values()]
175+
# To fill columns of testcases with None if some of them are missing
176+
all_columns = max(test_results, key=len)
177+
filtered_test_results = []
178+
for test_result in test_results:
179+
new_test_result = {}
180+
for column in all_columns:
181+
new_test_result[column] = test_result.get(column, None)
182+
filtered_test_results.append(new_test_result)
183+
184+
df = pd.DataFrame(filtered_test_results)
175185
df = df.drop(columns=columns_to_drop)
176186

177187
output_dir.mkdir(parents=True, exist_ok=True)

0 commit comments

Comments
 (0)