Skip to content

Commit

Permalink
Remove config_id duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFehring committed Dec 13, 2024
1 parent 788e45d commit 5dfe5e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion docs/advanced_usage/8_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ The runhistory.json in split into four parts. `stats`, `data`, `configs`, and `c
```json
"data": {
"1": {
"config_id": 1,
"instance": null,
"seed": 398764591,
"budget": null,
Expand Down
3 changes: 1 addition & 2 deletions smac/runhistory/runhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,6 @@ def save(self, filename: str | Path = "runhistory.json") -> None:
data = dict()
for k, v in self._data.items():
data[k.config_id] = {
"config_id": k.config_id,
"instance": k.instance if k.instance is not None else None,
"seed": k.seed if k.seed is not None else None,
"budget": k.budget if k.budget is not None else None,
Expand Down Expand Up @@ -868,7 +867,7 @@ def load(self, filename: str | Path, configspace: ConfigurationSpace) -> None:
else:
cost = [float(x) for x in value["cost"]]
self.add(
config=self._ids_config[int(key)], # TODO probably -1
config=self._ids_config[int(key)],
cost=cost,
time=value["time"],
cpu_time=value["cpu_time"],
Expand Down

0 comments on commit 5dfe5e0

Please sign in to comment.