Skip to content

Conversation

jmlarson1
Copy link
Member

Before H0 was assumed to contain only points with given and returned as True.

A way to do simulation evaluations at some pre-existing set of points is to put them into H0 and have an alloc_f give them out (without needed a gen_f call).

In this regression test, libEnsemble was marking them as given and returned but the alloc_f was giving them out anyway (so the test was performing correctly).

@jmlarson1 jmlarson1 requested a review from shuds13 October 27, 2020 21:05

for i in avail_worker_ids(W):
# Give sim work
sim_work(Work, i, sim_specs['in'], [persis_info['next_to_give']], [])
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member Author

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!

@coveralls
Copy link
Collaborator

coveralls commented Oct 28, 2020

Pull Request Test Coverage Report for Build 4237

  • 18 of 18 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 96.109%

Totals Coverage Status
Change from base Build 4216: 0.01%
Covered Lines: 4761
Relevant Lines: 4907

💛 - Coveralls

@jmlarson1 jmlarson1 merged commit a2042da into develop Oct 29, 2020
@jmlarson1 jmlarson1 deleted the feature/better_H0_support branch October 29, 2020 13:23
@shuds13 shuds13 mentioned this pull request Apr 13, 2021
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants