You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor/user function handling modules + Manager can run additional worker on thread (#1216)
** Commit Highlights: **
* first round of refactoring runners.py, Runner base class for normal in-place launches, but based on the contents of passed-in specs, instantiates the relevant subclass
* ThreadRunner uses comms.QCommThread, slightly modified, to launch its user function. corresponding unit test
* removing now-redundant content from manager, trying to see if we can start a temporary, local Worker for handling work
* use _Worker class to correctly index into W and wcomms. add initial option to libE_specs
* add "threaded" tentative option to sim/gen_specs
* fix ThreadRunner shutdown when that worker didn't launch a thread
* adjust alloc_support to not use w - 1 indexing
* add tentative gen_on_manager option, separate additional_worker_launch into function
* move _WorkerIndexer into libensemble.utils, also use within PersistentSupport
* manager also needs to send workflow_dir location to worker 0
* simply gen_workers parameter description for avail_worker_ids
* filter for gen_workers within avail_worker_ids, if set and there are gen_workers. solution resembles zrw, like shuds predicted all along!
* refactor give_sim_work_first for running on gen_workers if no points_to_evaluate. add test for mixed existing sample plus calling a gen
* it turns out that values set by validators are still considered "unset". So for updating purposes for libE_specs, we want to exclude fields that are still set to their defaults
* platform_specs sometimes seems to be at risk of disappearing when we convert LibeSpecs to dict, so lets save it and reinsert
* add libE_specs["gen_workers"] option, adjust ensure_one_active_gen so multiple gen work orders aren't given out at once
** Major features: **
* runners.py refactored to more easily develop additional methods to submit/run user functions
* User functions can be launched by workers on separate threads alternatively to calling in-place.
* Generator can be launched on the Manager - various refactors to make this possible
* gen_workers option to specify workers that should run generators only
* Various bugfixes and refactors of allocation functions
---------
Co-authored-by: shudson <[email protected]>
Co-authored-by: Jeffrey Larson <[email protected]>
0 commit comments