def __repr__(self): preprocessors = self.preprocessors # TODO: Implement __eq__ on preprocessors to avoid comparing reprs if repr(preprocessors) == repr(list(self.__class__.preprocessors)): # If they are default, set to None temporarily to avoid printing preprocessors = None with patch.object(self, 'preprocessors', preprocessors): return super().__repr__()
def __repr__(self): # In addition to saving values onto self, SklLearners save into params with patch.object(self, '__dict__', dict(self.__dict__, **self.params)): return super().__repr__()