dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.38k stars 305 forks source link

AttributeError with latest version of Transformers #81

Closed dipanjanS closed 3 years ago

dipanjanS commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Sounds great, thanks!

Emekaborisama commented 3 years ago

i have the same issue

dmmiller612 commented 3 years ago

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

angrytrees commented 3 years ago

Hi, have the same issue now

After update transformer library to 2.2.x works fine

shridharpr commented 3 years ago

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