Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iteration_number in PriorAcquisitionFunction() #1076

Open
RoseGH20 opened this issue Oct 4, 2023 · 4 comments · Fixed by #1185
Open

iteration_number in PriorAcquisitionFunction() #1076

RoseGH20 opened this issue Oct 4, 2023 · 4 comments · Fixed by #1185
Assignees
Labels
Milestone

Comments

@RoseGH20
Copy link

RoseGH20 commented Oct 4, 2023

Description

I am using PriorAcquisitionFunction. Based on https://arxiv.org/pdf/2204.11051.pdf, the weight of the user-defined prior is decreased exponentially after each iteration/ optimization step. I noticed that the variable self._iteration_number in class PriorAcquisitionFunction is updated each time the acquisition function is used. However, because the acquisition function is not used at every step (multiple configurations are proposed after evaluating the acquisition function), self._iteration_number is lower than the actual number of function evaluations which keep the weight of the prior high. I am wondering if this is the desired behavior or if for this class, self._iteration_number should be equal to the number of evaluation rather than the number of time the acquisition function was used.

Steps/Code to Reproduce

af = PriorAcquisitionFunction(acquisition_function=EI(), decay_beta=5)
scenario = Scenario(task.configspace, n_trials=n_iters, seed= s)

intensifier = BBFacade.get_intensifier(scenario, max_config_calls=1)
smac = BBFacade(scenario, task.train, acquisition_function=af, overwrite=True, intensifier=intensifier)
incumbent = smac.optimize()

Expected Results (?)

AF evaluations (self._iteration_number=1)
X configurations proposed
AF evaluations (self._iteration_number=1+X)
Y configurations proposed
AF evaluations (self._iteration_number=1+X+Y)

Actual Results

AF evaluations (self._iteration_number=1)
X configurations proposed
AF evaluations (self._iteration_number=2)
Y configurations proposed
AF evaluations (self._iteration_number=3)

Versions

Version 2.0.2

@alexandertornede
Copy link
Contributor

Hi!

Thanks for reporting this, we will be looking into it!

@LukasFehring
Copy link
Collaborator

LukasFehring commented Dec 23, 2024

Hi @RoseGH20 sorry for the late answer.
You are indeed correct, that the self.iteration_number does not get updated correctly. However, the experiments in the paper are conducted using HyperMapper and should therefore still hold.

I am currently working on a few fixes for the PriorAcquisitionFunction, and just pushed a preliminary fix to the linked MR.
Best
Lukas

@benjamc benjamc moved this to In Progress in SMAC board Jan 8, 2025
@benjamc benjamc added this to the v2.3 milestone Jan 8, 2025
@LukasFehring LukasFehring linked a pull request Jan 13, 2025 that will close this issue
@benjamc
Copy link
Collaborator

benjamc commented Jan 13, 2025

Closed by #1185

@benjamc benjamc closed this as completed Jan 13, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in SMAC board Jan 13, 2025
@LukasFehring LukasFehring reopened this Jan 20, 2025
@LukasFehring
Copy link
Collaborator

I just found that the isse persists, if the local search calls the acquisition function multiple times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants