google / uncertainty-baselines

High-quality implementations of standard and SOTA methods on a variety of tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

t1endat opened this issue · 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

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