setfit icon indicating copy to clipboard operation
setfit copied to clipboard

Redirect __call__ to predict in SetFitModel

Open PhilipMay opened this issue 3 years ago • 0 comments

Hi,

imo because of dry principle this function:

https://github.com/huggingface/setfit/blob/7735e8e3b208edb8dfb549beb16e585453c5f44e/src/setfit/modeling.py#L61-L63

should just redirect to predict. Because of dry principle. Like this:

    def __call__(self, inputs):
        return self.predict(inputs)

I can provide a PR if wanted.

PhilipMay avatar Oct 30 '22 11:10 PhilipMay