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

AttributeError with latest version of Transformers #81

Closed
dipanjanS opened this issue Sep 18, 2020 · 7 comments
Closed

AttributeError with latest version of Transformers #81

dipanjanS opened this issue Sep 18, 2020 · 7 comments

Comments

@dipanjanS
Copy link

Hi with the latest version of transformers i.e 3.1.0 I see the following error when I try to import Summarizer

from summarizer import Summarizer

AttributeError: module 'transformers.utils.logging' has no attribute 'basicConfig'

Not sure if something broke because of changes to the base transformer library?
Works fine with 2.2.x though.

Any insights would be appreciated.

@hugocool
Copy link

I got exactly the same error

`
from summarizer import Summarizer

body = 'Text body that you want to summarize with BERT'
body2 = 'Something else you want to summarize with BERT'
model = Summarizer()
model(body)
model(body2)
`

`

AttributeError Traceback (most recent call last)
in ()
----> 1 from summarizer import Summarizer
2
3 body = 'Text body that you want to summarize with BERT'
4 body2 = 'Something else you want to summarize with BERT'
5 model = Summarizer()

2 frames
/usr/local/lib/python3.6/dist-packages/summarizer/bert_parent.py in ()
7 from transformers import *
8
----> 9 logging.basicConfig(level=logging.WARNING)
10
11

AttributeError: module 'transformers.utils.logging' has no attribute 'basicConfig'
`

@ZohebAbai
Copy link

ZohebAbai commented Sep 21, 2020

Hi with the latest version of transformers i.e 3.1.0 I see the following error when I try to import Summarizer

from summarizer import Summarizer

AttributeError: module 'transformers.utils.logging' has no attribute 'basicConfig'

Not sure if something broke because of changes to the base transformer library?
Works fine with 2.2.x though.

Any insights would be appreciated.

Just a few days back the update has been pushed to a branch 'small-updates'. Until it's merged into master branch you can install it using pip install git+https://github.com/dmmiller612/bert-extractive-summarizer.git@small-updates

@dipanjanS
Copy link
Author

Sounds great, thanks!

@Emekaborisama
Copy link

i have the same issue

@dmmiller612
Copy link
Owner

Forgot to update this issue. This should be resolved. Let me know if any other issues arise.

@angrytrees
Copy link

Hi, have the same issue now

After update transformer library to 2.2.x works fine

@shridharpr
Copy link

I am getting following error - "AttributeError: module transformers.models.big_bird has no attribute BigBirdTokenizer"
While importing "from summarizer import Summarizer"

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

7 participants