pytorch / botorch

Bayesian optimization in PyTorch
https://botorch.org/
MIT License
3.09k stars 400 forks source link

Implementation of MORBO algorithm #1063

Open RafieeAshkan opened 2 years ago

RafieeAshkan commented 2 years ago

Hi, first of all many thanks for such a great and useful library. I am using Botorch for engineering design optimisation combined with CFD simulations and absolutely loving it. I had two requests which I believe can be very useful to the community:

  1. Any chance of implementing MORBO algorithm (possibly with tutorials on how to set it up). I noted from NeurIPS paper that you are planning to release this as well.
  2. The tutorial for TuRBO and the paper does not take into account constraints. Is it possible to handle constraint optimisation with TuRBO? Many thanks
dme65 commented 2 years ago

Hi @RafieeAshkan,

Thank you for your interest in MORBO and BoTorch!

  1. We are planning on getting this into BoTorch in form of a tutorial similar to TuRBO. The timeline for this isn't totally set yet, but I'll update you when we have a better idea of when this will be ready.
  2. The following paper describes how to extend TuRBO to output constraints: http://proceedings.mlr.press/v130/eriksson21a/eriksson21a.pdf. While our current tutorial doesn't consider constraints, we may consider adding one in the future.
RafieeAshkan commented 2 years ago

@dme65 I look forward to when you added tutorials on MORBO and SCBO. Thank you guys again for such a great and useful package.

RafieeAshkan commented 2 years ago

@dme65 thanks for your earlier comment. I went through the SCBO paper and managed to implement the algorithm, which is really powerful. I am now taking a shot at MORBO, and was wondering in TuRBO for the trust region boundaries part we do:

tr_lb = torch.clamp(x_center - weights * state.length / 2.0, 0.0, 1.0)
tr_ub = torch.clamp(x_center + weights * state.length / 2.0, 0.0, 1.0)

with weights calculated from GP model length scale for the objective weights = model.covar_module.base_kernel.lengthscale.squeeze().detach()

In the case of multi-objectives, are the weights calculated for each objectives and then perhaps get the smallest length value? Any comment would be really helpful.

gugeyao commented 2 years ago

Hi @dme65, I am also very excited about the release of the MORBO tutorial. Do you have any ideas on when this can come out?

Thanks!

dme65 commented 2 years ago

@RafieeAshkan: @nataliemaus recently contributed an SCBO tutorial that you can check out here: https://botorch.org/tutorials/scalable_constrained_bo

@gugeyao: We are working on moving MORBO into BoTorch and will eventually add a tutorial. For now, the code for MORBO is available here: https://github.com/facebookresearch/morbo