(self)
return state
Skip (possibly large) data when pickling models
Skip (possibly large) data when pickling models
Skip ( possibly large ) data when pickling models
def __getstate__(self):
        """Skip (possibly large) data when pickling models"""
        state = self.__dict__
        if 'original_data' in state:
            state = state.copy()
            state['original_data'] = None
        return state
def __getstate__ ( self ) : state = self . __dict__ if 'original_data' in state : state = state . copy ( ) state [ 'original_data' ] = None return state