BayesianOptimization icon indicating copy to clipboard operation
BayesianOptimization copied to clipboard

Parallel evaluations

Open samyip123 opened this issue 4 years ago • 4 comments

Referencing issue #138, i tried to implement the code mentioned in concurrent.futures and ran into trouble with the code not completing , may i ask if it is possible to implement on concurrent.futures instead of asyncio as referenced by async bayesian optimization example

class hyper_class():

    def __init__(self):
        self.result = None
        self.point = None

    def step(self, input):
       optimizer = input[0]
       model = input[1]
        if self.result is not None:
            optimizer.register(self.point, self.result)
        self.point = optimizer.suggest(utility)
        self.result = model(self.point)

        return None

with concurrent.futures.ProcessPoolExecutor() as executor:
    for _ in range(16):
       executor.submit(hyper_class().step, [optimizer, model])

samyip123 avatar Mar 06 '20 21:03 samyip123

Unfortunately I don't currently have the bandwidth to do it, but PRs are more than welcome.

fmfn avatar May 01 '20 15:05 fmfn

+1 request this

yinrong avatar Jun 15 '22 03:06 yinrong

Is this something that is still being worked on or may I take a stab at this? I'm familiar with Dask and learning Ray now so it could be something to look into? Was also looking into the #381 issue as well.

mrsmee4924 avatar Apr 26 '24 01:04 mrsmee4924

Hey @mrsmee4924,

parallelizing BO is non-trivial as it's generally a sequential algorithm. Before looking into a specific technical implementation, we would need to figure out how to parallelize the suggestion step in a meaningful way. There are related discussions/implementations for this already (#347, #365, #447). Though I think this is probably not the optimal approach (GPyOpt, for example, seems to use this method which might work better.

All in all, I think some literature review is needed here, before we move forward. Would you be interested in taking this on, too?

till-m avatar Apr 27 '24 08:04 till-m