[383a81]: / development / qa-server / Evaluaition.2_Models.ipynb

Download this file

1 lines (1 with data), 169.0 kB

{"nbformat":4,"nbformat_minor":0,"metadata":{"accelerator":"GPU","colab":{"name":"Evaluaition.2_Models.ipynb","provenance":[],"collapsed_sections":[]},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"yrYGLTn7e4hx","executionInfo":{"status":"ok","timestamp":1632550090493,"user_tz":-210,"elapsed":609,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"e6884ae2-fda3-4718-f852-6a5d6edb2aa7"},"source":["from google.colab import drive\n","drive.mount('/content/drive')"],"execution_count":1,"outputs":[{"output_type":"stream","name":"stdout","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"]}]},{"cell_type":"markdown","metadata":{"id":"0jsMpBZXwYFP"},"source":["##Initialize"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"6wZaqiQDv-rE","executionInfo":{"status":"ok","timestamp":1632550094236,"user_tz":-210,"elapsed":550,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"4c8e6e82-1694-4fcf-e16a-d1abf69135fb"},"source":["!nvidia-smi"],"execution_count":2,"outputs":[{"output_type":"stream","name":"stdout","text":["Sat Sep 25 06:08:12 2021       \n","+-----------------------------------------------------------------------------+\n","| NVIDIA-SMI 470.63.01    Driver Version: 460.32.03    CUDA Version: 11.2     |\n","|-------------------------------+----------------------+----------------------+\n","| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\n","| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\n","|                               |                      |               MIG M. |\n","|===============================+======================+======================|\n","|   0  Tesla K80           Off  | 00000000:00:04.0 Off |                    0 |\n","| N/A   37C    P8    28W / 149W |      0MiB / 11441MiB |      0%      Default |\n","|                               |                      |                  N/A |\n","+-------------------------------+----------------------+----------------------+\n","                                                                               \n","+-----------------------------------------------------------------------------+\n","| Processes:                                                                  |\n","|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |\n","|        ID   ID                                                   Usage      |\n","|=============================================================================|\n","|  No running processes found                                                 |\n","+-----------------------------------------------------------------------------+\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"G6GItwaee6ZK","executionInfo":{"status":"ok","timestamp":1632550189270,"user_tz":-210,"elapsed":825,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"2ad4d080-c0ab-4ff6-e32d-3345175d7836"},"source":["cd /content/drive/MyDrive/Notebooks/Final evaluaition models/"],"execution_count":3,"outputs":[{"output_type":"stream","name":"stdout","text":["/content/drive/MyDrive/Notebooks/Final evaluaition models\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"TyCTi8FPe6b7","executionInfo":{"status":"ok","timestamp":1632550189273,"user_tz":-210,"elapsed":60,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"8c5f9344-1d45-4395-b685-ad15f3e7ef7a"},"source":["!ls"],"execution_count":4,"outputs":[{"output_type":"stream","name":"stdout","text":["squad  transformers  Untitled0.ipynb\n"]}]},{"cell_type":"code","metadata":{"id":"EhwNgR_0ghAz","executionInfo":{"status":"ok","timestamp":1632550193607,"user_tz":-210,"elapsed":4349,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}}},"source":["! pip install -q datasets transformers"],"execution_count":5,"outputs":[]},{"cell_type":"code","metadata":{"id":"yPYu6VxhghPo","executionInfo":{"status":"ok","timestamp":1632550197131,"user_tz":-210,"elapsed":3535,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}}},"source":["!pip install -q transformers[sentencepiece]"],"execution_count":6,"outputs":[]},{"cell_type":"code","metadata":{"id":"5cwKbkzug2QF"},"source":["# !mkdir squad\n","# !wget https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v2.0.json -O squad/train-v2.0.json\n","# !wget https://rajpurkar.github.io/SQuAD-explorer/dataset/dev-v2.0.json -O squad/dev-v2.0.json"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"6R_c6l3Zg-UU"},"source":["# !git clone https://github.com/huggingface/transformers"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"id":"Q0T7GRdyHOUv","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1632550200887,"user_tz":-210,"elapsed":3766,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"1473bf59-db6a-45d3-9815-8de773b720b8"},"source":["!pip install transformers[sentencepiece]"],"execution_count":7,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: transformers[sentencepiece] in /usr/local/lib/python3.7/dist-packages (4.10.3)\n","Requirement already satisfied: huggingface-hub>=0.0.12 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (0.0.17)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (1.19.5)\n","Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (4.8.1)\n","Requirement already satisfied: tokenizers<0.11,>=0.10.1 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (0.10.3)\n","Requirement already satisfied: sacremoses in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (0.0.46)\n","Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (4.62.2)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (5.4.1)\n","Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (21.0)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (3.0.12)\n","Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (2.23.0)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (2019.12.20)\n","Requirement already satisfied: protobuf in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (3.17.3)\n","Requirement already satisfied: sentencepiece==0.1.91 in /usr/local/lib/python3.7/dist-packages (from transformers[sentencepiece]) (0.1.91)\n","Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from huggingface-hub>=0.0.12->transformers[sentencepiece]) (3.7.4.3)\n","Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->transformers[sentencepiece]) (2.4.7)\n","Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers[sentencepiece]) (3.5.0)\n","Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.7/dist-packages (from protobuf->transformers[sentencepiece]) (1.15.0)\n","Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers[sentencepiece]) (2.10)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers[sentencepiece]) (2021.5.30)\n","Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers[sentencepiece]) (1.24.3)\n","Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers[sentencepiece]) (3.0.4)\n","Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers[sentencepiece]) (7.1.2)\n","Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers[sentencepiece]) (1.0.1)\n"]}]},{"cell_type":"code","metadata":{"id":"r5lPxgKGJ0pz"},"source":["# %cd transformers/examples/pytorch/language-modeling"],"execution_count":null,"outputs":[]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"33OsA7jAhnAj","executionInfo":{"status":"ok","timestamp":1632550200889,"user_tz":-210,"elapsed":29,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"250a3502-983a-4c7f-fc2d-a17647beca20"},"source":["%cd transformers/examples/legacy/question-answering/"],"execution_count":8,"outputs":[{"output_type":"stream","name":"stdout","text":["/content/drive/MyDrive/Notebooks/Final evaluaition models/transformers/examples/legacy/question-answering\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"fhq6QvnaDtQi","executionInfo":{"status":"ok","timestamp":1632550200890,"user_tz":-210,"elapsed":22,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"9a5ef43e-3e87-4306-a60f-8f98a9c64b80"},"source":["!ls"],"execution_count":9,"outputs":[{"output_type":"stream","name":"stdout","text":["cached_dev_base_bert_QA_Final_384\n","cached_dev_bert-base-cased-squad2_384\n","cached_dev_final_base_bert_QA_checkpoint_384\n","cached_dev_final_squeeze_bert_QA_checkpoint_384\n","cached_dev_Normal_base_QA__checkpoint_384\n","cached_dev_Normal_QA__checkpoint_384\n","cached_dev_squeezebert-finetuned-squadv2_384\n","cached_dev_squeeze-bert-squad-QA_384\n","cached_train_bert-base-cased-squad2_384\n","cached_train_MLM_base_bert_384\n","cached_train_squeezebert-finetuned-squadv2_384\n","runs\n","run_squad.py\n","run_squad_trainer.py\n"]}]},{"cell_type":"markdown","metadata":{"id":"V5AtkvwLp7Er"},"source":["##Squeeze bert"]},{"cell_type":"markdown","metadata":{"id":"ZCbYpZgsVaw3"},"source":["##4"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"f5JKRtd4p9gL","executionInfo":{"status":"ok","timestamp":1632553381197,"user_tz":-210,"elapsed":166801,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"6b247ad8-89e3-4c43-b6ee-a22815804f01"},"source":["#base row \n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path  \"/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/\" \\\n","  --tokenizer_name \"/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/\" \\\n","  --do_train \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --train_file /content/drive/My\\Drive/Albert/albert-qa/qa.json \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 2.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 1000 \\\n","  --cache_dir /content/drive/My\\Drive/4_squeeze_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/4_squeeze_QA__checkpoint/"],"execution_count":21,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 07:00:16 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","[INFO|configuration_utils.py:559] 2021-09-25 07:00:16,373 >> loading configuration file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 07:00:16,374 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"/home/inter/spoofing/checkpoint\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 07:00:16,378 >> Didn't find file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/added_tokens.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:00:16,381 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/vocab.txt\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:00:16,381 >> loading file None\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:00:16,381 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:00:16,381 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:00:16,381 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/tokenizer.json\n","[INFO|modeling_utils.py:1277] 2021-09-25 07:00:16,432 >> loading weights file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 07:00:17,379 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 07:00:17,379 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 07:00:19 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/4_squeeze_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=True, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=2.0, output_dir='/content/drive/MyDrive/4_squeeze_QA__checkpoint/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=1000, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/', train_file='/content/drive/MyDrive/Albert/albert-qa/qa.json', verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 07:00:19 - INFO - __main__ - Creating features from dataset file at .\n","100% 41/41 [00:00<00:00, 150.15it/s]\n","convert squad examples to features:   0% 0/211 [00:00<?, ?it/s][WARNING|squad.py:118] 2021-09-25 07:00:20,945 >> Could not find answer: '' vs. 'If you miss a dose of this medicine, apply it as soon as possible.However, if it is almost time for your next dose, skip the missed dose and go back to your regular dosing schedule.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:20,946 >> Could not find answer: '' vs. 'Store the medicine in a closed container at room temperature,away from heat, moisture, and direct light. Keep from freezing.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:21,153 >> Could not find answer: '' vs. 'Adults and children 12 years of age and over—Use once a week or as directed by your doctor. Children younger than 12 years of age—Use and dose must be determined by your doctor.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:21,401 >> Could not find answer: '' vs. 'Wet the area to be shaved. Apply a small amount of the shave cream and gently rub over entire area.'\n","convert squad examples to features:   0% 1/211 [00:01<05:23,  1.54s/it][WARNING|squad.py:118] 2021-09-25 07:00:21,615 >> Could not find answer: '' vs. 'Before applying, wash the affected area with a nonmedicated cleanser. Then rinse and pat dry. Using a circular motion, apply a thin layer of the mask evenly over the affected area.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:21,788 >> Could not find answer: '' vs. 'Swallow the tablet whole.Do not break, crush, or chew before swallowing.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:21,909 >> Could not find answer: '' vs. 'If you miss a dose of this medicine, take it as soon as possible. if it is almost time for your next dose, skip the missed dose and go back to your regular dosing schedule.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,206 >> Could not find answer: '' vs. 'Exalenz BreathID® non-invasive breath test is a diagnostic test that analyzes a breath sample before and after taking 13C-enriched urea to help identify patients with H. pylori infection.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,218 >> Could not find answer: '' vs. 'Do not eat for at least 1 hour before taking the mixed solution. If the mixed solution has large particles after mixing it for 5 minutes, do not use it and open a new kit.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,218 >> Could not find answer: '' vs. 'The dose of 14c urea will be different for different patients.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,218 >> Could not find answer: '' vs. 'The dose of 14c urea will be different for different patients.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,218 >> Could not find answer: '' vs. 'For best results, use this medicine at least 2 times a week or as directed by your doctor.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,365 >> Could not find answer: '' vs. 'The dose of this medicine will be different for different patients.Follow your doctor's orders or the directions on the label. The following information includes only the average doses of this medicine.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:22,804 >> Could not find answer: '' vs. 'Adults—100 milligrams (mg) once a day. Children 2 to 17 years of age—Dose is based on body weight and must be determined by your doctor.'\n","convert squad examples to features:  16% 33/211 [00:02<00:13, 13.02it/s][WARNING|squad.py:118] 2021-09-25 07:00:23,243 >> Could not find answer: '' vs. 'Store the medicine in a closed container at room temperature, away from heat, moisture, and direct light. Keep from freezing. Keep out of the reach of children.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:23,257 >> Could not find answer: '' vs. 'Usual Adult Dose for Hepatocellular Carcinoma: Tablets: 60 mg orally once a day until patient no longer experiences clinical benefit or unacceptable toxicity occurs'\n","[WARNING|squad.py:118] 2021-09-25 07:00:23,258 >> Could not find answer: '' vs. 'treated with sorafenib Detailed Cabometyx dosage information'\n","[WARNING|squad.py:118] 2021-09-25 07:00:23,954 >> Could not find answer: '' vs. 'Do not use two forms of clonidine at the same time. Do not crush, chew, or break an extended-release tablet.'\n","convert squad examples to features:  31% 65/211 [00:04<00:08, 17.45it/s][WARNING|squad.py:118] 2021-09-25 07:00:25,714 >> Could not find answer: '' vs. 'Since Nucynta is used for pain, you are not likely to miss a dose. Skip any missed dose if it is almost time for your next scheduled dose. Do not take extra medicine to make up the missed dose. Do not take extra medicine to make up a missed dose. Do not take more than your prescribed dose in a 24-hour period.'\n","convert squad examples to features:  61% 129/211 [00:07<00:04, 19.20it/s][WARNING|squad.py:118] 2021-09-25 07:00:27,941 >> Could not find answer: '' vs. 'nausea, vomiting, diarrhea; skin rash; anemia (low red blood cells); or headache, dizziness. This is not a complete list of side effects and others may occur.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:27,941 >> Could not find answer: '' vs. 'Get emergency medical help if you have signs of an allergic reaction to Zyvox (hives, difficult breathing, swelling in your face or throat) or a severe skin reaction (fever, sore throat, burning eyes, skin pain, red or purple skin rash with blistering and peeling) vision problems, changes in color vision; severe stomach pain, diarrhea that is watery or bloody; a seizure; sweating, feeling anxious or shaky (may be signs of low blood sugar); high levels of serotonin in the body - agitation, hallucinations, fever, sweating, shivering, fast heart rate, muscle stiffness, twitching, loss of coordination, nausea, vomiting, diarrhea; lactic acidosis - unusual muscle pain, trouble breathing, stomach pain, vomiting, irregular heart rate, dizziness, feeling cold, or feeling very weak or tired; orlow blood cell counts - fever, chills, tiredness, weakness, confusion, mouth sores, skin sores, easy bruising, unusual bleeding, pale skin, cold hands and feet, feeling light-headed or short of breath'\n","[WARNING|squad.py:118] 2021-09-25 07:00:28,110 >> Could not find answer: '' vs. 'liver disease; heart problems, high blood pressure; a heart attack; low levels of potassium in your blood; or problems with your adrenal gland or pituitary gland.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:28,325 >> Could not find answer: '' vs. 'swelling in your ankles or feet, pain in your legs; shortness of breath; pain or burning when you urinate, blood in your urine; fast heartbeats; headache, confusion; a light-headed feeling, like you might pass out; muscle weakness; orliver problems - stomach pain (upper right side), nausea, vomiting, dark urine, jaundice (yellowing of the skin or eyes)'\n","[WARNING|squad.py:118] 2021-09-25 07:00:28,325 >> Could not find answer: '' vs. 'indigestion, vomiting, diarrhea, constipation; painful or difficult urination; swelling in your legs or feet; feeling weak, feeling very hot; muscle pain; abnormal blood tests; joint pain or swelling; bruising; or cold symptoms such as stuffy nose, sneezing, cough, sore throat.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:28,531 >> Could not find answer: '' vs. 'tell your doctor if you have ever had: liver disease; heart disease, high or low blood pressure; high cholesterol or triglycerides; a stroke, including \"mini-stroke\"; breast cancer; a seizure; Alzheimer's disease; diabetes or high blood sugar; an enlarged prostate; bowel problems; or narrow-angle glaucoma.'\n","[WARNING|squad.py:118] 2021-09-25 07:00:28,736 >> Could not find answer: '' vs. 'weight gain (more likely in teenagers), increased appetite; headache, dizziness, drowsiness, feeling tired or restless; problems with speech or memory; tremors or shaking, numbness or tingly feeling; changes in personality; dry mouth, or increased salivation; stomach pain, constipation; or pain in your arms or legs.'\n","convert squad examples to features:  76% 161/211 [00:08<00:02, 22.13it/s][WARNING|squad.py:118] 2021-09-25 07:00:29,546 >> Could not find answer: '' vs. 'mild skin pain; rash, itching; nausea, vomiting, diarrhea; headache'\n","convert squad examples to features: 100% 211/211 [00:09<00:00, 21.75it/s]\n","add example index and unique id: 100% 211/211 [00:00<00:00, 420227.04it/s]\n","09/25/2021 07:00:29 - INFO - __main__ - Saving features into cached file ./cached_train_squeeze-bert-squad-QA_384\n","09/25/2021 07:00:30 - INFO - __main__ - ***** Running training *****\n","09/25/2021 07:00:30 - INFO - __main__ -   Num examples = 551\n","09/25/2021 07:00:30 - INFO - __main__ -   Num Epochs = 2\n","09/25/2021 07:00:30 - INFO - __main__ -   Instantaneous batch size per GPU = 12\n","09/25/2021 07:00:30 - INFO - __main__ -   Total train batch size (w. parallel, distributed & accumulation) = 12\n","09/25/2021 07:00:30 - INFO - __main__ -   Gradient Accumulation steps = 1\n","09/25/2021 07:00:30 - INFO - __main__ -   Total optimization steps = 92\n","09/25/2021 07:00:30 - INFO - __main__ -   Starting fine-tuning.\n","Epoch:   0% 0/2 [00:00<?, ?it/s]\n","Iteration:   0% 0/46 [00:00<?, ?it/s]\u001b[A\n","Iteration:   2% 1/46 [00:01<01:05,  1.45s/it]\u001b[A\n","Iteration:   4% 2/46 [00:02<01:00,  1.37s/it]\u001b[A\n","Iteration:   7% 3/46 [00:04<00:56,  1.32s/it]\u001b[A\n","Iteration:   9% 4/46 [00:05<00:54,  1.30s/it]\u001b[A\n","Iteration:  11% 5/46 [00:06<00:53,  1.29s/it]\u001b[A\n","Iteration:  13% 6/46 [00:07<00:51,  1.29s/it]\u001b[A\n","Iteration:  15% 7/46 [00:09<00:50,  1.28s/it]\u001b[A\n","Iteration:  17% 8/46 [00:10<00:48,  1.28s/it]\u001b[A\n","Iteration:  20% 9/46 [00:11<00:47,  1.28s/it]\u001b[A\n","Iteration:  22% 10/46 [00:12<00:46,  1.28s/it]\u001b[A\n","Iteration:  24% 11/46 [00:14<00:44,  1.28s/it]\u001b[A\n","Iteration:  26% 12/46 [00:15<00:43,  1.28s/it]\u001b[A\n","Iteration:  28% 13/46 [00:16<00:42,  1.28s/it]\u001b[A\n","Iteration:  30% 14/46 [00:18<00:40,  1.28s/it]\u001b[A\n","Iteration:  33% 15/46 [00:19<00:39,  1.28s/it]\u001b[A\n","Iteration:  35% 16/46 [00:20<00:38,  1.28s/it]\u001b[A\n","Iteration:  37% 17/46 [00:21<00:37,  1.28s/it]\u001b[A\n","Iteration:  39% 18/46 [00:23<00:35,  1.28s/it]\u001b[A\n","Iteration:  41% 19/46 [00:24<00:34,  1.28s/it]\u001b[A\n","Iteration:  43% 20/46 [00:25<00:33,  1.29s/it]\u001b[A\n","Iteration:  46% 21/46 [00:27<00:32,  1.29s/it]\u001b[A\n","Iteration:  48% 22/46 [00:28<00:30,  1.29s/it]\u001b[A\n","Iteration:  50% 23/46 [00:29<00:29,  1.29s/it]\u001b[A\n","Iteration:  52% 24/46 [00:30<00:28,  1.28s/it]\u001b[A\n","Iteration:  54% 25/46 [00:32<00:27,  1.29s/it]\u001b[A\n","Iteration:  57% 26/46 [00:33<00:25,  1.29s/it]\u001b[A\n","Iteration:  59% 27/46 [00:34<00:24,  1.29s/it]\u001b[A\n","Iteration:  61% 28/46 [00:36<00:23,  1.29s/it]\u001b[A\n","Iteration:  63% 29/46 [00:37<00:21,  1.29s/it]\u001b[A\n","Iteration:  65% 30/46 [00:38<00:20,  1.29s/it]\u001b[A\n","Iteration:  67% 31/46 [00:39<00:19,  1.28s/it]\u001b[A\n","Iteration:  70% 32/46 [00:41<00:17,  1.28s/it]\u001b[A\n","Iteration:  72% 33/46 [00:42<00:16,  1.28s/it]\u001b[A\n","Iteration:  74% 34/46 [00:43<00:15,  1.29s/it]\u001b[A\n","Iteration:  76% 35/46 [00:45<00:14,  1.29s/it]\u001b[A\n","Iteration:  78% 36/46 [00:46<00:12,  1.28s/it]\u001b[A\n","Iteration:  80% 37/46 [00:47<00:11,  1.28s/it]\u001b[A\n","Iteration:  83% 38/46 [00:48<00:10,  1.29s/it]\u001b[A\n","Iteration:  85% 39/46 [00:50<00:09,  1.29s/it]\u001b[A\n","Iteration:  87% 40/46 [00:51<00:07,  1.29s/it]\u001b[A\n","Iteration:  89% 41/46 [00:52<00:06,  1.29s/it]\u001b[A\n","Iteration:  91% 42/46 [00:54<00:05,  1.29s/it]\u001b[A\n","Iteration:  93% 43/46 [00:55<00:03,  1.29s/it]\u001b[A\n","Iteration:  96% 44/46 [00:56<00:02,  1.29s/it]\u001b[A\n","Iteration:  98% 45/46 [00:57<00:01,  1.29s/it]\u001b[A\n","Iteration: 100% 46/46 [00:59<00:00,  1.29s/it]\n","Epoch:  50% 1/2 [00:59<00:59, 59.19s/it]\n","Iteration:   0% 0/46 [00:00<?, ?it/s]\u001b[A\n","Iteration:   2% 1/46 [00:01<00:58,  1.29s/it]\u001b[A\n","Iteration:   4% 2/46 [00:02<00:56,  1.29s/it]\u001b[A\n","Iteration:   7% 3/46 [00:03<00:55,  1.29s/it]\u001b[A\n","Iteration:   9% 4/46 [00:05<00:54,  1.29s/it]\u001b[A\n","Iteration:  11% 5/46 [00:06<00:52,  1.29s/it]\u001b[A\n","Iteration:  13% 6/46 [00:07<00:51,  1.29s/it]\u001b[A\n","Iteration:  15% 7/46 [00:09<00:50,  1.29s/it]\u001b[A\n","Iteration:  17% 8/46 [00:10<00:49,  1.29s/it]\u001b[A\n","Iteration:  20% 9/46 [00:11<00:47,  1.30s/it]\u001b[A\n","Iteration:  22% 10/46 [00:12<00:46,  1.30s/it]\u001b[A\n","Iteration:  24% 11/46 [00:14<00:45,  1.29s/it]\u001b[A\n","Iteration:  26% 12/46 [00:15<00:43,  1.29s/it]\u001b[A\n","Iteration:  28% 13/46 [00:16<00:42,  1.29s/it]\u001b[A\n","Iteration:  30% 14/46 [00:18<00:41,  1.29s/it]\u001b[A\n","Iteration:  33% 15/46 [00:19<00:40,  1.29s/it]\u001b[A\n","Iteration:  35% 16/46 [00:20<00:38,  1.29s/it]\u001b[A\n","Iteration:  37% 17/46 [00:21<00:37,  1.29s/it]\u001b[A\n","Iteration:  39% 18/46 [00:23<00:36,  1.29s/it]\u001b[A\n","Iteration:  41% 19/46 [00:24<00:34,  1.29s/it]\u001b[A\n","Iteration:  43% 20/46 [00:25<00:33,  1.29s/it]\u001b[A\n","Iteration:  46% 21/46 [00:27<00:32,  1.29s/it]\u001b[A\n","Iteration:  48% 22/46 [00:28<00:30,  1.29s/it]\u001b[A\n","Iteration:  50% 23/46 [00:29<00:29,  1.29s/it]\u001b[A\n","Iteration:  52% 24/46 [00:31<00:28,  1.29s/it]\u001b[A\n","Iteration:  54% 25/46 [00:32<00:27,  1.30s/it]\u001b[A\n","Iteration:  57% 26/46 [00:33<00:25,  1.30s/it]\u001b[A\n","Iteration:  59% 27/46 [00:34<00:24,  1.29s/it]\u001b[A\n","Iteration:  61% 28/46 [00:36<00:23,  1.29s/it]\u001b[A\n","Iteration:  63% 29/46 [00:37<00:21,  1.29s/it]\u001b[A\n","Iteration:  65% 30/46 [00:38<00:20,  1.29s/it]\u001b[A\n","Iteration:  67% 31/46 [00:40<00:19,  1.29s/it]\u001b[A\n","Iteration:  70% 32/46 [00:41<00:18,  1.30s/it]\u001b[A\n","Iteration:  72% 33/46 [00:42<00:16,  1.30s/it]\u001b[A\n","Iteration:  74% 34/46 [00:43<00:15,  1.29s/it]\u001b[A\n","Iteration:  76% 35/46 [00:45<00:14,  1.29s/it]\u001b[A\n","Iteration:  78% 36/46 [00:46<00:12,  1.29s/it]\u001b[A\n","Iteration:  80% 37/46 [00:47<00:11,  1.29s/it]\u001b[A\n","Iteration:  83% 38/46 [00:49<00:10,  1.29s/it]\u001b[A\n","Iteration:  85% 39/46 [00:50<00:09,  1.30s/it]\u001b[A\n","Iteration:  87% 40/46 [00:51<00:07,  1.29s/it]\u001b[A\n","Iteration:  89% 41/46 [00:53<00:06,  1.29s/it]\u001b[A\n","Iteration:  91% 42/46 [00:54<00:05,  1.30s/it]\u001b[A\n","Iteration:  93% 43/46 [00:55<00:03,  1.29s/it]\u001b[A\n","Iteration:  96% 44/46 [00:56<00:02,  1.30s/it]\u001b[A\n","Iteration:  98% 45/46 [00:58<00:01,  1.29s/it]\u001b[A\n","Iteration: 100% 46/46 [00:59<00:00,  1.29s/it]\n","Epoch: 100% 2/2 [01:58<00:00, 59.30s/it]\n","09/25/2021 07:02:29 - INFO - __main__ -  global_step = 93, average loss = 1.3866483985736806\n","09/25/2021 07:02:29 - INFO - __main__ - Saving model checkpoint to /content/drive/MyDrive/4_squeeze_QA__checkpoint/\n","[INFO|configuration_utils.py:391] 2021-09-25 07:02:29,326 >> Configuration saved in /content/drive/MyDrive/4_squeeze_QA__checkpoint/config.json\n","[INFO|modeling_utils.py:1001] 2021-09-25 07:02:30,283 >> Model weights saved in /content/drive/MyDrive/4_squeeze_QA__checkpoint/pytorch_model.bin\n","[INFO|tokenization_utils_base.py:2020] 2021-09-25 07:02:30,292 >> tokenizer config file saved in /content/drive/MyDrive/4_squeeze_QA__checkpoint/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:2026] 2021-09-25 07:02:30,303 >> Special tokens file saved in /content/drive/MyDrive/4_squeeze_QA__checkpoint/special_tokens_map.json\n","[INFO|configuration_utils.py:559] 2021-09-25 07:02:30,358 >> loading configuration file /content/drive/MyDrive/4_squeeze_QA__checkpoint/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 07:02:30,359 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","[INFO|modeling_utils.py:1277] 2021-09-25 07:02:30,360 >> loading weights file /content/drive/MyDrive/4_squeeze_QA__checkpoint/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 07:02:31,188 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 07:02:31,188 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/4_squeeze_QA__checkpoint/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 07:02:31,194 >> Didn't find file /content/drive/MyDrive/4_squeeze_QA__checkpoint/added_tokens.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 07:02:31,195 >> Didn't find file /content/drive/MyDrive/4_squeeze_QA__checkpoint/tokenizer.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:02:31,196 >> loading file /content/drive/MyDrive/4_squeeze_QA__checkpoint/vocab.txt\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:02:31,196 >> loading file None\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:02:31,196 >> loading file /content/drive/MyDrive/4_squeeze_QA__checkpoint/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:02:31,196 >> loading file /content/drive/MyDrive/4_squeeze_QA__checkpoint/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 07:02:31,196 >> loading file None\n","09/25/2021 07:02:31 - INFO - __main__ - Loading checkpoints saved during training for evaluation\n","09/25/2021 07:02:31 - INFO - __main__ - Evaluate the following checkpoints: ['/content/drive/MyDrive/4_squeeze_QA__checkpoint/']\n","[INFO|configuration_utils.py:559] 2021-09-25 07:02:31,350 >> loading configuration file /content/drive/MyDrive/4_squeeze_QA__checkpoint/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 07:02:31,351 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","[INFO|modeling_utils.py:1277] 2021-09-25 07:02:31,352 >> loading weights file /content/drive/MyDrive/4_squeeze_QA__checkpoint/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 07:02:32,148 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 07:02:32,148 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/4_squeeze_QA__checkpoint/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 07:02:32 - INFO - __main__ - Loading features from cached file ./cached_dev_squeeze-bert-squad-QA_384\n","09/25/2021 07:02:32 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 07:02:32 - INFO - __main__ -   Num examples = 637\n","09/25/2021 07:02:32 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 80/80 [00:24<00:00,  3.32it/s]\n","09/25/2021 07:02:56 - INFO - __main__ -   Evaluation done in total 24.074549 secs (0.037794 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 07:02:56,952 >> Writing predictions to: /content/drive/MyDrive/4_squeeze_QA__checkpoint/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 07:02:56,952 >> Writing nbest to: /content/drive/MyDrive/4_squeeze_QA__checkpoint/nbest_predictions_.json\n","09/25/2021 07:02:58 - INFO - __main__ - Results: {'exact': 37.91469194312796, 'f1': 65.00413201337508, 'total': 211, 'HasAns_exact': 37.91469194312796, 'HasAns_f1': 65.00413201337508, 'HasAns_total': 211, 'best_exact': 37.91469194312796, 'best_exact_thresh': 0.0, 'best_f1': 65.00413201337508, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"_tjBmpNfWBe-","executionInfo":{"elapsed":394,"status":"ok","timestamp":1632059794868,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"},"user_tz":-270},"outputId":"f787ffe9-937b-489b-8671-197e5b778478"},"source":["cd /content/drive/My\\Drive/Normal_QA__checkpoint/"],"execution_count":null,"outputs":[{"name":"stdout","output_type":"stream","text":["/content/drive/MyDrive/Normal_QA__checkpoint\n"]}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"R5-gOZ3bWD9E","executionInfo":{"elapsed":445,"status":"ok","timestamp":1632059805009,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"},"user_tz":-270},"outputId":"7590441f-a138-4f69-8be9-e43624bdeadd"},"source":["!ls"],"execution_count":null,"outputs":[{"name":"stdout","output_type":"stream","text":["config.json\t\t pytorch_model.bin\t  training_args.bin\n","nbest_predictions_.json  special_tokens_map.json  vocab.txt\n","predictions_.json\t tokenizer_config.json\n"]}]},{"cell_type":"markdown","metadata":{"id":"WxiQJgGrVXga"},"source":["##3"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"37cuyFMiQyms","executionInfo":{"status":"ok","timestamp":1632553189762,"user_tz":-210,"elapsed":46285,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"f1437380-a6ca-41e6-a2a4-56e103dc9248"},"source":["#base bert QA\n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path  \"mrm8488/squeezebert-finetuned-squadv2\"  \\\n","  --tokenizer_name \"mrm8488/squeezebert-finetuned-squadv2\"  \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --train_file /content/drive/My\\Drive/Albert/albert-qa/qa.json \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 3.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 300 \\\n","  --cache_dir /content/drive/My\\Drive/3_squeeae_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/3_squeeae_QA_cache_dir/"],"execution_count":20,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 06:59:05 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","09/25/2021 06:59:05 - INFO - filelock - Lock 140533297539664 acquired on /content/drive/MyDrive/3_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:59:05,967 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_squeeae_QA_cache_dir/tmp5t78sjmp\n","Downloading: 100% 666/666 [00:00<00:00, 518kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:59:06,311 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json in cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|file_utils.py:1677] 2021-09-25 06:59:06,314 >> creating metadata file for /content/drive/MyDrive/3_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","09/25/2021 06:59:06 - INFO - filelock - Lock 140533297539664 released on /content/drive/MyDrive/3_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 06:59:06,320 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:59:06,320 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:59:06 - INFO - filelock - Lock 140533297462480 acquired on /content/drive/MyDrive/3_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:59:06,671 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer_config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_squeeae_QA_cache_dir/tmpu2_65414\n","Downloading: 100% 188/188 [00:00<00:00, 176kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:59:07,013 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer_config.json in cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38\n","[INFO|file_utils.py:1677] 2021-09-25 06:59:07,017 >> creating metadata file for /content/drive/MyDrive/3_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38\n","09/25/2021 06:59:07 - INFO - filelock - Lock 140533297462480 released on /content/drive/MyDrive/3_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 06:59:07,389 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:59:07,390 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:59:08 - INFO - filelock - Lock 140533264894992 acquired on /content/drive/MyDrive/3_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:59:08,087 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/vocab.txt not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_squeeae_QA_cache_dir/tmpehv57vvx\n","Downloading: 100% 232k/232k [00:00<00:00, 946kB/s] \n","[INFO|file_utils.py:1669] 2021-09-25 06:59:08,755 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/vocab.txt in cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b\n","[INFO|file_utils.py:1677] 2021-09-25 06:59:08,764 >> creating metadata file for /content/drive/MyDrive/3_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b\n","09/25/2021 06:59:08 - INFO - filelock - Lock 140533264894992 released on /content/drive/MyDrive/3_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b.lock\n","09/25/2021 06:59:09 - INFO - filelock - Lock 140533264894992 acquired on /content/drive/MyDrive/3_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:59:09,456 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/special_tokens_map.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_squeeae_QA_cache_dir/tmpd8pot6sq\n","Downloading: 100% 112/112 [00:00<00:00, 89.9kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:59:09,804 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/special_tokens_map.json in cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|file_utils.py:1677] 2021-09-25 06:59:09,807 >> creating metadata file for /content/drive/MyDrive/3_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","09/25/2021 06:59:09 - INFO - filelock - Lock 140533264894992 released on /content/drive/MyDrive/3_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:59:10,527 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/vocab.txt from cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:59:10,527 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:59:10,528 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/special_tokens_map.json from cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:59:10,528 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer_config.json from cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:59:10,528 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer.json from cache at None\n","[INFO|configuration_utils.py:561] 2021-09-25 06:59:10,871 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:59:10,871 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:59:11 - INFO - filelock - Lock 140533264891984 acquired on /content/drive/MyDrive/3_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:59:11,277 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_squeeae_QA_cache_dir/tmpk078f_hk\n","Downloading: 100% 204M/204M [00:05<00:00, 35.9MB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:59:17,056 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin in cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|file_utils.py:1677] 2021-09-25 06:59:17,059 >> creating metadata file for /content/drive/MyDrive/3_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","09/25/2021 06:59:17 - INFO - filelock - Lock 140533264891984 released on /content/drive/MyDrive/3_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e.lock\n","[INFO|modeling_utils.py:1279] 2021-09-25 06:59:17,063 >> loading weights file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin from cache at /content/drive/MyDrive/3_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:59:18,000 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:59:18,000 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at mrm8488/squeezebert-finetuned-squadv2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:59:20 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/3_squeeae_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=False, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='mrm8488/squeezebert-finetuned-squadv2', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=3.0, output_dir='/content/drive/MyDrive/3_squeeae_QA_cache_dir/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=300, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='mrm8488/squeezebert-finetuned-squadv2', train_file='/content/drive/MyDrive/Albert/albert-qa/qa.json', verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 06:59:20 - INFO - __main__ - Loading checkpoint mrm8488/squeezebert-finetuned-squadv2 for evaluation\n","09/25/2021 06:59:20 - INFO - __main__ - Evaluate the following checkpoints: ['mrm8488/squeezebert-finetuned-squadv2']\n","[INFO|configuration_utils.py:561] 2021-09-25 06:59:20,582 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:59:20,583 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","[INFO|modeling_utils.py:1279] 2021-09-25 06:59:20,928 >> loading weights file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin from cache at /root/.cache/huggingface/transformers/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:59:21,550 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:59:21,550 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at mrm8488/squeezebert-finetuned-squadv2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:59:21 - INFO - __main__ - Loading features from cached file ./cached_dev_squeezebert-finetuned-squadv2_384\n","09/25/2021 06:59:22 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 06:59:22 - INFO - __main__ -   Num examples = 637\n","09/25/2021 06:59:22 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 80/80 [00:23<00:00,  3.36it/s]\n","09/25/2021 06:59:46 - INFO - __main__ -   Evaluation done in total 23.801214 secs (0.037365 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 06:59:46,065 >> Writing predictions to: /content/drive/MyDrive/3_squeeae_QA_cache_dir/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 06:59:46,065 >> Writing nbest to: /content/drive/MyDrive/3_squeeae_QA_cache_dir/nbest_predictions_.json\n","09/25/2021 06:59:47 - INFO - __main__ - Results: {'exact': 4.739336492890995, 'f1': 31.57909317121808, 'total': 211, 'HasAns_exact': 4.739336492890995, 'HasAns_f1': 31.57909317121808, 'HasAns_total': 211, 'best_exact': 4.739336492890995, 'best_exact_thresh': 0.0, 'best_f1': 31.57909317121808, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"markdown","metadata":{"id":"LuOkYju-VeUd"},"source":["##2"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"be46_Mhc3Ma9","executionInfo":{"status":"ok","timestamp":1632553040381,"user_tz":-210,"elapsed":41433,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"bc329d85-a940-4430-eb37-ee5393cf6b90"},"source":["#base bert QA\n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path  \"/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/\"  \\\n","  --tokenizer_name \"/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/\"  \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 3.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 300 \\\n","  --cache_dir /content/drive/My\\Drive/2_squeeae_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/2_squeeae_QA_cache_dir/"],"execution_count":19,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 06:56:41 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","[INFO|configuration_utils.py:559] 2021-09-25 06:56:41,504 >> loading configuration file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:56:41,504 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"/home/inter/spoofing/checkpoint\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 06:56:41,982 >> Didn't find file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/added_tokens.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:56:41,984 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/vocab.txt\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:56:41,984 >> loading file None\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:56:41,984 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:56:41,984 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:56:41,984 >> loading file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/tokenizer.json\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:56:42,661 >> loading weights file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:56:48,636 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:56:48,636 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:56:50 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/2_squeeae_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=False, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=3.0, output_dir='/content/drive/MyDrive/2_squeeae_QA_cache_dir/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=300, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/', train_file=None, verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 06:56:50 - INFO - __main__ - Loading checkpoint /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/ for evaluation\n","09/25/2021 06:56:50 - INFO - __main__ - Evaluate the following checkpoints: ['/content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/']\n","[INFO|configuration_utils.py:559] 2021-09-25 06:56:50,827 >> loading configuration file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:56:50,828 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"/home/inter/spoofing/checkpoint\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:56:50,829 >> loading weights file /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:56:51,752 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:56:51,753 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/Squeeze/QA_Squeeze_Squad/squeeze-bert-squad-QA/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:56:51 - INFO - __main__ - Loading features from cached file ./cached_dev_squeeze-bert-squad-QA_384\n","09/25/2021 06:56:53 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 06:56:53 - INFO - __main__ -   Num examples = 637\n","09/25/2021 06:56:53 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 80/80 [00:23<00:00,  3.37it/s]\n","09/25/2021 06:57:16 - INFO - __main__ -   Evaluation done in total 23.761485 secs (0.037302 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 06:57:16,872 >> Writing predictions to: /content/drive/MyDrive/2_squeeae_QA_cache_dir/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 06:57:16,872 >> Writing nbest to: /content/drive/MyDrive/2_squeeae_QA_cache_dir/nbest_predictions_.json\n","09/25/2021 06:57:18 - INFO - __main__ - Results: {'exact': 3.7914691943127963, 'f1': 25.861355030166404, 'total': 211, 'HasAns_exact': 3.7914691943127963, 'HasAns_f1': 25.861355030166404, 'HasAns_total': 211, 'best_exact': 3.7914691943127963, 'best_exact_thresh': 0.0, 'best_f1': 25.861355030166404, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"markdown","metadata":{"id":"vafhsMMRVgwj"},"source":["##1"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"GwGzIrrtqdF_","executionInfo":{"status":"ok","timestamp":1632552375672,"user_tz":-210,"elapsed":54778,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"83c6a5fb-a403-46db-cba4-9ad5c9ac5d99"},"source":["#base bert QA\n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path  \"mrm8488/squeezebert-finetuned-squadv2\"  \\\n","  --tokenizer_name \"mrm8488/squeezebert-finetuned-squadv2\"  \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 3.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 300 \\\n","  --cache_dir /content/drive/My\\Drive/Eval_model/1_squeeae_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/Eval_model/1_squeeae_QA_cache_dir/"],"execution_count":14,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 06:45:22 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","09/25/2021 06:45:23 - INFO - filelock - Lock 140484865710928 acquired on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:23,357 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/tmpnxzzgeww\n","Downloading: 100% 666/666 [00:00<00:00, 599kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:45:23,704 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json in cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:23,708 >> creating metadata file for /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","09/25/2021 06:45:23 - INFO - filelock - Lock 140484865710928 released on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 06:45:23,714 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:45:23,714 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:45:24 - INFO - filelock - Lock 140484865730832 acquired on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:24,068 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer_config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/tmpig1wr1n2\n","Downloading: 100% 188/188 [00:00<00:00, 158kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:45:24,411 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer_config.json in cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:24,414 >> creating metadata file for /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38\n","09/25/2021 06:45:24 - INFO - filelock - Lock 140484865730832 released on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 06:45:24,765 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:45:24,766 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:45:25 - INFO - filelock - Lock 140484833066768 acquired on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:25,462 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/vocab.txt not found in cache or force_download set to True, downloading to /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/tmpvt53liou\n","Downloading: 100% 232k/232k [00:00<00:00, 951kB/s] \n","[INFO|file_utils.py:1669] 2021-09-25 06:45:26,133 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/vocab.txt in cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:26,136 >> creating metadata file for /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b\n","09/25/2021 06:45:26 - INFO - filelock - Lock 140484833066768 released on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b.lock\n","09/25/2021 06:45:26 - INFO - filelock - Lock 140484833066768 acquired on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:26,830 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/special_tokens_map.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/tmpkttkof2k\n","Downloading: 100% 112/112 [00:00<00:00, 106kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:45:27,174 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/special_tokens_map.json in cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:27,178 >> creating metadata file for /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","09/25/2021 06:45:27 - INFO - filelock - Lock 140484833066768 released on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:45:27,870 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/vocab.txt from cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/aaf4d77cef1b6a20755d05be771bbd388ba33f19a043640775eee97bcf1780da.3cb12d4c71324774a019cfab0a9c451fc3f8d26e837970c566dbb7b159d3307b\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:45:27,870 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:45:27,870 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/special_tokens_map.json from cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/a80da02707fbc2fce62b4dc2ceb68bd0f88945d62c88bf89ba2e156a9be55950.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:45:27,870 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer_config.json from cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/4c9d87d00497de76f29b98aef0637c36b4db06edc8e5af7c0cce278ee2398776.2800a3643006151b691faeb862dd05e50b8109d7cd9cb4a95ced6371b96e8a38\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 06:45:27,870 >> loading file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/tokenizer.json from cache at None\n","09/25/2021 06:45:28 - INFO - filelock - Lock 140484833109520 acquired on /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:28,302 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json not found in cache or force_download set to True, downloading to /root/.cache/huggingface/transformers/tmp_5fg5n9g\n","Downloading: 100% 666/666 [00:00<00:00, 566kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:45:28,645 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json in cache at /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:28,645 >> creating metadata file for /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","09/25/2021 06:45:28 - INFO - filelock - Lock 140484833109520 released on /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 06:45:28,646 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:45:28,647 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:45:29 - INFO - filelock - Lock 140484833065936 acquired on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:29,061 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin not found in cache or force_download set to True, downloading to /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/tmpn1bkm01r\n","Downloading: 100% 204M/204M [00:05<00:00, 34.8MB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:45:35,442 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin in cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:35,445 >> creating metadata file for /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","09/25/2021 06:45:35 - INFO - filelock - Lock 140484833065936 released on /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e.lock\n","[INFO|modeling_utils.py:1279] 2021-09-25 06:45:35,450 >> loading weights file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin from cache at /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:45:36,366 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:45:36,366 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at mrm8488/squeezebert-finetuned-squadv2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:45:38 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=False, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='mrm8488/squeezebert-finetuned-squadv2', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=3.0, output_dir='/content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=300, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='mrm8488/squeezebert-finetuned-squadv2', train_file=None, verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 06:45:38 - INFO - __main__ - Loading checkpoint mrm8488/squeezebert-finetuned-squadv2 for evaluation\n","09/25/2021 06:45:38 - INFO - __main__ - Evaluate the following checkpoints: ['mrm8488/squeezebert-finetuned-squadv2']\n","[INFO|configuration_utils.py:561] 2021-09-25 06:45:38,847 >> loading configuration file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/81829ace3486b780016a8edb498cdf1b0376afdd761e7cbc3c7f89657fdcaaeb.1a8ed41623b3a2d2d2e935a7075e6b97854e2dfaaa2d58e8c808a33bad06903f\n","[INFO|configuration_utils.py:598] 2021-09-25 06:45:38,848 >> Model config SqueezeBertConfig {\n","  \"_name_or_path\": \"squeezebert/squeezebert-uncased\",\n","  \"architectures\": [\n","    \"SqueezeBertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"embedding_size\": 768,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_groups\": 4,\n","  \"intermediate_size\": 3072,\n","  \"k_groups\": 4,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"squeezebert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_groups\": 4,\n","  \"pad_token_id\": 0,\n","  \"post_attention_groups\": 1,\n","  \"q_groups\": 4,\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"v_groups\": 4,\n","  \"vocab_size\": 30528\n","}\n","\n","09/25/2021 06:45:39 - INFO - filelock - Lock 140484817431184 acquired on /root/.cache/huggingface/transformers/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e.lock\n","[INFO|file_utils.py:1665] 2021-09-25 06:45:39,194 >> https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin not found in cache or force_download set to True, downloading to /root/.cache/huggingface/transformers/tmpe79iljnf\n","Downloading: 100% 204M/204M [00:06<00:00, 33.4MB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 06:45:45,857 >> storing https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin in cache at /root/.cache/huggingface/transformers/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|file_utils.py:1677] 2021-09-25 06:45:45,857 >> creating metadata file for /root/.cache/huggingface/transformers/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","09/25/2021 06:45:45 - INFO - filelock - Lock 140484817431184 released on /root/.cache/huggingface/transformers/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e.lock\n","[INFO|modeling_utils.py:1279] 2021-09-25 06:45:45,858 >> loading weights file https://huggingface.co/mrm8488/squeezebert-finetuned-squadv2/resolve/main/pytorch_model.bin from cache at /root/.cache/huggingface/transformers/5d42d069d43b251c73fb60a39219363c34d9327d2dc904a5f353cd6edb82d913.ac1b1b472e1d19138b9494e17896ff6fc9feb87c349abbd1beaa7ba819bed63e\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:45:46,605 >> All model checkpoint weights were used when initializing SqueezeBertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:45:46,605 >> All the weights of SqueezeBertForQuestionAnswering were initialized from the model checkpoint at mrm8488/squeezebert-finetuned-squadv2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use SqueezeBertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:45:46 - INFO - __main__ - Loading features from cached file ./cached_dev_squeezebert-finetuned-squadv2_384\n","09/25/2021 06:45:48 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 06:45:48 - INFO - __main__ -   Num examples = 637\n","09/25/2021 06:45:48 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 80/80 [00:23<00:00,  3.36it/s]\n","09/25/2021 06:46:11 - INFO - __main__ -   Evaluation done in total 23.826851 secs (0.037405 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 06:46:11,909 >> Writing predictions to: /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 06:46:11,909 >> Writing nbest to: /content/drive/MyDrive/Eval_model/1_squeeae_QA_cache_dir/nbest_predictions_.json\n","09/25/2021 06:46:13 - INFO - __main__ - Results: {'exact': 4.739336492890995, 'f1': 31.57909317121808, 'total': 211, 'HasAns_exact': 4.739336492890995, 'HasAns_f1': 31.57909317121808, 'HasAns_total': 211, 'best_exact': 4.739336492890995, 'best_exact_thresh': 0.0, 'best_f1': 31.57909317121808, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"markdown","metadata":{"id":"0geRhTQ5mRk7"},"source":["##base bert"]},{"cell_type":"markdown","metadata":{"id":"JHFOXWtvyYoZ"},"source":["##4"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"E3IJaYcnyaxw","executionInfo":{"status":"ok","timestamp":1632551220788,"user_tz":-210,"elapsed":214823,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"5a9ba72d-4034-401c-ede1-8734003e0263"},"source":["#base row \n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path   \"/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/\"  \\\n","  --tokenizer_name  \"/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/\"  \\\n","  --do_train \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --train_file /content/drive/My\\Drive/Albert/albert-qa/qa.json \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 2.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 1000 \\\n","  --cache_dir /content/drive/My\\Drive/Eval_model/4_base_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/Eval_model/4_base_QA__checkpoint/"],"execution_count":12,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 06:23:28 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","[INFO|configuration_utils.py:559] 2021-09-25 06:23:29,172 >> loading configuration file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:23:29,172 >> Model config BertConfig {\n","  \"_name_or_path\": \"/home/inter/spoofing/base-bert/output_dir/\",\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 30522\n","}\n","\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 06:23:29,640 >> Didn't find file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/added_tokens.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:23:29,644 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/vocab.txt\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:23:29,644 >> loading file None\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:23:29,644 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:23:29,644 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:23:29,644 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/tokenizer.json\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:23:30,731 >> loading weights file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:23:40,587 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:23:40,587 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:23:42 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/Eval_model/4_base_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=True, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=2.0, output_dir='/content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=1000, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/', train_file='/content/drive/MyDrive/Albert/albert-qa/qa.json', verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 06:23:42 - INFO - __main__ - Creating features from dataset file at .\n","100% 41/41 [00:00<00:00, 147.27it/s]\n","convert squad examples to features:   0% 0/211 [00:00<?, ?it/s][WARNING|squad.py:118] 2021-09-25 06:23:44,188 >> Could not find answer: '' vs. 'If you miss a dose of this medicine, apply it as soon as possible.However, if it is almost time for your next dose, skip the missed dose and go back to your regular dosing schedule.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:44,188 >> Could not find answer: '' vs. 'Store the medicine in a closed container at room temperature,away from heat, moisture, and direct light. Keep from freezing.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:44,397 >> Could not find answer: '' vs. 'Adults and children 12 years of age and over—Use once a week or as directed by your doctor. Children younger than 12 years of age—Use and dose must be determined by your doctor.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:44,642 >> Could not find answer: '' vs. 'Wet the area to be shaved. Apply a small amount of the shave cream and gently rub over entire area.'\n","convert squad examples to features:   0% 1/211 [00:01<05:21,  1.53s/it][WARNING|squad.py:118] 2021-09-25 06:23:44,877 >> Could not find answer: '' vs. 'Before applying, wash the affected area with a nonmedicated cleanser. Then rinse and pat dry. Using a circular motion, apply a thin layer of the mask evenly over the affected area.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,047 >> Could not find answer: '' vs. 'Swallow the tablet whole.Do not break, crush, or chew before swallowing.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,182 >> Could not find answer: '' vs. 'If you miss a dose of this medicine, take it as soon as possible. if it is almost time for your next dose, skip the missed dose and go back to your regular dosing schedule.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,479 >> Could not find answer: '' vs. 'Exalenz BreathID® non-invasive breath test is a diagnostic test that analyzes a breath sample before and after taking 13C-enriched urea to help identify patients with H. pylori infection.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,491 >> Could not find answer: '' vs. 'Do not eat for at least 1 hour before taking the mixed solution. If the mixed solution has large particles after mixing it for 5 minutes, do not use it and open a new kit.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,491 >> Could not find answer: '' vs. 'The dose of 14c urea will be different for different patients.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,491 >> Could not find answer: '' vs. 'The dose of 14c urea will be different for different patients.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,491 >> Could not find answer: '' vs. 'For best results, use this medicine at least 2 times a week or as directed by your doctor.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:45,635 >> Could not find answer: '' vs. 'The dose of this medicine will be different for different patients.Follow your doctor's orders or the directions on the label. The following information includes only the average doses of this medicine.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:46,099 >> Could not find answer: '' vs. 'Adults—100 milligrams (mg) once a day. Children 2 to 17 years of age—Dose is based on body weight and must be determined by your doctor.'\n","convert squad examples to features:  16% 33/211 [00:03<00:13, 12.79it/s][WARNING|squad.py:118] 2021-09-25 06:23:46,554 >> Could not find answer: '' vs. 'Store the medicine in a closed container at room temperature, away from heat, moisture, and direct light. Keep from freezing. Keep out of the reach of children.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:46,568 >> Could not find answer: '' vs. 'Usual Adult Dose for Hepatocellular Carcinoma: Tablets: 60 mg orally once a day until patient no longer experiences clinical benefit or unacceptable toxicity occurs'\n","[WARNING|squad.py:118] 2021-09-25 06:23:46,568 >> Could not find answer: '' vs. 'treated with sorafenib Detailed Cabometyx dosage information'\n","[WARNING|squad.py:118] 2021-09-25 06:23:47,240 >> Could not find answer: '' vs. 'Do not use two forms of clonidine at the same time. Do not crush, chew, or break an extended-release tablet.'\n","convert squad examples to features:  31% 65/211 [00:04<00:08, 17.61it/s][WARNING|squad.py:118] 2021-09-25 06:23:49,112 >> Could not find answer: '' vs. 'Since Nucynta is used for pain, you are not likely to miss a dose. Skip any missed dose if it is almost time for your next scheduled dose. Do not take extra medicine to make up the missed dose. Do not take extra medicine to make up a missed dose. Do not take more than your prescribed dose in a 24-hour period.'\n","convert squad examples to features:  61% 129/211 [00:08<00:04, 18.64it/s][WARNING|squad.py:118] 2021-09-25 06:23:51,389 >> Could not find answer: '' vs. 'nausea, vomiting, diarrhea; skin rash; anemia (low red blood cells); or headache, dizziness. This is not a complete list of side effects and others may occur.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:51,390 >> Could not find answer: '' vs. 'Get emergency medical help if you have signs of an allergic reaction to Zyvox (hives, difficult breathing, swelling in your face or throat) or a severe skin reaction (fever, sore throat, burning eyes, skin pain, red or purple skin rash with blistering and peeling) vision problems, changes in color vision; severe stomach pain, diarrhea that is watery or bloody; a seizure; sweating, feeling anxious or shaky (may be signs of low blood sugar); high levels of serotonin in the body - agitation, hallucinations, fever, sweating, shivering, fast heart rate, muscle stiffness, twitching, loss of coordination, nausea, vomiting, diarrhea; lactic acidosis - unusual muscle pain, trouble breathing, stomach pain, vomiting, irregular heart rate, dizziness, feeling cold, or feeling very weak or tired; orlow blood cell counts - fever, chills, tiredness, weakness, confusion, mouth sores, skin sores, easy bruising, unusual bleeding, pale skin, cold hands and feet, feeling light-headed or short of breath'\n","[WARNING|squad.py:118] 2021-09-25 06:23:51,560 >> Could not find answer: '' vs. 'liver disease; heart problems, high blood pressure; a heart attack; low levels of potassium in your blood; or problems with your adrenal gland or pituitary gland.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:51,764 >> Could not find answer: '' vs. 'swelling in your ankles or feet, pain in your legs; shortness of breath; pain or burning when you urinate, blood in your urine; fast heartbeats; headache, confusion; a light-headed feeling, like you might pass out; muscle weakness; orliver problems - stomach pain (upper right side), nausea, vomiting, dark urine, jaundice (yellowing of the skin or eyes)'\n","[WARNING|squad.py:118] 2021-09-25 06:23:51,765 >> Could not find answer: '' vs. 'indigestion, vomiting, diarrhea, constipation; painful or difficult urination; swelling in your legs or feet; feeling weak, feeling very hot; muscle pain; abnormal blood tests; joint pain or swelling; bruising; or cold symptoms such as stuffy nose, sneezing, cough, sore throat.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:51,958 >> Could not find answer: '' vs. 'tell your doctor if you have ever had: liver disease; heart disease, high or low blood pressure; high cholesterol or triglycerides; a stroke, including \"mini-stroke\"; breast cancer; a seizure; Alzheimer's disease; diabetes or high blood sugar; an enlarged prostate; bowel problems; or narrow-angle glaucoma.'\n","[WARNING|squad.py:118] 2021-09-25 06:23:52,178 >> Could not find answer: '' vs. 'weight gain (more likely in teenagers), increased appetite; headache, dizziness, drowsiness, feeling tired or restless; problems with speech or memory; tremors or shaking, numbness or tingly feeling; changes in personality; dry mouth, or increased salivation; stomach pain, constipation; or pain in your arms or legs.'\n","convert squad examples to features:  76% 161/211 [00:09<00:02, 21.77it/s][WARNING|squad.py:118] 2021-09-25 06:23:52,992 >> Could not find answer: '' vs. 'mild skin pain; rash, itching; nausea, vomiting, diarrhea; headache'\n","convert squad examples to features: 100% 211/211 [00:09<00:00, 21.36it/s]\n","add example index and unique id: 100% 211/211 [00:00<00:00, 441836.32it/s]\n","09/25/2021 06:23:53 - INFO - __main__ - Saving features into cached file ./cached_train_base_bert_QA_Final_384\n","09/25/2021 06:23:54 - INFO - __main__ - ***** Running training *****\n","09/25/2021 06:23:54 - INFO - __main__ -   Num examples = 551\n","09/25/2021 06:23:54 - INFO - __main__ -   Num Epochs = 2\n","09/25/2021 06:23:54 - INFO - __main__ -   Instantaneous batch size per GPU = 12\n","09/25/2021 06:23:54 - INFO - __main__ -   Total train batch size (w. parallel, distributed & accumulation) = 12\n","09/25/2021 06:23:54 - INFO - __main__ -   Gradient Accumulation steps = 1\n","09/25/2021 06:23:54 - INFO - __main__ -   Total optimization steps = 92\n","09/25/2021 06:23:54 - INFO - __main__ -   Starting fine-tuning.\n","Epoch:   0% 0/2 [00:00<?, ?it/s]\n","Iteration:   0% 0/46 [00:00<?, ?it/s]\u001b[A\n","Iteration:   2% 1/46 [00:01<01:18,  1.75s/it]\u001b[A\n","Iteration:   4% 2/46 [00:03<01:12,  1.66s/it]\u001b[A\n","Iteration:   7% 3/46 [00:04<01:09,  1.62s/it]\u001b[A\n","Iteration:   9% 4/46 [00:06<01:06,  1.59s/it]\u001b[A\n","Iteration:  11% 5/46 [00:08<01:04,  1.58s/it]\u001b[A\n","Iteration:  13% 6/46 [00:09<01:03,  1.58s/it]\u001b[A\n","Iteration:  15% 7/46 [00:11<01:01,  1.57s/it]\u001b[A\n","Iteration:  17% 8/46 [00:12<00:59,  1.57s/it]\u001b[A\n","Iteration:  20% 9/46 [00:14<00:58,  1.57s/it]\u001b[A\n","Iteration:  22% 10/46 [00:15<00:56,  1.57s/it]\u001b[A\n","Iteration:  24% 11/46 [00:17<00:54,  1.57s/it]\u001b[A\n","Iteration:  26% 12/46 [00:19<00:53,  1.57s/it]\u001b[A\n","Iteration:  28% 13/46 [00:20<00:51,  1.57s/it]\u001b[A\n","Iteration:  30% 14/46 [00:22<00:50,  1.57s/it]\u001b[A\n","Iteration:  33% 15/46 [00:23<00:48,  1.57s/it]\u001b[A\n","Iteration:  35% 16/46 [00:25<00:47,  1.57s/it]\u001b[A\n","Iteration:  37% 17/46 [00:26<00:45,  1.57s/it]\u001b[A\n","Iteration:  39% 18/46 [00:28<00:43,  1.57s/it]\u001b[A\n","Iteration:  41% 19/46 [00:29<00:42,  1.57s/it]\u001b[A\n","Iteration:  43% 20/46 [00:31<00:40,  1.57s/it]\u001b[A\n","Iteration:  46% 21/46 [00:33<00:39,  1.57s/it]\u001b[A\n","Iteration:  48% 22/46 [00:34<00:37,  1.57s/it]\u001b[A\n","Iteration:  50% 23/46 [00:36<00:36,  1.57s/it]\u001b[A\n","Iteration:  52% 24/46 [00:37<00:34,  1.57s/it]\u001b[A\n","Iteration:  54% 25/46 [00:39<00:33,  1.58s/it]\u001b[A\n","Iteration:  57% 26/46 [00:41<00:31,  1.58s/it]\u001b[A\n","Iteration:  59% 27/46 [00:42<00:29,  1.58s/it]\u001b[A\n","Iteration:  61% 28/46 [00:44<00:28,  1.58s/it]\u001b[A\n","Iteration:  63% 29/46 [00:45<00:26,  1.58s/it]\u001b[A\n","Iteration:  65% 30/46 [00:47<00:25,  1.58s/it]\u001b[A\n","Iteration:  67% 31/46 [00:48<00:23,  1.58s/it]\u001b[A\n","Iteration:  70% 32/46 [00:50<00:22,  1.58s/it]\u001b[A\n","Iteration:  72% 33/46 [00:52<00:20,  1.58s/it]\u001b[A\n","Iteration:  74% 34/46 [00:53<00:18,  1.58s/it]\u001b[A\n","Iteration:  76% 35/46 [00:55<00:17,  1.58s/it]\u001b[A\n","Iteration:  78% 36/46 [00:56<00:15,  1.58s/it]\u001b[A\n","Iteration:  80% 37/46 [00:58<00:14,  1.58s/it]\u001b[A\n","Iteration:  83% 38/46 [01:00<00:12,  1.58s/it]\u001b[A\n","Iteration:  85% 39/46 [01:01<00:11,  1.58s/it]\u001b[A\n","Iteration:  87% 40/46 [01:03<00:09,  1.58s/it]\u001b[A\n","Iteration:  89% 41/46 [01:04<00:07,  1.58s/it]\u001b[A\n","Iteration:  91% 42/46 [01:06<00:06,  1.58s/it]\u001b[A\n","Iteration:  93% 43/46 [01:07<00:04,  1.58s/it]\u001b[A\n","Iteration:  96% 44/46 [01:09<00:03,  1.59s/it]\u001b[A\n","Iteration:  98% 45/46 [01:11<00:01,  1.58s/it]\u001b[A\n","Iteration: 100% 46/46 [01:12<00:00,  1.58s/it]\n","Epoch:  50% 1/2 [01:12<01:12, 72.55s/it]\n","Iteration:   0% 0/46 [00:00<?, ?it/s]\u001b[A\n","Iteration:   2% 1/46 [00:01<01:10,  1.57s/it]\u001b[A\n","Iteration:   4% 2/46 [00:03<01:09,  1.58s/it]\u001b[A\n","Iteration:   7% 3/46 [00:04<01:08,  1.58s/it]\u001b[A\n","Iteration:   9% 4/46 [00:06<01:06,  1.59s/it]\u001b[A\n","Iteration:  11% 5/46 [00:07<01:04,  1.58s/it]\u001b[A\n","Iteration:  13% 6/46 [00:09<01:03,  1.59s/it]\u001b[A\n","Iteration:  15% 7/46 [00:11<01:01,  1.58s/it]\u001b[A\n","Iteration:  17% 8/46 [00:12<01:00,  1.59s/it]\u001b[A\n","Iteration:  20% 9/46 [00:14<00:58,  1.59s/it]\u001b[A\n","Iteration:  22% 10/46 [00:15<00:57,  1.58s/it]\u001b[A\n","Iteration:  24% 11/46 [00:17<00:55,  1.59s/it]\u001b[A\n","Iteration:  26% 12/46 [00:19<00:53,  1.59s/it]\u001b[A\n","Iteration:  28% 13/46 [00:20<00:52,  1.59s/it]\u001b[A\n","Iteration:  30% 14/46 [00:22<00:50,  1.59s/it]\u001b[A\n","Iteration:  33% 15/46 [00:23<00:49,  1.59s/it]\u001b[A\n","Iteration:  35% 16/46 [00:25<00:47,  1.59s/it]\u001b[A\n","Iteration:  37% 17/46 [00:26<00:46,  1.59s/it]\u001b[A\n","Iteration:  39% 18/46 [00:28<00:44,  1.59s/it]\u001b[A\n","Iteration:  41% 19/46 [00:30<00:42,  1.59s/it]\u001b[A\n","Iteration:  43% 20/46 [00:31<00:41,  1.59s/it]\u001b[A\n","Iteration:  46% 21/46 [00:33<00:39,  1.58s/it]\u001b[A\n","Iteration:  48% 22/46 [00:34<00:38,  1.58s/it]\u001b[A\n","Iteration:  50% 23/46 [00:36<00:36,  1.58s/it]\u001b[A\n","Iteration:  52% 24/46 [00:38<00:34,  1.59s/it]\u001b[A\n","Iteration:  54% 25/46 [00:39<00:33,  1.58s/it]\u001b[A\n","Iteration:  57% 26/46 [00:41<00:31,  1.59s/it]\u001b[A\n","Iteration:  59% 27/46 [00:42<00:30,  1.59s/it]\u001b[A\n","Iteration:  61% 28/46 [00:44<00:28,  1.59s/it]\u001b[A\n","Iteration:  63% 29/46 [00:45<00:26,  1.59s/it]\u001b[A\n","Iteration:  65% 30/46 [00:47<00:25,  1.59s/it]\u001b[A\n","Iteration:  67% 31/46 [00:49<00:23,  1.59s/it]\u001b[A\n","Iteration:  70% 32/46 [00:50<00:22,  1.59s/it]\u001b[A\n","Iteration:  72% 33/46 [00:52<00:20,  1.58s/it]\u001b[A\n","Iteration:  74% 34/46 [00:53<00:19,  1.58s/it]\u001b[A\n","Iteration:  76% 35/46 [00:55<00:17,  1.58s/it]\u001b[A\n","Iteration:  78% 36/46 [00:57<00:15,  1.59s/it]\u001b[A\n","Iteration:  80% 37/46 [00:58<00:14,  1.59s/it]\u001b[A\n","Iteration:  83% 38/46 [01:00<00:12,  1.59s/it]\u001b[A\n","Iteration:  85% 39/46 [01:01<00:11,  1.59s/it]\u001b[A\n","Iteration:  87% 40/46 [01:03<00:09,  1.59s/it]\u001b[A\n","Iteration:  89% 41/46 [01:05<00:07,  1.59s/it]\u001b[A\n","Iteration:  91% 42/46 [01:06<00:06,  1.59s/it]\u001b[A\n","Iteration:  93% 43/46 [01:08<00:04,  1.59s/it]\u001b[A\n","Iteration:  96% 44/46 [01:09<00:03,  1.59s/it]\u001b[A\n","Iteration:  98% 45/46 [01:11<00:01,  1.59s/it]\u001b[A\n","Iteration: 100% 46/46 [01:12<00:00,  1.58s/it]\n","Epoch: 100% 2/2 [02:25<00:00, 72.70s/it]\n","09/25/2021 06:26:19 - INFO - __main__ -  global_step = 93, average loss = 1.257593150260628\n","09/25/2021 06:26:19 - INFO - __main__ - Saving model checkpoint to /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/\n","[INFO|configuration_utils.py:391] 2021-09-25 06:26:19,528 >> Configuration saved in /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/config.json\n","[INFO|modeling_utils.py:1001] 2021-09-25 06:26:21,338 >> Model weights saved in /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/pytorch_model.bin\n","[INFO|tokenization_utils_base.py:2020] 2021-09-25 06:26:21,344 >> tokenizer config file saved in /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:2026] 2021-09-25 06:26:21,350 >> Special tokens file saved in /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/special_tokens_map.json\n","[INFO|configuration_utils.py:559] 2021-09-25 06:26:21,386 >> loading configuration file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:26:21,387 >> Model config BertConfig {\n","  \"_name_or_path\": \"/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/\",\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 30522\n","}\n","\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:26:21,388 >> loading weights file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:26:23,051 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:26:23,051 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 06:26:23,057 >> Didn't find file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/added_tokens.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 06:26:23,057 >> Didn't find file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/tokenizer.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:26:23,058 >> loading file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/vocab.txt\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:26:23,058 >> loading file None\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:26:23,058 >> loading file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:26:23,058 >> loading file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:26:23,058 >> loading file None\n","09/25/2021 06:26:23 - INFO - __main__ - Loading checkpoints saved during training for evaluation\n","09/25/2021 06:26:23 - INFO - __main__ - Evaluate the following checkpoints: ['/content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/']\n","[INFO|configuration_utils.py:559] 2021-09-25 06:26:23,412 >> loading configuration file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:26:23,413 >> Model config BertConfig {\n","  \"_name_or_path\": \"/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/\",\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 30522\n","}\n","\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:26:23,414 >> loading weights file /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:26:25,042 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:26:25,043 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:26:25 - INFO - __main__ - Loading features from cached file ./cached_dev_base_bert_QA_Final_384\n","09/25/2021 06:26:26 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 06:26:26 - INFO - __main__ -   Num examples = 637\n","09/25/2021 06:26:26 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 80/80 [00:29<00:00,  2.69it/s]\n","09/25/2021 06:26:56 - INFO - __main__ -   Evaluation done in total 29.734553 secs (0.046679 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 06:26:56,587 >> Writing predictions to: /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 06:26:56,587 >> Writing nbest to: /content/drive/MyDrive/Eval_model/4_base_QA__checkpoint/nbest_predictions_.json\n","09/25/2021 06:26:58 - INFO - __main__ - Results: {'exact': 45.497630331753555, 'f1': 70.89349870082565, 'total': 211, 'HasAns_exact': 45.497630331753555, 'HasAns_f1': 70.89349870082565, 'HasAns_total': 211, 'best_exact': 45.497630331753555, 'best_exact_thresh': 0.0, 'best_f1': 70.89349870082565, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"markdown","metadata":{"id":"FngEAfanx34W"},"source":["##3"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"UEe0yodNx5Oo","executionInfo":{"status":"ok","timestamp":1632549536397,"user_tz":-210,"elapsed":60609,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"e4aae69b-0b0d-4543-ad71-473bb7ec0e24"},"source":["#base bert QA\n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path  deepset/bert-base-cased-squad2   \\\n","  --tokenizer_name deepset/bert-base-cased-squad2   \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --train_file /content/drive/My\\Drive/Albert/albert-qa/qa.json \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 3.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 1000 \\\n","  --cache_dir /content/drive/My\\Drive/Eval_model/3_base_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/Eval_model/3_base_QA__checkpoint/"],"execution_count":15,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 05:57:57 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","09/25/2021 05:57:57 - INFO - filelock - Lock 140075666840208 acquired on /content/drive/MyDrive/3_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:57:57,937 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_base_QA_cache_dir/tmpyw63420s\n","Downloading: 100% 508/508 [00:00<00:00, 412kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:57:58,283 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json in cache at /content/drive/MyDrive/3_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|file_utils.py:1677] 2021-09-25 05:57:58,286 >> creating metadata file for /content/drive/MyDrive/3_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","09/25/2021 05:57:58 - INFO - filelock - Lock 140075666840208 released on /content/drive/MyDrive/3_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 05:57:58,292 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /content/drive/MyDrive/3_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:57:58,293 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:57:58 - INFO - filelock - Lock 140075666821840 acquired on /content/drive/MyDrive/3_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:57:58,650 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer_config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_base_QA_cache_dir/tmpltie0z84\n","Downloading: 100% 152/152 [00:00<00:00, 107kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:57:58,994 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer_config.json in cache at /content/drive/MyDrive/3_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11\n","[INFO|file_utils.py:1677] 2021-09-25 05:57:58,997 >> creating metadata file for /content/drive/MyDrive/3_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11\n","09/25/2021 05:57:59 - INFO - filelock - Lock 140075666821840 released on /content/drive/MyDrive/3_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 05:57:59,349 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /content/drive/MyDrive/3_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:57:59,350 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:58:00 - INFO - filelock - Lock 140075666821904 acquired on /content/drive/MyDrive/3_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:58:00,066 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/vocab.txt not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_base_QA_cache_dir/tmpn07ic8cx\n","Downloading: 100% 213k/213k [00:00<00:00, 869kB/s] \n","[INFO|file_utils.py:1669] 2021-09-25 05:58:00,740 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/vocab.txt in cache at /content/drive/MyDrive/3_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791\n","[INFO|file_utils.py:1677] 2021-09-25 05:58:00,743 >> creating metadata file for /content/drive/MyDrive/3_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791\n","09/25/2021 05:58:00 - INFO - filelock - Lock 140075666821904 released on /content/drive/MyDrive/3_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791.lock\n","09/25/2021 05:58:01 - INFO - filelock - Lock 140075634190864 acquired on /content/drive/MyDrive/3_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:58:01,452 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/special_tokens_map.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_base_QA_cache_dir/tmpbyuuzboh\n","Downloading: 100% 112/112 [00:00<00:00, 97.2kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:58:01,802 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/special_tokens_map.json in cache at /content/drive/MyDrive/3_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|file_utils.py:1677] 2021-09-25 05:58:01,807 >> creating metadata file for /content/drive/MyDrive/3_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","09/25/2021 05:58:01 - INFO - filelock - Lock 140075634190864 released on /content/drive/MyDrive/3_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:58:02,524 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/vocab.txt from cache at /content/drive/MyDrive/3_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:58:02,524 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:58:02,524 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/special_tokens_map.json from cache at /content/drive/MyDrive/3_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:58:02,524 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer_config.json from cache at /content/drive/MyDrive/3_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:58:02,525 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer.json from cache at None\n","[INFO|configuration_utils.py:561] 2021-09-25 05:58:02,870 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:58:02,871 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:58:03 - INFO - filelock - Lock 140075613576848 acquired on /content/drive/MyDrive/3_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:58:03,277 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin not found in cache or force_download set to True, downloading to /content/drive/MyDrive/3_base_QA_cache_dir/tmp29o7u5sw\n","Downloading: 100% 433M/433M [00:11<00:00, 38.6MB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:58:14,551 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin in cache at /content/drive/MyDrive/3_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|file_utils.py:1677] 2021-09-25 05:58:14,557 >> creating metadata file for /content/drive/MyDrive/3_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","09/25/2021 05:58:14 - INFO - filelock - Lock 140075613576848 released on /content/drive/MyDrive/3_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188.lock\n","[INFO|modeling_utils.py:1279] 2021-09-25 05:58:14,561 >> loading weights file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin from cache at /content/drive/MyDrive/3_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|modeling_utils.py:1524] 2021-09-25 05:58:16,327 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 05:58:16,327 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at deepset/bert-base-cased-squad2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 05:58:18 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/3_base_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=False, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='deepset/bert-base-cased-squad2', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=3.0, output_dir='/content/drive/MyDrive/3_base_QA__checkpoint/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=1000, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='deepset/bert-base-cased-squad2', train_file='/content/drive/MyDrive/Albert/albert-qa/qa.json', verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 05:58:18 - INFO - __main__ - Loading checkpoint deepset/bert-base-cased-squad2 for evaluation\n","09/25/2021 05:58:18 - INFO - __main__ - Evaluate the following checkpoints: ['deepset/bert-base-cased-squad2']\n","[INFO|configuration_utils.py:561] 2021-09-25 05:58:19,003 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:58:19,003 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","[INFO|modeling_utils.py:1279] 2021-09-25 05:58:19,357 >> loading weights file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin from cache at /root/.cache/huggingface/transformers/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|modeling_utils.py:1524] 2021-09-25 05:58:20,628 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 05:58:20,628 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at deepset/bert-base-cased-squad2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 05:58:20 - INFO - __main__ - Loading features from cached file ./cached_dev_bert-base-cased-squad2_384\n","09/25/2021 05:58:21 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 05:58:21 - INFO - __main__ -   Num examples = 674\n","09/25/2021 05:58:21 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 85/85 [00:31<00:00,  2.72it/s]\n","09/25/2021 05:58:52 - INFO - __main__ -   Evaluation done in total 31.209880 secs (0.046305 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 05:58:52,723 >> Writing predictions to: /content/drive/MyDrive/3_base_QA__checkpoint/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 05:58:52,723 >> Writing nbest to: /content/drive/MyDrive/3_base_QA__checkpoint/nbest_predictions_.json\n","09/25/2021 05:58:54 - INFO - __main__ - Results: {'exact': 5.687203791469194, 'f1': 31.57154563090946, 'total': 211, 'HasAns_exact': 5.687203791469194, 'HasAns_f1': 31.57154563090946, 'HasAns_total': 211, 'best_exact': 5.687203791469194, 'best_exact_thresh': 0.0, 'best_f1': 31.57154563090946, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"markdown","metadata":{"id":"D78R0swGwZNG"},"source":["##2"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"4PbUFOn0wcDP","executionInfo":{"status":"ok","timestamp":1632551264550,"user_tz":-210,"elapsed":41936,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"d8bf168a-70c9-49aa-c82b-e7c5d50f626d"},"source":["#base bert QA\n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path   \"/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/\"    \\\n","  --tokenizer_name  \"/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/\"   \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 3.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 1000 \\\n","  --cache_dir /content/drive/My\\Drive/Eval_model/2_base_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/Eval_model/2_base_QA__checkpoint/"],"execution_count":13,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 06:27:04 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","[INFO|configuration_utils.py:559] 2021-09-25 06:27:04,414 >> loading configuration file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:27:04,415 >> Model config BertConfig {\n","  \"_name_or_path\": \"/home/inter/spoofing/base-bert/output_dir/\",\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 30522\n","}\n","\n","[INFO|tokenization_utils_base.py:1669] 2021-09-25 06:27:04,419 >> Didn't find file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/added_tokens.json. We won't load it.\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:27:04,423 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/vocab.txt\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:27:04,423 >> loading file None\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:27:04,423 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/special_tokens_map.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:27:04,423 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/tokenizer_config.json\n","[INFO|tokenization_utils_base.py:1737] 2021-09-25 06:27:04,423 >> loading file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/tokenizer.json\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:27:04,475 >> loading weights file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:27:06,370 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:27:06,371 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:27:08 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/Eval_model/2_base_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=False, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=3.0, output_dir='/content/drive/MyDrive/Eval_model/2_base_QA__checkpoint/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=1000, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/', train_file=None, verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 06:27:08 - INFO - __main__ - Loading checkpoint /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/ for evaluation\n","09/25/2021 06:27:08 - INFO - __main__ - Evaluate the following checkpoints: ['/content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/']\n","[INFO|configuration_utils.py:559] 2021-09-25 06:27:08,582 >> loading configuration file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/config.json\n","[INFO|configuration_utils.py:598] 2021-09-25 06:27:08,582 >> Model config BertConfig {\n","  \"_name_or_path\": \"/home/inter/spoofing/base-bert/output_dir/\",\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"torch_dtype\": \"float32\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 30522\n","}\n","\n","[INFO|modeling_utils.py:1277] 2021-09-25 06:27:08,584 >> loading weights file /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/pytorch_model.bin\n","[INFO|modeling_utils.py:1524] 2021-09-25 06:27:10,388 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 06:27:10,388 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at /content/drive/MyDrive/base_bert/QA_base_bert/base_bert_QA_Final/.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 06:27:10 - INFO - __main__ - Loading features from cached file ./cached_dev_base_bert_QA_Final_384\n","09/25/2021 06:27:11 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 06:27:11 - INFO - __main__ -   Num examples = 637\n","09/25/2021 06:27:11 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 80/80 [00:29<00:00,  2.70it/s]\n","09/25/2021 06:27:40 - INFO - __main__ -   Evaluation done in total 29.638865 secs (0.046529 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 06:27:40,992 >> Writing predictions to: /content/drive/MyDrive/Eval_model/2_base_QA__checkpoint/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 06:27:40,992 >> Writing nbest to: /content/drive/MyDrive/Eval_model/2_base_QA__checkpoint/nbest_predictions_.json\n","09/25/2021 06:27:42 - INFO - __main__ - Results: {'exact': 10.42654028436019, 'f1': 38.48925966485835, 'total': 211, 'HasAns_exact': 10.42654028436019, 'HasAns_f1': 38.48925966485835, 'HasAns_total': 211, 'best_exact': 10.42654028436019, 'best_exact_thresh': 0.0, 'best_f1': 38.48925966485835, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"markdown","metadata":{"id":"gZefF0HXwW1G"},"source":["##1"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"rNDlK93li9eA","executionInfo":{"status":"ok","timestamp":1632549449753,"user_tz":-210,"elapsed":86301,"user":{"displayName":"zahra nafarieh","photoUrl":"https://lh3.googleusercontent.com/a/default-user=s64","userId":"05175754217722450138"}},"outputId":"7b247290-84dc-4d40-a4b1-a8b03cf77260"},"source":["#base bert QA\n","\n","!python run_squad.py \\\n","  --model_type bert \\\n","  --model_name_or_path  deepset/bert-base-cased-squad2 \\\n","  --tokenizer_name  deepset/bert-base-cased-squad2 \\\n","  --do_eval \\\n","  --do_lower_case \\\n","  --predict_file /content/drive/My\\Drive/Dataset/dev_qa.json \\\n","  --per_gpu_train_batch_size 12 \\\n","  --learning_rate 3e-5 \\\n","  --num_train_epochs 3.0 \\\n","  --max_seq_length 384 \\\n","  --doc_stride 128 \\\n","  --save_steps 1000 \\\n","  --cache_dir /content/drive/My\\Drive/Eval_model/1_base_QA_cache_dir/ \\\n","  --output_dir /content/drive/My\\Drive/Eval_model/1_base_QA__checkpoint/"],"execution_count":13,"outputs":[{"output_type":"stream","name":"stdout","text":["09/25/2021 05:56:09 - WARNING - __main__ - Process rank: -1, device: cuda, n_gpu: 1, distributed training: False, 16-bits training: False\n","09/25/2021 05:56:09 - INFO - filelock - Lock 139812925106768 acquired on /content/drive/MyDrive/1_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:09,992 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/1_base_QA_cache_dir/tmpdbd_6nq5\n","Downloading: 100% 508/508 [00:00<00:00, 441kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:56:10,337 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json in cache at /content/drive/MyDrive/1_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:10,341 >> creating metadata file for /content/drive/MyDrive/1_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","09/25/2021 05:56:10 - INFO - filelock - Lock 139812925106768 released on /content/drive/MyDrive/1_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 05:56:10,348 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /content/drive/MyDrive/1_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:56:10,349 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:56:10 - INFO - filelock - Lock 139812925017232 acquired on /content/drive/MyDrive/1_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:10,698 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer_config.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/1_base_QA_cache_dir/tmpl1w0vw10\n","Downloading: 100% 152/152 [00:00<00:00, 131kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:56:11,049 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer_config.json in cache at /content/drive/MyDrive/1_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:11,053 >> creating metadata file for /content/drive/MyDrive/1_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11\n","09/25/2021 05:56:11 - INFO - filelock - Lock 139812925017232 released on /content/drive/MyDrive/1_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 05:56:11,406 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /content/drive/MyDrive/1_base_QA_cache_dir/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:56:11,407 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:56:12 - INFO - filelock - Lock 139812892331856 acquired on /content/drive/MyDrive/1_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:12,102 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/vocab.txt not found in cache or force_download set to True, downloading to /content/drive/MyDrive/1_base_QA_cache_dir/tmpkf45sn1g\n","Downloading: 100% 213k/213k [00:00<00:00, 871kB/s] \n","[INFO|file_utils.py:1669] 2021-09-25 05:56:12,772 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/vocab.txt in cache at /content/drive/MyDrive/1_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:12,775 >> creating metadata file for /content/drive/MyDrive/1_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791\n","09/25/2021 05:56:12 - INFO - filelock - Lock 139812892331856 released on /content/drive/MyDrive/1_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791.lock\n","09/25/2021 05:56:13 - INFO - filelock - Lock 139812892449296 acquired on /content/drive/MyDrive/1_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:13,489 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/special_tokens_map.json not found in cache or force_download set to True, downloading to /content/drive/MyDrive/1_base_QA_cache_dir/tmpvv1odiap\n","Downloading: 100% 112/112 [00:00<00:00, 81.3kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:56:13,833 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/special_tokens_map.json in cache at /content/drive/MyDrive/1_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:13,836 >> creating metadata file for /content/drive/MyDrive/1_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","09/25/2021 05:56:13 - INFO - filelock - Lock 139812892449296 released on /content/drive/MyDrive/1_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d.lock\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:56:14,548 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/vocab.txt from cache at /content/drive/MyDrive/1_base_QA_cache_dir/a027c4e547fd30e501f9edb04ed6401edefe7eede664b9528d4babaf78d1bda6.437aa611e89f6fc6675a049d2b5545390adbc617e7d655286421c191d2be2791\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:56:14,548 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/added_tokens.json from cache at None\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:56:14,548 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/special_tokens_map.json from cache at /content/drive/MyDrive/1_base_QA_cache_dir/5fa07cc35cf92053100af63a5b23424ba428c75dafc83de837f7c2bd5118a8b1.dd8bd9bfd3664b530ea4e645105f557769387b3da9f79bdb55ed556bdd80611d\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:56:14,548 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer_config.json from cache at /content/drive/MyDrive/1_base_QA_cache_dir/8d45cf43007a2f83a66ff292adf10e02ae1859acd064791f6b6417f7e528b1f3.3e813ef7b46a58d7e35c90b0aacc2127a3800bba6bff791af1651012cf2fab11\n","[INFO|tokenization_utils_base.py:1739] 2021-09-25 05:56:14,549 >> loading file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/tokenizer.json from cache at None\n","09/25/2021 05:56:14 - INFO - filelock - Lock 139812892475344 acquired on /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:14,897 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json not found in cache or force_download set to True, downloading to /root/.cache/huggingface/transformers/tmph1d7opv0\n","Downloading: 100% 508/508 [00:00<00:00, 384kB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:56:15,239 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json in cache at /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:15,239 >> creating metadata file for /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","09/25/2021 05:56:15 - INFO - filelock - Lock 139812892475344 released on /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727.lock\n","[INFO|configuration_utils.py:561] 2021-09-25 05:56:15,240 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:56:15,240 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:56:15 - INFO - filelock - Lock 139812892471888 acquired on /content/drive/MyDrive/1_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:15,646 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin not found in cache or force_download set to True, downloading to /content/drive/MyDrive/1_base_QA_cache_dir/tmpy4g4xnh7\n","Downloading: 100% 433M/433M [00:11<00:00, 39.2MB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:56:26,773 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin in cache at /content/drive/MyDrive/1_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:26,780 >> creating metadata file for /content/drive/MyDrive/1_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","09/25/2021 05:56:26 - INFO - filelock - Lock 139812892471888 released on /content/drive/MyDrive/1_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188.lock\n","[INFO|modeling_utils.py:1279] 2021-09-25 05:56:26,786 >> loading weights file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin from cache at /content/drive/MyDrive/1_base_QA_cache_dir/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|modeling_utils.py:1524] 2021-09-25 05:56:28,931 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 05:56:28,931 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at deepset/bert-base-cased-squad2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 05:56:38 - INFO - __main__ - Training/evaluation parameters Namespace(adam_epsilon=1e-08, cache_dir='/content/drive/MyDrive/1_base_QA_cache_dir/', config_name='', data_dir=None, device=device(type='cuda'), do_eval=True, do_lower_case=True, do_train=False, doc_stride=128, eval_all_checkpoints=False, evaluate_during_training=False, fp16=False, fp16_opt_level='O1', gradient_accumulation_steps=1, lang_id=0, learning_rate=3e-05, local_rank=-1, logging_steps=500, max_answer_length=30, max_grad_norm=1.0, max_query_length=64, max_seq_length=384, max_steps=-1, model_name_or_path='deepset/bert-base-cased-squad2', model_type='bert', n_best_size=20, n_gpu=1, no_cuda=False, null_score_diff_threshold=0.0, num_train_epochs=3.0, output_dir='/content/drive/MyDrive/1_base_QA__checkpoint/', overwrite_cache=False, overwrite_output_dir=False, per_gpu_eval_batch_size=8, per_gpu_train_batch_size=12, predict_file='/content/drive/MyDrive/Dataset/dev_qa.json', save_steps=1000, seed=42, server_ip='', server_port='', threads=1, tokenizer_name='deepset/bert-base-cased-squad2', train_file=None, verbose_logging=False, version_2_with_negative=False, warmup_steps=0, weight_decay=0.0)\n","09/25/2021 05:56:38 - INFO - __main__ - Loading checkpoint deepset/bert-base-cased-squad2 for evaluation\n","09/25/2021 05:56:38 - INFO - __main__ - Evaluate the following checkpoints: ['deepset/bert-base-cased-squad2']\n","[INFO|configuration_utils.py:561] 2021-09-25 05:56:38,425 >> loading configuration file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/config.json from cache at /root/.cache/huggingface/transformers/15cc42d3f2accfabf2128048289832150b75adafd7ab2b50e37a998b71c528b4.250bb3d860b46cc2180effc9227c0d2faf19405a1585c714c721dcc1a1d04727\n","[INFO|configuration_utils.py:598] 2021-09-25 05:56:38,426 >> Model config BertConfig {\n","  \"architectures\": [\n","    \"BertForQuestionAnswering\"\n","  ],\n","  \"attention_probs_dropout_prob\": 0.1,\n","  \"classifier_dropout\": null,\n","  \"gradient_checkpointing\": false,\n","  \"hidden_act\": \"gelu\",\n","  \"hidden_dropout_prob\": 0.1,\n","  \"hidden_size\": 768,\n","  \"initializer_range\": 0.02,\n","  \"intermediate_size\": 3072,\n","  \"language\": \"english\",\n","  \"layer_norm_eps\": 1e-12,\n","  \"max_position_embeddings\": 512,\n","  \"model_type\": \"bert\",\n","  \"name\": \"Bert\",\n","  \"num_attention_heads\": 12,\n","  \"num_hidden_layers\": 12,\n","  \"output_past\": true,\n","  \"pad_token_id\": 0,\n","  \"position_embedding_type\": \"absolute\",\n","  \"transformers_version\": \"4.10.3\",\n","  \"type_vocab_size\": 2,\n","  \"use_cache\": true,\n","  \"vocab_size\": 28996\n","}\n","\n","09/25/2021 05:56:38 - INFO - filelock - Lock 139812876668496 acquired on /root/.cache/huggingface/transformers/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188.lock\n","[INFO|file_utils.py:1665] 2021-09-25 05:56:38,780 >> https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin not found in cache or force_download set to True, downloading to /root/.cache/huggingface/transformers/tmp81fvsp9w\n","Downloading: 100% 433M/433M [00:11<00:00, 36.7MB/s]\n","[INFO|file_utils.py:1669] 2021-09-25 05:56:50,695 >> storing https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin in cache at /root/.cache/huggingface/transformers/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|file_utils.py:1677] 2021-09-25 05:56:50,695 >> creating metadata file for /root/.cache/huggingface/transformers/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","09/25/2021 05:56:50 - INFO - filelock - Lock 139812876668496 released on /root/.cache/huggingface/transformers/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188.lock\n","[INFO|modeling_utils.py:1279] 2021-09-25 05:56:50,696 >> loading weights file https://huggingface.co/deepset/bert-base-cased-squad2/resolve/main/pytorch_model.bin from cache at /root/.cache/huggingface/transformers/4fb91611eb90525e5d3e1dc48e72a8c8a9d19f8bb138af51f0795a020acf8bfa.eb6109ce49f42129661193e04ce291fda8ccb3407daa60a09d011e671c60a188\n","[INFO|modeling_utils.py:1524] 2021-09-25 05:56:51,944 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n","\n","[INFO|modeling_utils.py:1533] 2021-09-25 05:56:51,944 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at deepset/bert-base-cased-squad2.\n","If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n","09/25/2021 05:56:52 - INFO - __main__ - Loading features from cached file ./cached_dev_bert-base-cased-squad2_384\n","09/25/2021 05:56:53 - INFO - __main__ - ***** Running evaluation  *****\n","09/25/2021 05:56:53 - INFO - __main__ -   Num examples = 674\n","09/25/2021 05:56:53 - INFO - __main__ -   Batch size = 8\n","Evaluating: 100% 85/85 [00:31<00:00,  2.72it/s]\n","09/25/2021 05:57:25 - INFO - __main__ -   Evaluation done in total 31.248924 secs (0.046363 sec per example)\n","[INFO|squad_metrics.py:401] 2021-09-25 05:57:25,237 >> Writing predictions to: /content/drive/MyDrive/1_base_QA__checkpoint/predictions_.json\n","[INFO|squad_metrics.py:403] 2021-09-25 05:57:25,237 >> Writing nbest to: /content/drive/MyDrive/1_base_QA__checkpoint/nbest_predictions_.json\n","09/25/2021 05:57:26 - INFO - __main__ - Results: {'exact': 5.687203791469194, 'f1': 31.57154563090946, 'total': 211, 'HasAns_exact': 5.687203791469194, 'HasAns_f1': 31.57154563090946, 'HasAns_total': 211, 'best_exact': 5.687203791469194, 'best_exact_thresh': 0.0, 'best_f1': 31.57154563090946, 'best_f1_thresh': 0.0}\n"]}]},{"cell_type":"code","metadata":{"id":"kFKBd3wkhptd"},"source":[""],"execution_count":null,"outputs":[]}]}