huggingface / setfit

Efficient few-shot learning with Sentence Transformers
https://hf.co/docs/setfit
Apache License 2.0
2.24k stars 223 forks source link

Fix SetFitModel: not a dataclass, not a PyTorchModelHubMixin #505

Closed Wauplin closed 2 months ago

Wauplin commented 8 months ago

Related to discussion triggered by https://github.com/huggingface/huggingface_hub/issues/2157 (also internal slack).

SetFitModel class is currently a dataclass which doesn't seem necessary and can have weird side-effect (especially with ModelHubMixin). This PR:

cc @lewtun @tomaarsen @LysandreJik changes should work correctly but I haven't tested them extensively (especially the SpanSetFitModel subclass). Please let me know if you think of any oversight/other things to change.

HuggingFaceDocBuilderDev commented 8 months ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

tomaarsen commented 2 months ago

Hello!

Apologies for the delay! I've merged these changes into main and resolved the remaining outstanding issues as well. I expect this'll all be included in a release quite soon (this week?). Thanks a bunch for making this PR!