songhaoyu / BoB

The released codes for ACL 2021 paper 'BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data'
https://aclanthology.org/2021.acl-long.14/
Apache License 2.0
136 stars 24 forks source link

File name "xlib.modeling_tf_auto" not found #1

Closed Exe-dev closed 3 years ago

Exe-dev commented 3 years ago

When preprocessing and model training, I met this error. I think xlib doesn't include modeling_tf_auto.py .

Commands

python bertoverbert.py --do_train --encoder_model ./pretrained_models/bert/bert-base-uncased/ --decoder_model ./pretrained_models/bert/bert-base-uncased/ --decoder2_model ./pretrained_models/bert/bert-base-uncased/ --save_model_path checkpoints/ConvAI2/bertoverbert --dataset_type convai2 --dumped_token ./data/ConvAI2/convai2_tokenized/ --learning_rate 7e-6 --batch_size 32

Error Message.

Traceback (most recent call last): File "bertoverbert.py", line 26, in from xlibs import AdamW File "PATH\BoB\xlibs__init__.py", line 126, in from .pipelines import ( File "PATH\BoB\xlibs\pipelines.py", line 48, in from .modeling_tf_auto import ( ModuleNotFoundError: No module named 'xlibs.modeling_tf_auto'

haoyusoong commented 3 years ago

This issue is caused by the TensorFlow environment. I guess that you run this project under an environment where both PyTorch and TensorFlow are installed. If TensorFlow is available, the xlib/pipelines.py will initialize the tf-related libs. These libs were removed from this PyTorch project for simplicity. Therefore, here are two solutions: 1) run this project under a no-TensorFlow environment, or 2) replace the xlib/pipelines.py with the updated one, which has removed all tf lib initializations.