Commit ·
e43ddac
1
Parent(s): f8efcf6
Use default factory for dict
Browse files
src/leaderboard/read_evals.py
CHANGED
|
@@ -2,7 +2,7 @@ import glob
|
|
| 2 |
import json
|
| 3 |
import math
|
| 4 |
import os
|
| 5 |
-
from dataclasses import dataclass
|
| 6 |
|
| 7 |
import dateutil
|
| 8 |
import numpy as np
|
|
@@ -18,7 +18,7 @@ class EvalResult:
|
|
| 18 |
date: str = ""
|
| 19 |
model_id: str = ""
|
| 20 |
inference_provider: str = ""
|
| 21 |
-
results: dict =
|
| 22 |
|
| 23 |
@classmethod
|
| 24 |
def init_from_json_file(self, json_filepath):
|
|
|
|
| 2 |
import json
|
| 3 |
import math
|
| 4 |
import os
|
| 5 |
+
from dataclasses import dataclass, field
|
| 6 |
|
| 7 |
import dateutil
|
| 8 |
import numpy as np
|
|
|
|
| 18 |
date: str = ""
|
| 19 |
model_id: str = ""
|
| 20 |
inference_provider: str = ""
|
| 21 |
+
results: dict = field(default_factory=dict)
|
| 22 |
|
| 23 |
@classmethod
|
| 24 |
def init_from_json_file(self, json_filepath):
|