Skip to content

Commit

Permalink
Update docstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFehring committed Dec 19, 2024
1 parent 31a1a14 commit 4f77643
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions smac/runhistory/runhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,19 +770,21 @@ def save(self, filename: str | Path = "runhistory.json") -> None:
"""
data = list()
for k, v in self._data.items():
data.append({
"config_id": int(k.config_id),
"instance": str(k.instance) if k.instance is not None else None,
"seed": int(k.seed) if k.seed is not None else None,
"budget": float(k.budget) if k.budget is not None else None,
"cost": v.cost,
"time": v.time,
"cpu_time": v.cpu_time,
"status": v.status,
"starttime": v.starttime,
"endtime": v.endtime,
"additional_info": v.additional_info,
})
data.append(
{
"config_id": int(k.config_id),
"instance": str(k.instance) if k.instance is not None else None,
"seed": int(k.seed) if k.seed is not None else None,
"budget": float(k.budget) if k.budget is not None else None,
"cost": v.cost,
"time": v.time,
"cpu_time": v.cpu_time,
"status": v.status,
"starttime": v.starttime,
"endtime": v.endtime,
"additional_info": v.additional_info,
}
)

config_ids_to_serialize = set([entry["config_id"] for entry in data])
configs = {}
Expand Down

0 comments on commit 4f77643

Please sign in to comment.