-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Running this code
vocs = VOCS(
variables={
"x0": [-2.0,2.0],
"x1": [-1.0,1.0],
"x0_on_cube": [0.0,1.0],
"x1_on_cube": [0.0,1.0],
},
objectives={"f": "MINIMIZE"},
)
variables_mapping = {
"x": ["x0", "x1"],
"x_on_cube": ["x0_on_cube", "x1_on_cube"],
}
max_active_runs = 1
initial_sample_size = 20
gen = APOSMM(vocs=vocs, max_active_runs=max_active_runs, initial_sample_size=initial_sample_size, variables_mapping=variables_mapping)
X = Xopt(vocs=vocs, evaluator=evaluator, generator=gen)
X.step()
for i in range(30):
print(i)
X.step()
runs into a CommFinishedException error when attempting to generate a point
---------------------------------------------------------------------------
CommFinishedException Traceback (most recent call last)
Cell In[16], line 26
24 for i in range(30):
25 print(i)
---> 26 X.step()
File ~\Documents\GitHub\Xopt\xopt\base.py:254, in Xopt.step(self)
252 # generate samples and submit to evaluator
253 logger.debug(f"Generating {n_generate} candidates")
--> 254 new_samples = self.generator.suggest(n_generate)
256 if new_samples is not None:
257 # Evaluate data
258 self.evaluate_data(new_samples)
File ~\Documents\GitHub\libensemble\libensemble\generators.py:110, in LibensembleGenerator.suggest(self, num_points)
107 def suggest(self, num_points: Optional[int] = 0) -> List[dict]:
108 """Request the next set of points to evaluate."""
109 return LibensembleGenerator.convert_np_types(
--> 110 np_to_list_dicts(self.suggest_numpy(num_points), mapping=self.variables_mapping)
111 )
File ~\Documents\GitHub\libensemble\libensemble\gen_classes\aposmm.py:188, in APOSMM.suggest_numpy(self, num_points)
186 if self._ready_to_suggest_genf():
187 self._suggest_idx = 0
--> 188 self._last_suggest = super().suggest_numpy(num_points)
190 if self._last_suggest["local_min"].any(): # filter out local minima rows
191 min_idxs = self._last_suggest["local_min"]
File ~\Documents\GitHub\libensemble\libensemble\generators.py:188, in PersistentGenInterfacer.suggest_numpy(self, num_points)
186 self.setup()
187 self.running_gen_f.run()
--> 188 _, suggest_full = self.running_gen_f.recv()
189 return suggest_full["calc_out"]
File ~\Documents\GitHub\libensemble\libensemble\comms\comms.py:184, in QCommLocal.recv(self, timeout)
182 msg = self.outbox.get(timeout=timeout)
183 if self._is_result_msg(msg):
--> 184 raise CommFinishedException()
185 return msg
186 except thread_queue.Empty:
CommFinishedException:
Metadata
Metadata
Assignees
Labels
No labels