From 29aea6965b23f061ad264b5607856fd3caee3fe0 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Wed, 15 Apr 2020 23:07:41 +0200 Subject: [PATCH] do not initialize child-learners twice in DataSaver --- adaptive/learner/data_saver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adaptive/learner/data_saver.py b/adaptive/learner/data_saver.py index 3b2561057..c824e8ac2 100644 --- a/adaptive/learner/data_saver.py +++ b/adaptive/learner/data_saver.py @@ -55,13 +55,13 @@ def __getstate__(self): return ( self.learner, self.arg_picker, - self._get_data(), + self.extra_data, ) def __setstate__(self, state): - learner, arg_picker, data = state + learner, arg_picker, extra_data = state self.__init__(learner, arg_picker) - self._set_data(data) + self.extra_data = extra_data @copy_docstring_from(BaseLearner.save) def save(self, fname, compress=True):