TypeError: __init__() got an unexpected keyword argument 'filepath' when using RAG model
Author: tangxiangru
Pull request: no

I was finetuning RAG model with cmd:

python finetune_rag.py \
    --data_dir ../../../../data/ms-marco/ \
    --output_dir ../../../../data/ms-marco/ \
    --model_name_or_path ~/model/rag/rag/rag-sequence-nq \
    --model_type rag_sequence \
    --fp16 \
    --gpus 8 \
    --do_train --do_predict


where ~/model/rag/rag/rag-sequence-nq was completely download from https://huggingface.co/facebook/rag-sequence-nq.

Here is the log:


Model name '/nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq' not found in model shortcut name list (facebook/dpr-question_encoder-single-nq-base, facebook/dpr-question_encoder-multiset-base). Assuming '/nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq' is a path, a model identifier, or url to a directory containing tokenizer files.
Didn't find file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/question_encoder_tokenizer/tokenizer.json. We won't load it.
Didn't find file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/question_encoder_tokenizer/added_tokens.json. We won't load it.
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/question_encoder_tokenizer/vocab.txt
loading file None
loading file None
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/question_encoder_tokenizer/special_tokens_map.json
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/question_encoder_tokenizer/tokenizer_config.json
Model name '/nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq' not found in model shortcut name list (facebook/bart-base, facebook/bart-large, facebook/bart-large-mnli, facebook/bart-large-cnn, facebook/bart-large-xsum, yjernite/bart_eli5). Assuming '/nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq' is a path, a model identifier, or url to a directory containing tokenizer files.
Didn't find file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/generator_tokenizer/tokenizer.json. We won't load it.
Didn't find file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/generator_tokenizer/added_tokens.json. We won't load it.
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/generator_tokenizer/vocab.json
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/generator_tokenizer/merges.txt
loading file None
loading file None
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/generator_tokenizer/special_tokens_map.json
loading file /nfs/users/s_xiangru/model/rag/rag/rag-sequence-nq/generator_tokenizer/tokenizer_config.json
Traceback (most recent call last):
  File "finetune_rag.py", line 629, in <module>
    main(args)
  File "finetune_rag.py", line 597, in main
    checkpoint_callback=get_checkpoint_callback(args.output_dir, model.val_metric),
  File "/nfs/users/s_xiangru/transformers/examples/research_projects/rag/callbacks_rag.py", line 41, in get_checkpoint_callback
    period=1,  # maybe save a checkpoint every time val is run, not just end of epoch.
TypeError: __init__() got an unexpected keyword argument 'filepath'


Comments:
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.