bert icon indicating copy to clipboard operation
bert copied to clipboard

Trying to run SQuAD which seems to run but does not produce a predictions.json file

Open ksrinivs64 opened this issue 8 years ago • 6 comments

Running with: python run_squad.py \ --vocab_file=$BERT_BASE_DIR/vocab.txt \ --bert_config_file=$BERT_BASE_DIR/bert_config.json \ --init_checkpoint=$BERT_BASE_DIR/bert_model.ckpt \ --do_train=True \ --train_file=$SQUAD_DIR/train-v1.1.json \ --do_predict=True \ --predict_file=$SQUAD_DIR/dev-v1.1.json \ --train_batch_size=12 \ --learning_rate=3e-5 \ --num_train_epochs=2.0 \ --max_seq_length=384 \ --doc_stride=128 \ --output_dir=$SQUAD_DIR/output

Output seems normal. Cuda is set up but I get: E tensorflow/stream_executor/cuda/cuda_driver.cc:300] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected And: INFO:tensorflow:Saving checkpoints for 0 into ../bert/squad/output/model.ckpt. INFO:tensorflow:global_step/sec: 0.0131662 INFO:tensorflow:examples/sec: 0.157994 INFO:tensorflow:global_step/sec: 0.0128566 INFO:tensorflow:examples/sec: 0.154279

ls output: checkpoint model.ckpt-0.data-00000-of-00001 train.tf_record events.out.tfevents.1542228741.dccxc040 model.ckpt-0.index graph.pbtxt model.ckpt-0.meta

But no predictions.json file in that directory. Also the checkpoint isn't model.chkpt. Is the CUDA error the problem? Thanks!

ksrinivs64 avatar Nov 15 '18 02:11 ksrinivs64

The prediction gets generated at the end of training, which takes a few hours on a GPU.

jacobdevlin-google avatar Nov 15 '18 02:11 jacobdevlin-google

If you're having trouble with CUDA then that's a general TensorFlow environment issue I wont be able to help with.

jacobdevlin-google avatar Nov 15 '18 02:11 jacobdevlin-google

Hai, I'm trying to run the SQuAD2.0 in colab using bert.(with TPU support on google Cloud). The training stalled after some some. I don't know what to do. Can you help with this? And how long is the training time is for SQuAD2.0 using BERT-LARGE.

PoojaSolai97 avatar Feb 07 '19 05:02 PoojaSolai97

Hai, I'm trying to run the SQuAD2.0 in colab using bert.(with TPU support on google Cloud). The training stalled after some some. I don't know what to do. Can you help with this? And how long is the training time is for SQuAD2.0 using BERT-LARGE.

Can you post a link to your notebook? Or just copy and paste the code here.

Santosh-Gupta avatar Apr 19 '19 15:04 Santosh-Gupta

Is it possible to use smaller train-v11.1.json file to test on CPU and get predictions.json in output?

hamariyna avatar Jun 05 '19 21:06 hamariyna

The prediction gets generated at the end of training, which takes a few hours on a GPU.

why is it making more than one ckpt files(model.ckpt-2000, model.ckpt-3000,.... . . ) of same size(1.22GB each) in the destination folder(in google drive) while fine-tuning BERT base with SQuAD in colab with GPU?

itsjatinsharma avatar Jul 16 '20 18:07 itsjatinsharma