-
Notifications
You must be signed in to change notification settings - Fork 27
Feature/better h0 support #537
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
|
||
for i in avail_worker_ids(W): | ||
# Give sim work | ||
sim_work(Work, i, sim_specs['in'], [persis_info['next_to_give']], []) |
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.
Should it check 'given' for the row its on - and increment if True?
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.
Yes. That is possible. This allocation function is called give_pregenerated_sample
so I think that it's okay to just go through all of the rows of H
in order. (But I'm fine with checking given
.)
Note that the top of this allocation function is not very robust: If there is persis_info
then next_to_give
will not be initialized. I hope that such issues will be addressed in our re-working of allocation functions.
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.
Should it just be checking the 'next_to_give' component is initialized? Something like:
persis_info['next_to_give'] = persis_info.get('next_to_give', 0) + 1
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.
The initialization is fixed in 8080b1b
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.
Looks good!
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.
Thank you for the feedback!
Pull Request Test Coverage Report for Build 4237
💛 - Coveralls |
Before
H0
was assumed to contain only points withgiven
andreturned
asTrue
.A way to do simulation evaluations at some pre-existing set of points is to put them into
H0
and have analloc_f
give them out (without needed agen_f
call).In this regression test, libEnsemble was marking them as
given
andreturned
but thealloc_f
was giving them out anyway (so the test was performing correctly).