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

Experimental/jlnav plus shuds asktell #1307

Open
wants to merge 308 commits into
base: develop
Choose a base branch
from

Conversation

jlnav
Copy link
Member

@jlnav jlnav commented May 9, 2024

See checklist in #1307 (review)

jlnav and others added 30 commits March 1, 2024 10:20
…erator, asks receive num_points (which defaults to n idle sim workers). batch_size and initial_batch_size attributes of a Generator subclass are also honored
… manager/worker to initialize itself, more adjustments
…oop temp var overwriting import, bump number of "sims"
self._n_total_results += len(results)

if not self._told_initial_sample and self._enough_initial_sample:
self._tell_buf = self._tell_buf[self._tell_buf["sim_id"] != 0]
Copy link
Member

Choose a reason for hiding this comment

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

Why getting rid of sim_id 0?

…in initial_sample_size check, initing/fixing sim_ids to be -1, and can specify nworkers as kwarg to aposmm class
…n optimas when roughly enough initial sample points have been slotted in
… the last ask, another important indicator is that the last point produced has been returned to the gen. this gets us past the initial sample now, but now aposmm seems to return empty arrays?
)
else:
self.inbox.put((tag, None))
self.inbox.put((0, np.copy(results)))
Copy link
Member

Choose a reason for hiding this comment

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

I'll note some of these copies are presumably not needed if using a process. Its convenient for keeping it easy to swap between process and thread. But that could also be dealt with by using a function.

self._told_initial_sample = False

def _slot_in_data(self, results):
"""Slot in libE_calc_in and trial data into corresponding array fields. *Initial sample only!!*"""
Copy link
Member

Choose a reason for hiding this comment

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

this is what you want:
self._tell_buf[self._n_buffd_results:self._n_buffd_results + len(results)] = results

libensemble/generators.py Outdated Show resolved Hide resolved

H, persis_info, _ = workflow.run()

# Perform the run
Copy link
Member

Choose a reason for hiding this comment

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

Move comment up?

jlnav and others added 8 commits November 14, 2024 08:46
* Use QComm in QCommProcess for comms
* Remove thread locked comm in executor
* Add conditional code for executor forwarding
* Remove extra setup() call
* Use correct outbox queue
Swap "sim_id" with "_id" when data leaves gen and vice-versa. For ask/tell standard
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