Skip to content

Commit

Permalink
Fix typo and hidden optimizer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Uri Granta committed Aug 20, 2024
1 parent d4949ec commit bba0f1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def test_optimizer_finds_minima_of_the_categorical_scaled_branin_function(
)

dataset = (
BayesianOptimizer(observer, mixed_search_space)
BayesianOptimizer(observer, problem.search_space)
.optimize(num_steps, initial_data, model, acquisition_rule)
.try_get_final_dataset()
)
Expand Down
3 changes: 1 addition & 2 deletions trieste/acquisition/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
Box,
CollectionSearchSpace,
Constraint,
DiscreteSearchSpace,
GeneralDiscreteSearchSpace,
SearchSpace,
SearchSpaceType,
Expand Down Expand Up @@ -735,7 +734,7 @@ def get_bounds_of_box_relaxation_around_point(
space_with_fixed_discrete = space
for tag in space.subspace_tags:
if isinstance(
space.get_subspace(tag), DiscreteSearchSpace
space.get_subspace(tag), GeneralDiscreteSearchSpace
): # convert discrete subspaces to box spaces.
subspace_value = space.get_subspace_component(tag, current_point)
space_with_fixed_discrete = space_with_fixed_discrete.fix_subspace(tag, subspace_value)
Expand Down

0 comments on commit bba0f1b

Please sign in to comment.