def attempt_update(self, examples, params, allow_missing_data=False): """Update the serving backend with new parameters.""" # since we're serving, ignore params and just extract the best example self.current_values = best_example(examples)["values"] # set new allow_missing_data and call init_fallback_backend if necessary self.allow_missing_data = allow_missing_data if not self.fallback_backend and self.allow_missing_data: self.init_fallback_backend() return True
def get_optimal_run(self): """Return a dictionary containing the optimal parameters and reward computed so far.""" return best_example(self._examples)
def __init__(self, examples, params): # since we're serving, ignore params and just extract the best example self.current_values = best_example(examples)["values"]
def attempt_update(self, examples, params): """Update the serving backend with new parameters.""" # since we're serving, ignore params and just extract the best example self.current_values = best_example(examples)["values"] return True