From 682daa81340ebd658f8af483c476d2ced8200dd2 Mon Sep 17 00:00:00 2001 From: jlnav <jnavarro@anl.gov> Date: Tue, 12 Nov 2024 08:43:06 -0600 Subject: [PATCH 1/2] rename a handful of asktell tests to have a test_asktell prefix --- .flake8 | 1 + .../{test_sampling_asktell_gen.py => test_asktell_sampling.py} | 0 ...tent_aposmm_nlopt_asktell.py => test_asktell_aposmm_nlopt.py} | 0 .../{test_gpCAM_class.py => test_asktell_gpCAM.py} | 0 ...mise_killsims_asktell.py => test_asktell_surmise_killsims.py} | 0 5 files changed, 1 insertion(+) rename libensemble/tests/functionality_tests/{test_sampling_asktell_gen.py => test_asktell_sampling.py} (100%) rename libensemble/tests/regression_tests/{test_persistent_aposmm_nlopt_asktell.py => test_asktell_aposmm_nlopt.py} (100%) rename libensemble/tests/regression_tests/{test_gpCAM_class.py => test_asktell_gpCAM.py} (100%) rename libensemble/tests/regression_tests/{test_persistent_surmise_killsims_asktell.py => test_asktell_surmise_killsims.py} (100%) diff --git a/.flake8 b/.flake8 index d49bc0d3b..c21368b65 100644 --- a/.flake8 +++ b/.flake8 @@ -40,6 +40,7 @@ per-file-ignores = libensemble/tests/scaling_tests/warpx/run_libensemble_on_warpx.py:E402 examples/calling_scripts/run_libensemble_on_warpx.py:E402 libensemble/tests/regression_tests/test_persistent_aposmm*:E402 + libensemble/tests/regression_tests/test_asktell_aposmm_nlopt.py:E402 libensemble/tests/regression_tests/test_persistent_gp_multitask_ax.py:E402 libensemble/tests/functionality_tests/test_uniform_sampling_then_persistent_localopt_runs.py:E402 libensemble/tests/functionality_tests/test_stats_output.py:E402 diff --git a/libensemble/tests/functionality_tests/test_sampling_asktell_gen.py b/libensemble/tests/functionality_tests/test_asktell_sampling.py similarity index 100% rename from libensemble/tests/functionality_tests/test_sampling_asktell_gen.py rename to libensemble/tests/functionality_tests/test_asktell_sampling.py diff --git a/libensemble/tests/regression_tests/test_persistent_aposmm_nlopt_asktell.py b/libensemble/tests/regression_tests/test_asktell_aposmm_nlopt.py similarity index 100% rename from libensemble/tests/regression_tests/test_persistent_aposmm_nlopt_asktell.py rename to libensemble/tests/regression_tests/test_asktell_aposmm_nlopt.py diff --git a/libensemble/tests/regression_tests/test_gpCAM_class.py b/libensemble/tests/regression_tests/test_asktell_gpCAM.py similarity index 100% rename from libensemble/tests/regression_tests/test_gpCAM_class.py rename to libensemble/tests/regression_tests/test_asktell_gpCAM.py diff --git a/libensemble/tests/regression_tests/test_persistent_surmise_killsims_asktell.py b/libensemble/tests/regression_tests/test_asktell_surmise_killsims.py similarity index 100% rename from libensemble/tests/regression_tests/test_persistent_surmise_killsims_asktell.py rename to libensemble/tests/regression_tests/test_asktell_surmise_killsims.py From 09ebdbc4404d4dd31e87e53d152820908d283886 Mon Sep 17 00:00:00 2001 From: jlnav <jnavarro@anl.gov> Date: Tue, 12 Nov 2024 09:49:30 -0600 Subject: [PATCH 2/2] remove redundant .setup calls that also cause hangs --- .../tests/unit_tests/RENAME_test_persistent_aposmm.py | 1 - libensemble/utils/runners.py | 5 ----- 2 files changed, 6 deletions(-) diff --git a/libensemble/tests/unit_tests/RENAME_test_persistent_aposmm.py b/libensemble/tests/unit_tests/RENAME_test_persistent_aposmm.py index 9bc097a18..f1959e789 100644 --- a/libensemble/tests/unit_tests/RENAME_test_persistent_aposmm.py +++ b/libensemble/tests/unit_tests/RENAME_test_persistent_aposmm.py @@ -204,7 +204,6 @@ def test_asktell_with_persistent_aposmm(): } my_APOSMM = APOSMM(gen_specs=gen_specs) - my_APOSMM.setup() initial_sample = my_APOSMM.ask(100) total_evals = 0 diff --git a/libensemble/utils/runners.py b/libensemble/utils/runners.py index 08d52a27e..5a11f7e09 100644 --- a/libensemble/utils/runners.py +++ b/libensemble/utils/runners.py @@ -136,11 +136,6 @@ def _start_generator_loop(self, tag, Work, H_in): def _persistent_result(self, calc_in, persis_info, libE_info): """Setup comms with manager, setup gen, loop gen to completion, return gen's results""" self.ps = PersistentSupport(libE_info, EVAL_GEN_TAG) - if hasattr(self.gen, "setup"): - self.gen.persis_info = persis_info # passthrough, setup() uses the gen attributes - self.gen.libE_info = libE_info - if self.gen.thread is None: - self.gen.setup() # maybe we're reusing a live gen from a previous run # libE gens will hit the following line, but list_dicts_to_np will passthrough if the output is a numpy array H_out = list_dicts_to_np(self._get_initial_ask(libE_info), dtype=self.specs.get("out")) tag, Work, H_in = self.ps.send_recv(H_out) # evaluate the initial sample