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 bug where SetFitHead not moved to non-cuda devices on init #518

Closed ajmssc closed 2 months ago

ajmssc commented 6 months ago

On my M2 macbook the SetFitHead is not moved to mps on init. This is because of a typo in the ternary operation to determine the GPU.

ajmssc commented 6 months ago

@tomaarsen

osanseviero commented 6 months ago

cc @pcuenca as well

ajmssc commented 6 months ago

@pcuenca you're gonna have to do the merging because I don't have that option

pcuenca commented 6 months ago

@ajmssc I know! I wanted to wait a few hours in case @tomaarsen wanted to comment, merging now :)

lol, actually I can't do it either (or run the workflow), so let's wait for a maintainer.

HuggingFaceDocBuilderDev commented 6 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.

ajmssc commented 5 months ago

@tomaarsen @pcuenca what do you want to do with this PR?

tomaarsen commented 2 months ago

Hello!

Big apologies for the long delay - I should have gotten to this PR much sooner. Well spotted, and the fix looks solid as well. I'll merge it in a minute & include it in an upcoming release.