-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make batch_limit
and maxiter
configurable
#380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Johannes. Just a few minor comments.
type: Literal["qPI"] = "qPI" | ||
tau: PositiveFloat = 1e-3 | ||
|
||
|
||
class qEHVI(MultiObjectiveAcquisitionFunction): | ||
class qEHVI(MultiObjectiveAcquisitionFunction, MCAcquisitionFunction): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add a parameter via inheritance? I would just put the parameter there. As in the case of alpha
. If you really want to gather the MCAcquisitionFunction
parameters somehow because you expect to add more parameters to MCAcquisitionFunction
in the near future, at least do it via aggregation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why not adding the param via inheritance? And what do you mean by aggregation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally think we should keep the code as simple as possible. Currently, I think, it is hard to read. You look at the data model and want to see the parameters. But there are none. I very often have a hard time to find the class that actually implements the functionality I am looking for in BoFire due to its deep inheritance hierarchy. Ok, readability is subjective.
With aggregation I meant composition. I would only use inheritance if I want to make use of polymorphism but not just to save some characters. I consider it good practice in object oriented programming to favor composition over inheritance. https://en.wikipedia.org/wiki/Composition_over_inheritance
Btw. I really like this talk 😁
https://learn.microsoft.com/en-us/shows/goingnative-2013/inheritance-base-class-of-evil (careful, it is C++)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I prefer the inheritance :D
But I will change it and add it as attribute to every class.
Best,
Johannes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I prefer the inheritance :D
I know 😉
This PR implements the following:
batch_limit
andmaxiter
which are optimizer hyperparams forbotorch
based strategies configurable in the data modelnum_sobol_samples
from the strategy data model to acqusition function data model as it is a parameter of the acqf.