Run_qa.py for Tensorflow does not save the model in output directory
I am very new to the topic so sorry if the question is dumb.I am trying to train a Q/A model withexample script for Question Answering for Tensorflow.I use the following command to run the script:python run_qa.py \
--model_name_or_path distilbert-base-cased \
--output_dir output \
--dataset_name squad \
--max_train_samples 40 \
--max_eval_samples 20 \
--do_train \
--do_eval \And seems that everything goes fine and without errors, but after the script finishes the training I cannot find the trained model in output directory, what I see there are these two fileeval_nbest_predictions.jsonandeval_predictions.json.So what am I doing wrong? How can I make the script save the trained model in the output directory?
2022-05-29T23:01:04Z
@AndranikI am facing the same outcome. Were you able to identify the root cause?
2022-06-03T12:50:43Z
Hello thereI realized what was wrong, and you can open a PR to fix it as well.The saving is done underthis callback. The callback should’ve been instantiated and called insidemodel.fit()but it doesn’t. I’ll open a PR to fix that (but you can also use this quick fix).