prevent visualize from crashing

If somehting exists in saved_results.json, that doesnt in the
suite_settings (comented out e.g.) it crashed. Now it doesnt.
This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-10-05 21:08:31 +02:00
parent 7e46382f32
commit c4c79c1d2a

View File

@@ -18,6 +18,7 @@ def get_df() -> pd.DataFrame:
data = json.load(f)
raw_data = []
for test_hash, test_data in data.items():
try:
raw_data.append({
"hash": test_hash,
"model_name": models[test_data['model_id']].display_name,
@@ -28,6 +29,8 @@ def get_df() -> pd.DataFrame:
"test_name": tests[test_data['test_id']].name,
"validation": test_data['validation']
})
except KeyError:
pass
df = pd.DataFrame(raw_data)