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

Problem with import statement of transformer #52

Open
JisenRen opened this issue Dec 13, 2022 · 4 comments
Open

Problem with import statement of transformer #52

JisenRen opened this issue Dec 13, 2022 · 4 comments

Comments

@JisenRen
Copy link

This import statement raises an error:
ImportError: cannot import name 'swish' from 'transformers.activations'
Why does this happen? Is it related to the version of transformers you use? How should we make the code runnable?

@giraffeooo
Copy link

Hello, I also have the same problem. I am using a single GPU running code. Have you resolved it? How to solve it?

@JisenRen
Copy link
Author

JisenRen commented Mar 24, 2023

Hello, I also have the same problem. I am using a single GPU running code. Have you resolved it? How to solve it?

I was finally able to run their code by repeating the following process:

  • Try running the code and get an error
  • Figure out the module that such error belongs to
  • (Re)Install some (maybe older) version of the module

I forgot about exactly what versions of each module worked, so you might have to explore the same way.

@giraffeooo
Copy link

Thank you so so so much!I'll try it.:)

@JisenRen
Copy link
Author

JisenRen commented Mar 27, 2023

requirements.txt
I've made a dump of the conda environment in which I ran ClipBERT successfully.

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