You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to optimize a function that takes in 3 float parameters. However, not all combinations of the 3 parameters could exist.
Is there a way to define the configspace as a pool of possible solutions, so smac samples configs as three-dimensional points from that pool?
Steps/Code to Reproduce
What I'm doing now is defining the config space in the regular way:
Ask for a config or point in the three-dimensional space
Find the closest existing point to the suggested point
Get the score or value associated with that point
Tell smac3 the resulting TrialValue and TrialInfo
for _ in range(search_iterations):
info = smac.ask()
assert info.seed is not None
score, point = model.sample(info.config, ec=ec, seed=info.seed)
value = TrialValue(cost=score, time=0.5)
true_info = TrialInfo(config=Configuration(configuration_space=model.configspace,
values={
'x0': float(point[0]),
'x1': float(point[1]),
'x2': float(point[2]),
}), seed=info.seed)
smac.tell(true_info, value)
Expected Results
all_scores = [smac.runhistory.average_cost(config) for config in smac.runhistory.get_configs()]
I would expect the length of all_scores to be equal to the number of search_iterations, and no 'nan' values
Actual Results
When I inspect the results by running: all_scores = [smac.runhistory.average_cost(config) for config in smac.runhistory.get_configs()]
I get several 'nan' scores and the number of values samples is greater than the max number of evaluations (search_iterations)
Versions
smac version 2.0.2
Thanks!
The text was updated successfully, but these errors were encountered:
The approach you performed has a conceptual problem from my perspective: There is no guarantee that the closest point (depending on the distance metric you use) actually has a comparable acquisition function value.
Moreover, without looking into this, I assume that the nan values arise from the fact that you do not provide a proper value for the configuration that you obtained by the ask call, which is why SMAC just fills it automatically with a nan value. I would need to look into this, to confirm this assumption, though.
Description
I want to optimize a function that takes in 3 float parameters. However, not all combinations of the 3 parameters could exist.
Is there a way to define the configspace as a pool of possible solutions, so smac samples configs as three-dimensional points from that pool?
Steps/Code to Reproduce
What I'm doing now is defining the config space in the regular way:
Then, I use the Ask-and-Tell interface to:
Expected Results
all_scores = [smac.runhistory.average_cost(config) for config in smac.runhistory.get_configs()]
I would expect the length of all_scores to be equal to the number of search_iterations, and no 'nan' values
Actual Results
When I inspect the results by running:
all_scores = [smac.runhistory.average_cost(config) for config in smac.runhistory.get_configs()]
I get several 'nan' scores and the number of values samples is greater than the max number of evaluations (search_iterations)
Versions
smac version 2.0.2
Thanks!
The text was updated successfully, but these errors were encountered: