princeton-nlp / LM-BFF

[ACL 2021] LM-BFF: Better Few-shot Fine-tuning of Language Models https://arxiv.org/abs/2012.15723

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot import name 'default_hp_search_backend' from 'transformers.integrations'

schramm12 opened this issue · comments

Now, by trying the command TAG=exp TYPE=prompt-demo TASK=SST-2 BS=2 LR=1e-5 SEED=42 MODEL=roberta-large bash run_experiment.sh which is in the README I got this error:
Traceback (most recent call last):
File "/LM-BFF/run.py", line 23, in
from src.trainer import Trainer
File "/LM-BFF/src/trainer.py", line 43, in
from transformers.integrations import (
ImportError: cannot import name 'default_hp_search_backend' from 'transformers.integrations' (/LM-BFF/venv/lib/python3.10/site-packages/transformers/integrations/init.py)
I've already found that it has been a problem in another project but I don't know how to fix it.

Hi,

You might be using an incompatible version of transformers. Can you try using the one stated in the readme?

When attempting to install your requirements, I encountered an error related to the NumPy version. Then, when I tried to install the requirements by specifying only the version of Transformers, I received the following error message: "ERROR: Failed building wheel for tokenizers.
ERROR: Failed building wheel for tokenizers

you might need to use a lower python version, like 3.6

Thanks, now it works!