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

facing issue while importing setfit classifier #492

Open Abhaysharma53 opened 9 months ago

Abhaysharma53 commented 9 months ago

I am facing some issues while trying to import SetFitClassifier

code - from setfit import SetFitClassifier

Error - RuntimeError: Failed to import transformers.trainer_callback because of the following error (look up to see its traceback): module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'. will be really helpful if anyone can help me to troubleshoot this.

kgourgou commented 9 months ago

Hi @Abhaysharma53,

Try to upgrade pyopenssl. Here's how:

python -m pip install pip --upgrade
pip install pyopenssl --upgrade