uncertainty-baselines icon indicating copy to clipboard operation
uncertainty-baselines copied to clipboard

ModuleNotFoundError: No module named 'official.nlp.bert'

Open t1endat opened this issue 1 year ago • 1 comments

I am using google colab with GPU, when trying to run cifar/deterministic.py with:

!python3 cifar/deterministic.py \
    --download_data=True \
    --use_gpu=True \
    --num_cores=8

I get this error:

I1017 05:59:10.674577 140288873247360 deterministic.py:250] [deterministic.py:250] Building ResNet model
W1017 05:59:10.796981 140288873247360 __init__.py:123] [__init__.py:123] Skipped BERT models due to ImportError.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/uncertainty_baselines/models/__init__.py", line 116, in <module>
    from uncertainty_baselines.models import bert
  File "/usr/local/lib/python3.10/dist-packages/uncertainty_baselines/models/bert.py", line 30, in <module>
    from official.nlp.bert import bert_models
ModuleNotFoundError: No module named 'official.nlp.bert'

What should I do next, when I look into this repo, seem like don't have any module named official.nlp.bert

t1endat avatar Oct 17 '23 06:10 t1endat

tokenization is transferred to tools section. so import from official.nlp.tools

Ank-its avatar Jan 24 '24 15:01 Ank-its