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
According to the current logic, meta-recommenders perform the logic that decides the switching at the point of the .recommend call. However, intuitively imo it would make sense to perform that logic at the time of .add_measurements, simply because adding the measurements marks the end of an iteration, and meta-recommenders switch based on iterations.
The current behavior requires the following unintuitive workaround:
recommender=TwoPhaseMetaRecommender(
initial_recommender=RandomRecommender(),
recommender=BotorchRecommender,
switch_after=1,
)
campaign=Campaign(..., recommender=recommender)
recs=recommender.recommend(5)
### perform measurementscampaing.add_measurements(my_measurements)
# Analyze the surrogate based on the first set of measurementssurrogate=campaign.get_surrogate()
This will fail with RuntimeError: The current recommender is of type 'RandomRecommender'. Surrogate models are only available for recommender subclasses of 'BayesianRecommender'. because the meta recommender has not yet advanced the recommender to the second one. This requires another emtpy call to .recommend, which would not be needed anymore in the suggested change.
The text was updated successfully, but these errors were encountered:
According to the current logic, meta-recommenders perform the logic that decides the switching at the point of the
.recommend
call. However, intuitively imo it would make sense to perform that logic at the time of.add_measurements
, simply because adding the measurements marks the end of an iteration, and meta-recommenders switch based on iterations.The current behavior requires the following unintuitive workaround:
This will fail with
RuntimeError: The current recommender is of type 'RandomRecommender'. Surrogate models are only available for recommender subclasses of 'BayesianRecommender'.
because the meta recommender has not yet advanced the recommender to the second one. This requires another emtpy call to.recommend
, which would not be needed anymore in the suggested change.The text was updated successfully, but these errors were encountered: