-
Notifications
You must be signed in to change notification settings - Fork 15
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
[WIP] Attempt to make optimas
generators compatible with generator standard
#228
Conversation
d1b7721
to
522dd9c
Compare
9f08392
to
2445546
Compare
bea343a
to
0487226
Compare
Looking at this, I think this approach is good. Our current interfacer in Optimas branch #209 used _ask and _tell as we did not want to do the work with Optimas data structures. Now you have moved that outside to ask_trials / tell_trials so this essentially is the same sort of wrapping but instead of ask - > _ask it is ask_trials -> ask. And the ask can use our gens. Just need to work out the line to initialize the generator, as you don't have the libE data structures. We can first try uniform sample, then gpCAM, and then APOSMM via this new interface. |
optimas/generators/base.py
Outdated
**trial.parameters_as_dict(), | ||
**trial.analyzed_parameters_as_dict(), | ||
**trial.objectives_as_dict(), | ||
} |
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.
We need to also pass the id
here.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Superseeded by #249 |
Overall approach:
optimas
generators currently call theask
andtell
methods, which, under the hood, can the_ask
and_tell
methods.In this PR:
ask
/tell
are renamed toask_trials
/tell_trials
and keep the same interface (for compatibility with the rest of the framework)_ask
/_tell
are renamed toask
/tell
and adopt the new standardized interface.This allows other packages to use the
optimas
generators. (In this case, these other packages will call the new, standardizedask
/tell
directly, without going throughask_trials
/tell_trials
.)In order to wrap a standardized generator from another package, one would only need to make a thin wrapper around it that defines
ask_trials
andtell_trials
.