nnaisense / evotorch

Advanced evolutionary computation library built directly on top of PyTorch, created at NNAISENSE.
https://evotorch.ai
Apache License 2.0
997 stars 62 forks source link

The order of sample and update #82

Open haohaomiao opened 1 year ago

haohaomiao commented 1 year ago

I have observed that in the current evotorch, it seems that it is only possible to sample first and then update, which may be inconvenient for certain use cases. For example, I am applying the CMA algorithm to a black-box optimization problem. In this problem, obtaining the fitness of a batch of solutions may take some time, so I would like the interface to be able to complete one step in the order of "obtain fitness -> update parameters -> resample". However, the current _step function does not support such idea. I wonder if there could be any improvements in this regard?