Skip to content

Commit

Permalink
First preliminary fix for the iteration_number.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFehring committed Dec 23, 2024
1 parent 24aaea3 commit dec0e7b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions smac/acquisition/function/prior_acquisition_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def __init__(
acquisition_type = self._acquisition_function

self._rescale = isinstance(acquisition_type, (LCB, TS))
self._iteration_number = 0

# Variables needed to adapt the weighting of the prior
self._iteration_number = 0 # The amount of configurations the prior was used in the selection of configurations

@property
def name(self) -> str: # noqa: D102
Expand Down Expand Up @@ -117,7 +119,10 @@ def _update(self, **kwargs: Any) -> None:
Current incumbent value.
"""
assert "eta" in kwargs
self._iteration_number += 1

# TODO this is an imperfect fix, but it is better than previously.
# We need to decide how to handle the values sampled initially
self._iteration_number = kwargs["num_data"]
self._eta = kwargs["eta"]

assert self.model is not None
Expand Down

0 comments on commit dec0e7b

Please sign in to comment.