The warning is "SentenceTransformer._target_device has been removed, please use SentenceTransformer.device instead.`", so it should be an easy fix.
I did note the part:
# SentenceTransformers.device is reliable from 2.3.0 onwards
if parse(sentence_transformers_version) >= Version("2.3.0"):
return self.model_body.device
Maybe I have a mismatch of versions of SetFit and Sentence-Transformers cause I see a ton of warnings from ST.
I'm using setfit==1.0.1 and sentence-transformers==2.3.1, so the above should have used device instead of target_device.
When I use
trainer.train()
, sentence-transformer complains because of the calls to_target_device
.https://github.com/huggingface/setfit/blob/1e3ce937e2e430c549b5b43ffb48b43d714efc24/src/setfit/modeling.py#L624
The warning is "
SentenceTransformer._target_device
has been removed, please useSentenceTransformer.device
instead.`", so it should be an easy fix.I did note the part:
Maybe I have a mismatch of versions of SetFit and Sentence-Transformers cause I see a ton of warnings from ST.
I'm using
setfit==1.0.1
andsentence-transformers==2.3.1
, so the above should have useddevice
instead oftarget_device
.