-
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
feature/libe_gen_wrapper + Feature/asktell aposmm #209
Conversation
for more information, see https://pre-commit.ci
… feature/asktell_aposmm
…etup to start the thread
for more information, see https://pre-commit.ci
…overwriting x with new f values? probably a bug on my end
…g results_array to be empty
…imas into feature/asktell_aposmm
for more information, see https://pre-commit.ci
…imas into feature/asktell_aposmm
for more information, see https://pre-commit.ci
…lot in points to variably-sized results-array (based on either initial sample, or subsequent points)
for more information, see https://pre-commit.ci
optimas/generators/libE_wrapper.py
Outdated
self.libe_gen = self.libe_gen_class( | ||
gen_specs, H, persis_info, libE_info | ||
) | ||
elif self.libe_gen_instance is not None: |
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 don't see how libe_gen_instance is different from libe_gen. Seems redundant.
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.
It may be. I can do a bunch of refactoring now that we have this working
dist_to_bound_multiple=0.5, | ||
max_active_runs=4, # refers to APOSMM's simul local optimization runs | ||
lb=np.array([-3, -2]), # potentially matches the VaryingParameters | ||
ub=np.array([3, 2]), |
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.
lb/ub duplicated from VaryingParameter. Not sure best approach, but for now we could define these first and use in both places.
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.
Yup! Perhaps our generator_standard work may help this avenue.
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.
Insert same source-of-truth values into VaryingParameters and ub and lb
gen = libEWrapper( | ||
varying_parameters=[var_1, var_2], | ||
objectives=[obj], | ||
libe_gen_instance=aposmm, |
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.
How different to libe_gen. This can be set up so if a class is provided it initializes in place.
e.g.,
if inspect.isclass(libe_gen):
initialize...
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.
That's true, for rough-development I was being explicit on what type of object we passed, but we can afford to be smarter now. Pass in something initialized, keep as-is, if its not initialized, initialize it.
I'll take a second look, but I don't think I came across a pure-optimas example that did object-initialization within the library instead of exposed to the user.
… cleanup, better handling of non-existance of final_tell
for more information, see https://pre-commit.ci
…imas into feature/asktell_aposmm
for more information, see https://pre-commit.ci
…hod. Remove now-unneeded gen reference from wrapper, since serialization issues for live-gen. *But*, the reference stays alive in libE
…imas into feature/asktell_aposmm
for more information, see https://pre-commit.ci
…l TrialParameters, plus all aposmm-specific array quirks.
for more information, see https://pre-commit.ci
exp.run(100) | ||
exp.run(200) | ||
exp.finalize() | ||
assert len(gen.libe_gen.all_local_minima) |
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.
Do we want to check the minima have the expected values.
…itional docs for Exploration.finalize()
for more information, see https://pre-commit.ci
lb=np.array([var_1.lower_bound, var_2.lower_bound]), | ||
ub=np.array([var_1.upper_bound, var_2.upper_bound]), |
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.
Could we replace this with:
variables = {'x0':[-3.0, 3.0], 'x1':[-2.0, 2.0]},
objectives = {'f': 'MINIMIZE'}
as discussed here: campa-consortium/generator_standard#16
Depends on upstream libEnsemble branch: experimental/jlnav_plus_shuds_asktell