dmmiller612 / bert-extractive-summarizer

Easy to use extractive text summarization with BERT
MIT License
1.37k stars 307 forks source link

Throwing issue AttributeError: module transformers.models.big_bird has no attribute BigBirdTokenizer #109

Closed madhavi1102 closed 2 years ago

madhavi1102 commented 3 years ago

Steps to reproduce: !pip install bert-extractive-summarizer ! pip install sentencepiece !python -m spacy download en_core_web_md

from summarizer import Summarizer model = Summarizer() model("I have recent examples.. I booked for only one vaccine for my mother in a 3 day drive in Hyderabad but was told it's a limited. I did not book the request for myself because I was already vaccinated through my wife's company. ",ratio=0.5)

The give error occurred: AttributeError: module transformers.models.big_bird has no attribute BigBirdTokenizer.

how it can be resolved? no proper solution given over google search.

sidphbot commented 3 years ago

same error here as well, occuring with simple import, (sorry new to pytorch)

colab error:


AttributeError Traceback (most recent call last)

in () 161 #module level import only 162 import torch --> 163 from transformers import * 164 def build_summarizer(): 165 2 frames /usr/local/lib/python3.7/dist-packages/transformers/file_utils.py in __getattr__(self, name) 1822 value = getattr(module, name) 1823 else: -> 1824 raise AttributeError(f"module {self.__name__} has no attribute {name}") 1825 1826 setattr(self, name, value) AttributeError: module transformers.models.big_bird has no attribute BigBirdTokenizer
smile22091 commented 3 years ago

I have the same error too. But I install transformer 3.3.0, it works to me.

!pip install transformers==3.3.0

sidphbot commented 3 years ago

Hey, sorry for not updating you, its resolved for me as well, it was failing for me because of incorrect scispacy model download. I am all good with the latest version right now and it works like a charm. Thanks creator 👍👍

On Sun, Jun 20, 2021, 4:05 PM smile22091 @.***> wrote:

I have the same error too. But I install transformer 3.3.0, it works to me.

!pip install transformers==3.3.0

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dmmiller612/bert-extractive-summarizer/issues/109#issuecomment-864560219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAIMSZ5UR76B2RN66TEFRDTTXYRPANCNFSM46XJJ5YQ .