fast-bert
fast-bert copied to clipboard
Error: cannot import name 'Unigram' from fast_bert.data_cls import BertDataBunch
Another weird error once I was running in colab:
7 frames
/usr/local/lib/python3.6/dist-packages/transformers/convert_slow_tokenizer.py in
ImportError: cannot import name 'Unigram'
NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the "Open Examples" button below.
As proposed in a similar issue https://github.com/huggingface/transformers/issues/7806, upgrade tokenizers. For Colab this worked for me: %pip install --upgrade tokenizers
Make sure the version of tokenizers >= 0.8.1rc1. I also face this issue. You can create a new notebook and install tokenizers %pip install tokenizers
before install fast-bert.