From 4f77643e70e5180c67944a9c99e41fac86b1dabb Mon Sep 17 00:00:00 2001 From: Lukas Fehring Date: Thu, 19 Dec 2024 16:05:01 +0100 Subject: [PATCH] Update docstyle --- smac/runhistory/runhistory.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/smac/runhistory/runhistory.py b/smac/runhistory/runhistory.py index 75307256b..4aeb10b41 100644 --- a/smac/runhistory/runhistory.py +++ b/smac/runhistory/runhistory.py @@ -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 = {}