Skip to content
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

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

jlnav
Copy link
Collaborator

@jlnav jlnav commented May 10, 2024

Depends on upstream libEnsemble branch: experimental/jlnav_plus_shuds_asktell

shuds13 and others added 20 commits April 19, 2024 12:45
…overwriting x with new f values? probably a bug on my end
…lot in points to variably-sized results-array (based on either initial sample, or subsequent points)
self.libe_gen = self.libe_gen_class(
gen_specs, H, persis_info, libE_info
)
elif self.libe_gen_instance is not None:
Copy link
Collaborator

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.

Copy link
Collaborator Author

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]),
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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,
Copy link
Collaborator

@shuds13 shuds13 May 21, 2024

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...

Copy link
Collaborator Author

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.

@AngelFP AngelFP added the enhancement New feature or request label May 25, 2024
@jlnav jlnav requested a review from shuds13 May 28, 2024 20:46
@jlnav jlnav marked this pull request as ready for review May 28, 2024 20:46
exp.run(100)
exp.run(200)
exp.finalize()
assert len(gen.libe_gen.all_local_minima)
Copy link
Collaborator

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.

@jlnav jlnav requested a review from shuds13 June 10, 2024 13:22
Comment on lines +71 to +72
lb=np.array([var_1.lower_bound, var_2.lower_bound]),
ub=np.array([var_1.upper_bound, var_2.upper_bound]),
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants