-
Notifications
You must be signed in to change notification settings - Fork 26
Asktell/variables objectives #1448
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
Asktell/variables objectives #1448
Conversation
…tandard-variables
… lb and gen_specs.out
…ith aposmm in unit test
…iables_objectives
…end objective keys to the internal dtype
…ss; setting up unit test to eventually map user-specififed variables into internal xs
… fs need to be figured out reasonably, somehow, still
…on't want to convert. fix key-that-starts-with-variable condition, plus append the distinguishing integer
…, since variables/objectives probably wont be passed in. remove exact H-entry test, since the gen does its own internal persis_info
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## experimental/jlnav_plus_shuds_asktell #1448 +/- ##
=========================================================================
- Coverage 78.90% 78.60% -0.30%
=========================================================================
Files 81 80 -1
Lines 8077 8054 -23
Branches 1200 1205 +5
=========================================================================
- Hits 6373 6331 -42
- Misses 1499 1510 +11
- Partials 205 213 +8 ☔ View full report in Codecov by Sentry. |
…f-concepts from before we became dedicated to ask/tell, plus currently it's gen_out is rather "largely dimensioned" for defining via variables/objectives
…iables_objectives
…ut into list_dicts_to_np now, to unpack the opposite direction
…ict->np converters
…iables_objectives
Dramatically simplified by the user providing a mapping: variables = {"core": [-3, 3], "edge": [-2, 2]}
objectives = {"energy": "EXPLORE"}
mapping = {"x": ["core", "edge"]}
gen = UniformSample(variables, objectives, mapping) and: variables = {"core": [-3, 3], "edge": [-2, 2]}
objectives = {"energy": "MINIMIZE"}
variables_mapping = {"x": ["core", "edge"], "f": ["energy"]}
my_APOSMM = APOSMM(
variables=variables, objectives=objectives, gen_specs=gen_specs, variables_mapping=variables_mapping
) Output dictionaries contain the variables, the objective value can be the key in This is much simpler than my previous attempt at figuring this out dynamically! |
|
||
self.n = len(self.variables) | ||
# build our own lb and ub | ||
if "lb" not in kwargs and "ub" not in kwargs: |
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.
Have you tested if these are in kargs?
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.
If I forget to comment out my lb/ub line I get:
...persistent_aposmm.py", line 326, in update_local_H_after_receiving
local_H[name][Work["libE_info"]["H_rows"]] = calc_in[name]
ValueError: shape mismatch: value array of shape (4,6) could not be broadcast to indexing result of shape (4,3)
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 was with our branches merged.
With your branch merged into mine the APOSMM run completes, but I dont have any local optimisation runs happening. I ran with:
|
Also tried with this, though I think this is the default right.
|
…iables_objectives
…iables_objectives
…iables_objectives
…iables_objectives
…iables_objectives
Introducing specifying
variables
andobjectives
to ask/tell generators, This basically supersedes specifying gen_specs.in or gen_specs.out from the user's perspective.For many of our gens, specify a mapping of variables and objectives to "x" and "f":
variables_mapping = {"x": ["core", "edge"], "f": ["energy"]}