experimental-design / bofire

Experimental design and (multi-objective) bayesian optimization.
https://experimental-design.github.io/bofire/
BSD 3-Clause "New" or "Revised" License
222 stars 23 forks source link

mapping happens outside of runner #296

Closed bertiqwerty closed 1 year ago

bertiqwerty commented 1 year ago

Otherwise, strategies implemented outside of BoFire cannot use the runner to be evaluated and crappy strategies will become part of BoFire since they could not be evaluated beforehand 😉

jduerholt commented 1 year ago

@bertiqwerty: I will have a look over the course of the week (hopefully tmr). Thanks for the PR.

bertiqwerty commented 1 year ago

It looks good to me, I find it less elegant than the original version, as more code is needed for the user for standard tasks (before it was possible to just give the data model class as this was also a valid factory) but now it is more versatile. I think there is still a notebook in which it is not yet corrected.

Thanks @jduerholt. I think, I fixed them all and I got rid of some type-ignores 🥳. About the less-elegant-thing, I tend to disagree. I'd say it is less convenient. But it is more consistent with the way Bofire-users instantiate strategies. Further, you can now use it with strategies implemented outside of Bofire, e.g., during early experimentation or if you have a project-specific edge-case. These strategies could still inherit from Strategy. However, these outside-strategies are not registered in the mapper.