Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
schramm12 opened this issue Feb 28, 2024 · 4 comments

Comments

@schramm12
Copy link

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.

@gaotianyu1350
Copy link
Member

Hi,

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

@schramm12
Copy link
Author

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

@gaotianyu1350
Copy link
Member

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

@schramm12
Copy link
Author

Thanks, now it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants