naver / sqlova

Apache License 2.0
632 stars 168 forks source link

Missing Positional Requirements #11

Closed ronalddas closed 5 years ago

ronalddas commented 5 years ago

When I run python3 train.py --seed 1 --bS 16 --accumulate_gradients 2 --bert_type_abb uS --fine_tune --lr 0.001 --lr_bert 0.00001 --max_seq_leng 222 . I get the error Traceback (most recent call last): File "train.py", line 582, in <module> model, model_bert, tokenizer, bert_config = get_models(args, BERT_PT_PATH, trained=True, path_model_bert=path_model_bert, path_model=path_model) File "train.py", line 156, in get_models args.no_pretraining) File "train.py", line 120, in get_bert model_bert = BertModel(bert_config) TypeError: __init__() missing 2 required positional arguments: 'is_training' and 'input_ids I am using Python 3.6.7

whwang299 commented 5 years ago

Hi @ronalddas

Hm.. BertModel class does not take is_training and input_ids as arguments (see below) https://github.com/naver/sqlova/blob/03407da28328e555881c3f10850cc7fa430e3330/bert/modeling.py#L363-L373

Are you using the same BertModel class uploaded in this repository?

Wonseok

ronalddas commented 5 years ago

I had pre-trained-bert installed, it was calling the BertModel class from there.