Skip to content

Commit

Permalink
Merge pull request #76 from BoostV/75-adding-modellen-noise-fails-for…
Browse files Browse the repository at this point in the history
…-the-initial-experiments

Only add modelled noise if result contains a model
  • Loading branch information
langdal authored Aug 19, 2023
2 parents c567e59 + 610fc36 commit ed16c4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimizerapi/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __handle_run(body) -> dict:
if n_objectives == 1:
Yi = [elm[0] for elm in Yi]
result = optimizer.tell(Xi, Yi)
if n_objectives == 1:
if n_objectives == 1 and len(result.models) > 0:
if use_actual_measurement_histogram:
optimizer.add_modelled_noise()
result = optimizer.get_result()
Expand Down

0 comments on commit ed16c4c

Please sign in to comment.