PKU-DAIR / open-box

Generalized and Efficient Blackbox Optimization System
https://open-box.readthedocs.io
Other
356 stars 52 forks source link

Need more examples of "ask and tell mode" in the Example docs #60

Closed jiang13021 closed 4 months ago

jiang13021 commented 1 year ago

I like ask and tell mode(using Advisor & Observation), but there is very little introduction in the doc. I have to read the source code instead of just reading the doc.

Hope you guys can give more examples of ask and tell mode in the Example docs

By the way, is there any difference in performance between these two methods? Is Advisor & Observation slower than Optimizer?

jhj0411jhj commented 1 year ago

Thanks for your issue. We provide an example of code for ask and tell interface in the examples/ in our repo. Adding this example into Example docs is on the plan.

Most parameters in Advisor are the same as those in Optimizer, so you can also refer to the description in Optimizer. We will continuously improve our documentations.

For your last question, there is no difference in performance between the two methods. The Optimizer provides an encapsulation of the whole optimization process, while the Advisor is a part of Optimizer. In Optimizer.run(), the optimizer will get suggestion from advisor, run the objective function, and update observation to advisor iteratively. When using the Advisor & Observation interface, users need to run the objective function themselves.