Skip to content

Commit

Permalink
do not initialize child-learners twice in DataSaver
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Apr 23, 2020
1 parent 5308939 commit 29aea69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adaptive/learner/data_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 29aea69

Please sign in to comment.