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
I was thinking of implementing the Evolution-guided BO as described in this paper and I thought that it would make sense to write something with a similar structure to the SEBOAcquisition class and with a .optimize similar to the EGBO implemented in this repo.
To do so, I need to pull back the untransformed X_observed and the corresponding metrics.
I went down the rabbit hole and explored the attributes of many of the objects passed to SEBOAcquisition but could not find what I needed. Any ideas?
I know I could use the original codes here but I was hoping to write something that is more 'Ax-like'.
For context, I print out below the code from the repo implementing the EGBO.
def optimize_st_egbo(acq_func, x, y, batch_size):
# for st qnehvi
pareto_mask = is_non_dominated(y)
pareto_x = x[pareto_mask].cpu().numpy()
problem = PymooProblem(n_var=x.shape[1], n_obj=y.shape[1], n_constr=0,
xl=np.zeros(x.shape[1]), xu=np.ones(x.shape[1]))
ref_dirs = get_reference_directions("energy", y.shape[1], batch_size*n_tasks)
algo = NSGA3(pop_size=raw_samples, ref_dirs=ref_dirs)
algo.setup(problem, termination = NoTermination())
pop = Population.new("X", x.cpu().numpy())
pop.set("F", -y.cpu().numpy())
algo.tell(infills=pop)
new_pop = algo.ask()
candidates = torch.tensor(new_pop.get("X"), **tkwargs)
acq_value_list = [acq_func(candidates[i].unsqueeze(dim=0)).detach().item()
for i in range(candidates.shape[0])]
sorted_x = candidates.cpu().numpy()[np.argsort(acq_value_list)]
return torch.tensor(sorted_x[-batch_size:], **tkwargs) # take best BATCH_SIZE samples
Please provide any relevant code snippet if applicable.
No response
Code of Conduct
I agree to follow this Ax's Code of Conduct
The text was updated successfully, but these errors were encountered:
), so you could subclass Acquisition similar to SEBO and then store the training data on the Acquisition object, so that you can access it during optimize.
Question
I was thinking of implementing the Evolution-guided BO as described in this paper and I thought that it would make sense to write something with a similar structure to the
SEBOAcquisition
class and with a.optimize
similar to the EGBO implemented in this repo.To do so, I need to pull back the untransformed X_observed and the corresponding metrics.
I went down the rabbit hole and explored the attributes of many of the objects passed to
SEBOAcquisition
but could not find what I needed. Any ideas?I know I could use the original codes here but I was hoping to write something that is more 'Ax-like'.
For context, I print out below the code from the repo implementing the EGBO.
Please provide any relevant code snippet if applicable.
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: