I create a new version of Expected Improvement for my problem.
When I run it I obtain the next configuration to analyse in the model.
Then an error occur in this line :
Algorithm.update_model(next_config)
where my update_model function is defined like this:
def update_model(self, cell_config):
self.model = self.model.condition_on_observations(cell_config.get_tilt(), cell_config.get_reward())
mll = ExactMarginalLogLikelihood(self.model.likelihood, self.model)
fit_gpytorch_model(mll)
return self.model
The error is this one:
RuntimeError: Fantasy observations can only be added after making predictions with a model so that all test independent caches exist. Call the model on some data first!