Skip to content

Commit

Permalink
Prevent logger from being pickled
Browse files Browse the repository at this point in the history
  • Loading branch information
chkoar committed Jul 4, 2016
1 parent 388c202 commit 142077d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions imblearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,9 @@ def _sample(self, X, y):
The corresponding label of `X_resampled`
"""
pass

def __getstate__(self):
"""Prevent logger from being pickled"""
object_dictionary = dict(self.__dict__)
del object_dictionary['logger']
return object_dictionary

0 comments on commit 142077d

Please sign in to comment.