{ "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 }