File size: 11,861 Bytes
550665c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d02ed49e",
   "metadata": {
    "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
    "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
    "execution": {
     "iopub.execute_input": "2024-06-12T20:29:48.416852Z",
     "iopub.status.busy": "2024-06-12T20:29:48.416562Z",
     "iopub.status.idle": "2024-06-12T20:29:50.953093Z",
     "shell.execute_reply": "2024-06-12T20:29:50.951903Z"
    },
    "papermill": {
     "duration": 2.542116,
     "end_time": "2024-06-12T20:29:50.955196",
     "exception": false,
     "start_time": "2024-06-12T20:29:48.413080",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/kaggle/working\n",
      "Cloning into 'MRC-RetroReader'...\r\n",
      "remote: Enumerating objects: 266, done.\u001b[K\r\n",
      "remote: Counting objects: 100% (266/266), done.\u001b[K\r\n",
      "remote: Compressing objects: 100% (196/196), done.\u001b[K\r\n",
      "remote: Total 266 (delta 175), reused 151 (delta 66), pack-reused 0\u001b[K\r\n",
      "Receiving objects: 100% (266/266), 66.67 KiB | 5.55 MiB/s, done.\r\n",
      "Resolving deltas: 100% (175/175), done.\r\n",
      "/kaggle/working/MRC-RetroReader\n"
     ]
    }
   ],
   "source": [
    "!rm -rf /kaggle/working/MRC-RetroReader\n",
    "%cd /kaggle/working/\n",
    "!git clone https://github.com/phanhoang1803/MRC-RetroReader.git\n",
    "%cd MRC-RetroReader"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "3fb6d32c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-06-12T20:29:50.962630Z",
     "iopub.status.busy": "2024-06-12T20:29:50.962323Z",
     "iopub.status.idle": "2024-06-12T20:30:05.059999Z",
     "shell.execute_reply": "2024-06-12T20:30:05.058891Z"
    },
    "papermill": {
     "duration": 14.104088,
     "end_time": "2024-06-12T20:30:05.062408",
     "exception": false,
     "start_time": "2024-06-12T20:29:50.958320",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting evaluate==0.4.2 (from -r requirements.txt (line 1))\r\n",
      "  Downloading evaluate-0.4.2-py3-none-any.whl.metadata (9.3 kB)\r\n",
      "Requirement already satisfied: datasets>=2.0.0 in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (2.19.2)\r\n",
      "Requirement already satisfied: numpy>=1.17 in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (1.26.4)\r\n",
      "Requirement already satisfied: dill in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (0.3.8)\r\n",
      "Requirement already satisfied: pandas in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (2.2.1)\r\n",
      "Requirement already satisfied: requests>=2.19.0 in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (2.32.3)\r\n",
      "Requirement already satisfied: tqdm>=4.62.1 in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (4.66.4)\r\n",
      "Requirement already satisfied: xxhash in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (3.4.1)\r\n",
      "Requirement already satisfied: multiprocess in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (0.70.16)\r\n",
      "Requirement already satisfied: fsspec>=2021.05.0 in /opt/conda/lib/python3.10/site-packages (from fsspec[http]>=2021.05.0->evaluate==0.4.2->-r requirements.txt (line 1)) (2024.3.1)\r\n",
      "Requirement already satisfied: huggingface-hub>=0.7.0 in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (0.23.2)\r\n",
      "Requirement already satisfied: packaging in /opt/conda/lib/python3.10/site-packages (from evaluate==0.4.2->-r requirements.txt (line 1)) (21.3)\r\n",
      "Requirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (3.13.1)\r\n",
      "Requirement already satisfied: pyarrow>=12.0.0 in /opt/conda/lib/python3.10/site-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (14.0.2)\r\n",
      "Requirement already satisfied: pyarrow-hotfix in /opt/conda/lib/python3.10/site-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (0.6)\r\n",
      "Requirement already satisfied: aiohttp in /opt/conda/lib/python3.10/site-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (3.9.1)\r\n",
      "Requirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.10/site-packages (from datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (6.0.1)\r\n",
      "Requirement already satisfied: typing-extensions>=3.7.4.3 in /opt/conda/lib/python3.10/site-packages (from huggingface-hub>=0.7.0->evaluate==0.4.2->-r requirements.txt (line 1)) (4.9.0)\r\n",
      "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/conda/lib/python3.10/site-packages (from packaging->evaluate==0.4.2->-r requirements.txt (line 1)) (3.1.1)\r\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests>=2.19.0->evaluate==0.4.2->-r requirements.txt (line 1)) (3.3.2)\r\n",
      "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests>=2.19.0->evaluate==0.4.2->-r requirements.txt (line 1)) (3.6)\r\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests>=2.19.0->evaluate==0.4.2->-r requirements.txt (line 1)) (1.26.18)\r\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests>=2.19.0->evaluate==0.4.2->-r requirements.txt (line 1)) (2024.2.2)\r\n",
      "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.10/site-packages (from pandas->evaluate==0.4.2->-r requirements.txt (line 1)) (2.9.0.post0)\r\n",
      "Requirement already satisfied: pytz>=2020.1 in /opt/conda/lib/python3.10/site-packages (from pandas->evaluate==0.4.2->-r requirements.txt (line 1)) (2023.3.post1)\r\n",
      "Requirement already satisfied: tzdata>=2022.7 in /opt/conda/lib/python3.10/site-packages (from pandas->evaluate==0.4.2->-r requirements.txt (line 1)) (2023.4)\r\n",
      "Requirement already satisfied: attrs>=17.3.0 in /opt/conda/lib/python3.10/site-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (23.2.0)\r\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in /opt/conda/lib/python3.10/site-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (6.0.4)\r\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in /opt/conda/lib/python3.10/site-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (1.9.3)\r\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in /opt/conda/lib/python3.10/site-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (1.4.1)\r\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in /opt/conda/lib/python3.10/site-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (1.3.1)\r\n",
      "Requirement already satisfied: async-timeout<5.0,>=4.0 in /opt/conda/lib/python3.10/site-packages (from aiohttp->datasets>=2.0.0->evaluate==0.4.2->-r requirements.txt (line 1)) (4.0.3)\r\n",
      "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas->evaluate==0.4.2->-r requirements.txt (line 1)) (1.16.0)\r\n",
      "Downloading evaluate-0.4.2-py3-none-any.whl (84 kB)\r\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m84.1/84.1 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\r\n",
      "\u001b[?25hInstalling collected packages: evaluate\r\n",
      "Successfully installed evaluate-0.4.2\r\n"
     ]
    }
   ],
   "source": [
    "!pip install -r requirements.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "7e807b1b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-06-12T20:30:05.072050Z",
     "iopub.status.busy": "2024-06-12T20:30:05.071722Z",
     "iopub.status.idle": "2024-06-12T20:30:07.433604Z",
     "shell.execute_reply": "2024-06-12T20:30:07.432725Z"
    },
    "papermill": {
     "duration": 2.369129,
     "end_time": "2024-06-12T20:30:07.435926",
     "exception": false,
     "start_time": "2024-06-12T20:30:05.066797",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "W&B offline. Running your script from this directory will only write metadata locally. Use wandb disabled to completely turn off W&B.\r\n"
     ]
    }
   ],
   "source": [
    "!wandb off\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8f66860e",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-06-12T20:30:07.445694Z",
     "iopub.status.busy": "2024-06-12T20:30:07.445163Z",
     "iopub.status.idle": "2024-06-12T20:30:07.449130Z",
     "shell.execute_reply": "2024-06-12T20:30:07.448299Z"
    },
    "papermill": {
     "duration": 0.010983,
     "end_time": "2024-06-12T20:30:07.451041",
     "exception": false,
     "start_time": "2024-06-12T20:30:07.440058",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# !python train_squad_v2.py \\\n",
    "# --configs configs/train_distilbert.yaml \\\n",
    "# --batch_size 1024 \\\n",
    "# --module intensive"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0ad87692",
   "metadata": {
    "papermill": {
     "duration": 0.003639,
     "end_time": "2024-06-12T20:30:07.458737",
     "exception": false,
     "start_time": "2024-06-12T20:30:07.455098",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kaggle": {
   "accelerator": "nvidiaTeslaT4",
   "dataSources": [],
   "dockerImageVersionId": 30732,
   "isGpuEnabled": true,
   "isInternetEnabled": true,
   "language": "python",
   "sourceType": "notebook"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  },
  "papermill": {
   "default_parameters": {},
   "duration": 22.187427,
   "end_time": "2024-06-12T20:30:07.679386",
   "environment_variables": {},
   "exception": null,
   "input_path": "__notebook__.ipynb",
   "output_path": "__notebook__.ipynb",
   "parameters": {},
   "start_time": "2024-06-12T20:29:45.491959",
   "version": "2.5.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}