File size: 638 Bytes
cf6dc04
 
 
e783f64
cf6dc04
 
 
 
 
 
 
 
e783f64
 
 
 
 
 
cf6dc04
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import json
import pandas as pd
from constants import RESULTS_DIR, CATEGORY_MAP


def load_all_results():
    all_data = []
    for file in os.listdir(RESULTS_DIR):
        if file.endswith(".json"):
            with open(os.path.join(RESULTS_DIR, file), "r") as f:
                data = json.load(f)
                for entry in data:
                    model = entry["Model"]
                    size, category = CATEGORY_MAP.get(model, ("N/A", "Unknown"))
                    entry["Size"] = size
                    entry["Category"] = category
                    all_data.append(entry)
    return pd.DataFrame(all_data)