Ax icon indicating copy to clipboard operation
Ax copied to clipboard

How to set the batch_size and replace the acquisition function with qUCB for ALEBO?

Open gloaming2dawn opened this issue 3 years ago • 2 comments

Hi, I want to know how to change the default settings of ALEBO? Especially, I want to change the batch_size from 1 to 10, and change the acquisition function from EI to qUCB.

gloaming2dawn avatar May 07 '22 00:05 gloaming2dawn

Also, I found ALEBO is not supported by the current version of botorch. Errors are shown as follows

File "/home/jiayu/anaconda3/envs/mlbo/lib/python3.9/site-packages/ax/models/torch/alebo.py", line 526, in alebo_acqf_optimizer candidate, acq_value = optimize_acqf( File "/home/jiayu/anaconda3/envs/mlbo/lib/python3.9/site-packages/botorch/optim/optimize.py", line 128, in optimize_acqf if not (bounds.ndim == 2 and bounds.shape[0] == 2): AttributeError: 'list' object has no attribute 'ndim'

gloaming2dawn avatar May 07 '22 02:05 gloaming2dawn

Hi, I want to know how to change the default settings of ALEBO? Especially, I want to change the batch_size from 1 to 10, and change the acquisition function from EI to qUCB.

Looks like in the current setup this isn't straightforwardly possible. The acquisition funciton is constructor is being passed here: https://github.com/facebook/Ax/blob/main/ax/models/torch/alebo.py#L581; essentially to use ucb or sth else you'd have to (i) define a constructor conforming to the same API as ei_or_nei that constructs the acquisition function, and then (ii) add that as an arg to the model constructor and then pass that to the super.__init__() call. Happy to accept a PR for this :)

Also, I found ALEBO is not supported by the current version of botorch. Errors are shown as follows

Looks like the validation introduced in https://github.com/pytorch/botorch/pull/1142 breaks things since the alebo code daringly passes a list of None. I put up a patch for this: #954

Balandat avatar May 07 '22 18:05 Balandat

The PR-in-question above is committed, but changing settings of ALEBO is still non-trivial. Putting fixing that on our wishlist.

lena-kashtelyan avatar Sep 13 '22 17:09 lena-kashtelyan