def single_branin_evaluation_step(conn, exp_id): """ Do a single evaluation on the branin function an all what is necessary for it 1. get the next candidate to evaluate from the assistant. 2. evaluate branin at this pint 3. tell the assistant about the new result. Parameters ---------- LAss : LabAssistant The LabAssistant to use. experiment_name : string The name of the experiment for this evaluation """ to_eval = conn.get_next_candidate(exp_id) result = branin_func(to_eval["params"]["x"], to_eval["params"]["y"]) to_eval["result"] = result conn.update(exp_id, to_eval, "finished") return to_eval
def single_branin_evaluation_step(LAss, experiment_name): """ Do a single evaluation on the branin function an all what is necessary for it 1. get the next candidate to evaluate from the assistant. 2. evaluate branin at this pint 3. tell the assistant about the new result. Parameters ---------- LAss : LabAssistant The LabAssistant to use. experiment_name : string The name of the experiment for this evaluation """ to_eval = LAss.get_next_candidate(experiment_name) result = branin_func(to_eval.params["x"], to_eval.params["y"]) to_eval.result = result LAss.update(experiment_name, to_eval) return to_eval