Skip to content

Commit

Permalink
test saving of the new AverageLearners
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Mar 6, 2019
1 parent 52397d8 commit 2696f86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions adaptive/tests/test_learners.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ def test_balancing_learner(learner_type, f, learner_kwargs):


@run_with(Learner1D, Learner2D, LearnerND, AverageLearner,
AverageLearner1D, AverageLearner2D,
maybe_skip(SKOptLearner), IntegratorLearner,
with_all_loss_functions=False)
def test_saving(learner_type, f, learner_kwargs):
Expand All @@ -484,6 +485,9 @@ def test_saving(learner_type, f, learner_kwargs):
if learner_type is Learner1D:
learner._recompute_losses_factor = 1
control._recompute_losses_factor = 1
elif learner_type in (AverageLearner1D, AverageLearner2D):
learner.weight = 0.1
control.weight = 0.1
simple(learner, lambda l: l.npoints > 100)
fd, path = tempfile.mkstemp()
try:
Expand Down

0 comments on commit 2696f86

Please sign in to comment.