sister icon indicating copy to clipboard operation
sister copied to clipboard

bert_embedding example throws error

Open BenWiseman opened this issue 3 years ago • 3 comments

>>> bert_embedding = sister.BertEmbedding(lang="en")
>>> sentence = "I am a dog."
>>> vector = bert_embedding(sentence)
AttributeError: 'NoneType' object has no attribute 'batch_encode_plus'

I'm not sure what the issue is, it downloaded BERT, installed sentencepiece and all, but is unhappy. MeanEmbedding() works perfectly, so I'm guessing something is off in BERT?

` OS: Pop!_OS 20.10 x86_64 Kernel: 5.11.0-7612-generic Shell: bash 5.0.17 Resolution: 5120x1440 DE: GNOME CPU: AMD Ryzen 9 3900X (24) @ 3.800GHz GPU: NVIDIA GeForce RTX 2080 Rev. A Memory: 7855MiB / 32096MiB

`

BenWiseman avatar Apr 02 '21 19:04 BenWiseman

Thanks for reporting!

It seems like in the installation process, it fails to install the proper version of one dependency (transformers). I will look into this and get back to you in few days.

sobamchan avatar Apr 05 '21 02:04 sobamchan

Thanks!

On Sun, 4 Apr 2021, 19:30 sobamchan, @.***> wrote:

Thanks for reporting!

It seems like in the installation process, it fails to install the proper version of one dependency (transformers). I will look into this and get back to you in few days.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tofunlp/sister/issues/161#issuecomment-813148328, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWRYRDTPHGP7K37OHAWMVTTHEOFRANCNFSM42JKJK5Q .

BenWiseman avatar Apr 05 '21 02:04 BenWiseman

@BenWiseman

Hi, I failed to replicate this issue on my local machine, it just worked fine.

Could you check the version of huggingface/transformers package by running pip freeze | grep transformers?

and probably the version of tokenizers by pip freeze | grep tokenizers.

sobamchan avatar Apr 05 '21 12:04 sobamchan