Skip to content

Commit e6d5051

Browse files
committed
2D: add bounds back to the stack if the runner failed
This bug manifested when the function failed after starting the runner. For example the function is calling a function that is not defined on the engines will lead to a NameError, then after importing that on the engines, you wouldn't be able to start the runner again, because the learner would be in a bad state. This commit fixes that issue.
1 parent b807844 commit e6d5051

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

adaptive/learner/learner2D.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ def loss(self, real=True):
368368

369369
def remove_unfinished(self):
370370
self._interp = set()
371+
for p in self._bounds_points:
372+
if p not in self.data:
373+
self._stack[p] = np.inf
371374

372375
def plot(self, n=None, tri_alpha=0):
373376
hv = ensure_holoviews()

0 commit comments

Comments
 (0)