Skip to content

Commit

Permalink
add 'pending_points' to the 'SKOptLearner'
Browse files Browse the repository at this point in the history
This was the only learner that didn't have this attribute.
  • Loading branch information
basnijholt committed Oct 12, 2018
1 parent c65c10c commit 81ce7f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adaptive/learner/skopt_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ class SKOptLearner(Optimizer, BaseLearner):

def __init__(self, function, **kwargs):
self.function = function
self.pending_points = set()
super().__init__(**kwargs)

def tell(self, x, y, fit=True):
def tell(self, x, y, fit=True):
self.pending_points.dicard(x)
super().tell([x], y, fit)

def tell_pending(self, x):
# 'skopt.Optimizer' takes care of points we
# have not got results for.
pass
self.pending_points.add(x)

def remove_unfinished(self):
pass
Expand Down

0 comments on commit 81ce7f1

Please sign in to comment.