-
Notifications
You must be signed in to change notification settings - Fork 18
[WIP] Attempt to make optimas generators compatible with generator standard
#228
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
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:
optimasgenerators currently call theaskandtellmethods, which, under the hood, can the_askand_tellmethods.In this PR:
ask/tellare renamed toask_trials/tell_trialsand keep the same interface (for compatibility with the rest of the framework)_ask/_tellare renamed toask/telland adopt the new standardized interface.This allows other packages to use the
optimasgenerators. (In this case, these other packages will call the new, standardizedask/telldirectly, 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_trialsandtell_trials.