diff --git a/Cutom Question Answering/Question_Answer_Application.ipynb b/Cutom Question Answering/Question_Answer_Application.ipynb index 871c8a0..a503749 100644 --- a/Cutom Question Answering/Question_Answer_Application.ipynb +++ b/Cutom Question Answering/Question_Answer_Application.ipynb @@ -1,5747 +1,5743 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "name": "Question Answer Application.ipynb", - "provenance": [], - "collapsed_sections": [], - "machine_shape": "hm" + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "wGMWbz1IcvP_" + }, + "source": [ + "### Question Answer Application\n", + "The goal of Question Answering is to find the answer to a question given a question and an accompanying context. The predicted answer will be either a span of text from the context or an empty string (indicating the question cannot be answered from the context)." + ] }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000 + }, + "id": "GClIr_-qX6OL", + "outputId": "b75526a4-081e-4baa-9853-8dd20c27885a" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting simpletransformers\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/af/62/c27d9781c7469d4abe7a6e6658120bfb4a41535e8212d11f9d41d379af5d/simpletransformers-0.61.5-py3-none-any.whl (220kB)\n", + "\r\u001b[K |█▌ | 10kB 23.5MB/s eta 0:00:01\r\u001b[K |███ | 20kB 6.1MB/s eta 0:00:01\r\u001b[K |████▌ | 30kB 4.2MB/s eta 0:00:01\r\u001b[K |██████ | 40kB 4.0MB/s eta 0:00:01\r\u001b[K |███████▍ | 51kB 2.1MB/s eta 0:00:01\r\u001b[K |█████████ | 61kB 2.3MB/s eta 0:00:01\r\u001b[K |██████████▍ | 71kB 2.5MB/s eta 0:00:01\r\u001b[K |████████████ | 81kB 2.6MB/s eta 0:00:01\r\u001b[K |█████████████▍ | 92kB 2.8MB/s eta 0:00:01\r\u001b[K |██████████████▉ | 102kB 2.9MB/s eta 0:00:01\r\u001b[K |████████████████▍ | 112kB 2.9MB/s eta 0:00:01\r\u001b[K |█████████████████▉ | 122kB 2.9MB/s eta 0:00:01\r\u001b[K |███████████████████▎ | 133kB 2.9MB/s eta 0:00:01\r\u001b[K |████████████████████▉ | 143kB 2.9MB/s eta 0:00:01\r\u001b[K |██████████████████████▎ | 153kB 2.9MB/s eta 0:00:01\r\u001b[K |███████████████████████▉ | 163kB 2.9MB/s eta 0:00:01\r\u001b[K |█████████████████████████▎ | 174kB 2.9MB/s eta 0:00:01\r\u001b[K |██████████████████████████▊ | 184kB 2.9MB/s eta 0:00:01\r\u001b[K |████████████████████████████▎ | 194kB 2.9MB/s eta 0:00:01\r\u001b[K |█████████████████████████████▊ | 204kB 2.9MB/s eta 0:00:01\r\u001b[K |███████████████████████████████▏| 215kB 2.9MB/s eta 0:00:01\r\u001b[K |████████████████████████████████| 225kB 2.9MB/s \n", + "\u001b[?25hRequirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (0.22.2.post1)\n", + "Collecting streamlit\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/04/11/57097e14f72a2d1b2a1bbe86c2a8bc375661bfd5c30b5e8cee7c2fad9a44/streamlit-0.82.0-py2.py3-none-any.whl (8.2MB)\n", + "\u001b[K |████████████████████████████████| 8.2MB 8.1MB/s \n", + "\u001b[?25hCollecting tokenizers\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d4/e2/df3543e8ffdab68f5acc73f613de9c2b155ac47f162e725dcac87c521c11/tokenizers-0.10.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3MB)\n", + "\u001b[K |████████████████████████████████| 3.3MB 36.5MB/s \n", + "\u001b[?25hRequirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (1.4.1)\n", + "Collecting tensorboardx\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/07/84/46421bd3e0e89a92682b1a38b40efc22dafb6d8e3d947e4ceefd4a5fabc7/tensorboardX-2.2-py2.py3-none-any.whl (120kB)\n", + "\u001b[K |████████████████████████████████| 122kB 46.5MB/s \n", + "\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (2019.12.20)\n", + "Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (1.1.5)\n", + "Collecting wandb\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/98/5f/45439b4767334b868e1c8c35b1b0ba3747d8c21be77b79f09eed7aa3c72b/wandb-0.10.30-py2.py3-none-any.whl (1.8MB)\n", + "\u001b[K |████████████████████████████████| 1.8MB 52.2MB/s \n", + "\u001b[?25hCollecting seqeval\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/9d/2d/233c79d5b4e5ab1dbf111242299153f3caddddbb691219f363ad55ce783d/seqeval-1.2.2.tar.gz (43kB)\n", + "\u001b[K |████████████████████████████████| 51kB 8.6MB/s \n", + "\u001b[?25hCollecting datasets\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/46/1a/b9f9b3bfef624686ae81c070f0a6bb635047b17cdb3698c7ad01281e6f9a/datasets-1.6.2-py3-none-any.whl (221kB)\n", + "\u001b[K |████████████████████████████████| 225kB 54.1MB/s \n", + "\u001b[?25hCollecting transformers>=4.2.0\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d5/43/cfe4ee779bbd6a678ac6a97c5a5cdeb03c35f9eaebbb9720b036680f9a2d/transformers-4.6.1-py3-none-any.whl (2.2MB)\n", + "\u001b[K |████████████████████████████████| 2.3MB 63.8MB/s \n", + "\u001b[?25hCollecting sentencepiece\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f5/99/e0808cb947ba10f575839c43e8fafc9cc44e4a7a2c8f79c60db48220a577/sentencepiece-0.1.95-cp37-cp37m-manylinux2014_x86_64.whl (1.2MB)\n", + "\u001b[K |████████████████████████████████| 1.2MB 51.8MB/s \n", + "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (1.19.5)\n", + "Collecting tqdm>=4.47.0\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/42/d7/f357d98e9b50346bcb6095fe3ad205d8db3174eb5edb03edfe7c4099576d/tqdm-4.61.0-py2.py3-none-any.whl (75kB)\n", + "\u001b[K |████████████████████████████████| 81kB 12.2MB/s \n", + "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (2.23.0)\n", + "Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->simpletransformers) (1.0.1)\n", + "Requirement already satisfied: cachetools>=4.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (4.2.2)\n", + "Requirement already satisfied: astor in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (0.8.1)\n", + "Requirement already satisfied: altair>=3.2.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (4.1.0)\n", + "Collecting gitpython\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/27/da/6f6224fdfc47dab57881fe20c0d1bc3122be290198ba0bf26a953a045d92/GitPython-3.1.17-py3-none-any.whl (166kB)\n", + "\u001b[K |████████████████████████████████| 174kB 57.5MB/s \n", + "\u001b[?25hRequirement already satisfied: protobuf!=3.11,>=3.6.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (3.12.4)\n", + "Requirement already satisfied: tornado>=5.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (5.1.1)\n", + "Requirement already satisfied: pyarrow; python_version < \"3.9\" in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (3.0.0)\n", + "Collecting pydeck>=0.1.dev5\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d6/bc/f0e44828e4290367c869591d50d3671a4d0ee94926da6cb734b7b200308c/pydeck-0.6.2-py2.py3-none-any.whl (4.2MB)\n", + "\u001b[K |████████████████████████████████| 4.2MB 45.5MB/s \n", + "\u001b[?25hCollecting validators\n", + " Downloading https://files.pythonhosted.org/packages/db/2f/7fed3ee94ad665ad2c1de87f858f10a7785251ff75b4fd47987888d07ef1/validators-0.18.2-py3-none-any.whl\n", + "Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (2.8.1)\n", + "Requirement already satisfied: click<8.0,>=7.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (7.1.2)\n", + "Collecting base58\n", + " Downloading https://files.pythonhosted.org/packages/b8/a1/d9f565e9910c09fd325dc638765e8843a19fa696275c16cc08cf3b0a3c25/base58-2.1.0-py3-none-any.whl\n", + "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (7.1.2)\n", + "Requirement already satisfied: tzlocal in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (1.5.1)\n", + "Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (20.9)\n", + "Collecting watchdog; platform_system != \"Darwin\"\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f2/5b/36b3b11e557830de6fc1dc06e9aa3ee274119b8cea9cc98175dbbf72cf87/watchdog-2.1.2-py3-none-manylinux2014_x86_64.whl (74kB)\n", + "\u001b[K |████████████████████████████████| 81kB 10.1MB/s \n", + "\u001b[?25hCollecting blinker\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz (111kB)\n", + "\u001b[K |████████████████████████████████| 112kB 72.6MB/s \n", + "\u001b[?25hRequirement already satisfied: toml in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (0.10.2)\n", + "Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->simpletransformers) (2018.9)\n", + "Requirement already satisfied: promise<3,>=2.0 in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (2.3)\n", + "Collecting sentry-sdk>=0.4.0\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1c/4a/a54b254f67d8f4052338d54ebe90126f200693440a93ef76d254d581e3ec/sentry_sdk-1.1.0-py2.py3-none-any.whl (131kB)\n", + "\u001b[K |████████████████████████████████| 133kB 63.8MB/s \n", + "\u001b[?25hCollecting configparser>=3.8.1\n", + " Downloading https://files.pythonhosted.org/packages/fd/01/ff260a18caaf4457eb028c96eeb405c4a230ca06c8ec9c1379f813caa52e/configparser-5.0.2-py3-none-any.whl\n", + "Requirement already satisfied: psutil>=5.0.0 in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (5.4.8)\n", + "Requirement already satisfied: PyYAML in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (3.13)\n", + "Requirement already satisfied: six>=1.13.0 in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (1.15.0)\n", + "Collecting subprocess32>=3.5.3\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz (97kB)\n", + "\u001b[K |████████████████████████████████| 102kB 14.4MB/s \n", + "\u001b[?25hCollecting pathtools\n", + " Downloading https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz\n", + "Collecting shortuuid>=0.5.0\n", + " Downloading https://files.pythonhosted.org/packages/25/a6/2ecc1daa6a304e7f1b216f0896b26156b78e7c38e1211e9b798b4716c53d/shortuuid-1.0.1-py3-none-any.whl\n", + "Collecting docker-pycreds>=0.4.0\n", + " Downloading https://files.pythonhosted.org/packages/f5/e8/f6bd1eee09314e7e6dee49cbe2c5e22314ccdb38db16c9fc72d2fa80d054/docker_pycreds-0.4.0-py2.py3-none-any.whl\n", + "Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from datasets->simpletransformers) (4.0.1)\n", + "Collecting fsspec\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/bc/52/816d1a3a599176057bf29dfacb1f8fadb61d35fbd96cb1bab4aaa7df83c0/fsspec-2021.5.0-py3-none-any.whl (111kB)\n", + "\u001b[K |████████████████████████████████| 112kB 63.2MB/s \n", + "\u001b[?25hRequirement already satisfied: dill in /usr/local/lib/python3.7/dist-packages (from datasets->simpletransformers) (0.3.3)\n", + "Collecting xxhash\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/7d/4f/0a862cad26aa2ed7a7cd87178cbbfa824fc1383e472d63596a0d018374e7/xxhash-2.0.2-cp37-cp37m-manylinux2010_x86_64.whl (243kB)\n", + "\u001b[K |████████████████████████████████| 245kB 48.8MB/s \n", + "\u001b[?25hCollecting huggingface-hub<0.1.0\n", + " Downloading https://files.pythonhosted.org/packages/32/a1/7c5261396da23ec364e296a4fb8a1cd6a5a2ff457215c6447038f18c0309/huggingface_hub-0.0.9-py3-none-any.whl\n", + "Requirement already satisfied: multiprocess in /usr/local/lib/python3.7/dist-packages (from datasets->simpletransformers) (0.70.11.1)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers>=4.2.0->simpletransformers) (3.0.12)\n", + "Collecting sacremoses\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/75/ee/67241dc87f266093c533a2d4d3d69438e57d7a90abb216fa076e7d475d4a/sacremoses-0.0.45-py3-none-any.whl (895kB)\n", + "\u001b[K |████████████████████████████████| 901kB 54.1MB/s \n", + "\u001b[?25hRequirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->simpletransformers) (2020.12.5)\n", + "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->simpletransformers) (3.0.4)\n", + "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->simpletransformers) (2.10)\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->simpletransformers) (1.24.3)\n", + "Requirement already satisfied: entrypoints in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (0.3)\n", + "Requirement already satisfied: toolz in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (0.11.1)\n", + "Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (2.11.3)\n", + "Requirement already satisfied: jsonschema in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (2.6.0)\n", + "Requirement already satisfied: typing-extensions>=3.7.4.0; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from gitpython->streamlit->simpletransformers) (3.7.4.3)\n", + "Collecting gitdb<5,>=4.0.1\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/ea/e8/f414d1a4f0bbc668ed441f74f44c116d9816833a48bf81d22b697090dba8/gitdb-4.0.7-py3-none-any.whl (63kB)\n", + "\u001b[K |████████████████████████████████| 71kB 9.1MB/s \n", + "\u001b[?25hRequirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from protobuf!=3.11,>=3.6.0->streamlit->simpletransformers) (56.1.0)\n", + "Requirement already satisfied: ipywidgets>=7.0.0 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit->simpletransformers) (7.6.3)\n", + "Collecting ipykernel>=5.1.2; python_version >= \"3.4\"\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/90/6d/6c8fe4b658f77947d4244ce81f60230c4c8d1dc1a21ae83e63b269339178/ipykernel-5.5.5-py3-none-any.whl (120kB)\n", + "\u001b[K |████████████████████████████████| 122kB 44.0MB/s \n", + "\u001b[?25hRequirement already satisfied: traitlets>=4.3.2 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit->simpletransformers) (5.0.5)\n", + "Requirement already satisfied: decorator>=3.4.0 in /usr/local/lib/python3.7/dist-packages (from validators->streamlit->simpletransformers) (4.4.2)\n", + "Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->streamlit->simpletransformers) (2.4.7)\n", + "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->datasets->simpletransformers) (3.4.1)\n", + "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->altair>=3.2.0->streamlit->simpletransformers) (2.0.1)\n", + "Collecting smmap<5,>=3.0.1\n", + " Downloading https://files.pythonhosted.org/packages/68/ee/d540eb5e5996eb81c26ceffac6ee49041d473bc5125f2aa995cf51ec1cf1/smmap-4.0.0-py2.py3-none-any.whl\n", + "Requirement already satisfied: ipython>=4.0.0; python_version >= \"3.3\" in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.5.0)\n", + "Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (3.5.1)\n", + "Requirement already satisfied: jupyterlab-widgets>=1.0.0; python_version >= \"3.6\" in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.0.0)\n", + "Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.1.3)\n", + "Requirement already satisfied: jupyter-client in /usr/local/lib/python3.7/dist-packages (from ipykernel>=5.1.2; python_version >= \"3.4\"->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.3.5)\n", + "Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.7/dist-packages (from traitlets>=4.3.2->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.2.0)\n", + "Requirement already satisfied: pexpect; sys_platform != \"win32\" in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (4.8.0)\n", + "Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.0.18)\n", + "Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (2.6.1)\n", + "Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.7.5)\n", + "Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.8.1)\n", + "Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.7/dist-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.3.1)\n", + "Requirement already satisfied: jupyter-core in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (4.7.1)\n", + "Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client->ipykernel>=5.1.2; python_version >= \"3.4\"->pydeck>=0.1.dev5->streamlit->simpletransformers) (22.0.3)\n", + "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.7/dist-packages (from pexpect; sys_platform != \"win32\"->ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.7.0)\n", + "Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.2.5)\n", + "Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.10.0)\n", + "Requirement already satisfied: Send2Trash in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.5.0)\n", + "Requirement already satisfied: nbconvert in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.6.1)\n", + "Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.4.3)\n", + "Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (3.3.0)\n", + "Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.7.1)\n", + "Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.5.0)\n", + "Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.8.4)\n", + "Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.5.1)\n", + "Building wheels for collected packages: seqeval, blinker, subprocess32, pathtools\n", + " Building wheel for seqeval (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for seqeval: filename=seqeval-1.2.2-cp37-none-any.whl size=16172 sha256=6ce447af50e56210de246f069f2da9c8161f4a5928dcd48dc961e05eee47c2bf\n", + " Stored in directory: /root/.cache/pip/wheels/52/df/1b/45d75646c37428f7e626214704a0e35bd3cfc32eda37e59e5f\n", + " Building wheel for blinker (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for blinker: filename=blinker-1.4-cp37-none-any.whl size=13448 sha256=769c30e20f601a60ead8bdf552a593b27ed09008b50ba67be92d8241b38031bd\n", + " Stored in directory: /root/.cache/pip/wheels/92/a0/00/8690a57883956a301d91cf4ec999cc0b258b01e3f548f86e89\n", + " Building wheel for subprocess32 (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for subprocess32: filename=subprocess32-3.5.4-cp37-none-any.whl size=6489 sha256=08d0d6af0349a4458713ddec6d01a0037ac0c3f2e2266bd25535b65465f00f81\n", + " Stored in directory: /root/.cache/pip/wheels/68/39/1a/5e402bdfdf004af1786c8b853fd92f8c4a04f22aad179654d1\n", + " Building wheel for pathtools (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for pathtools: filename=pathtools-0.1.2-cp37-none-any.whl size=8786 sha256=c49e5852d18a7dc8a1617bec9549c6151bf47d4cf9947a7e1b7ce1455cd07472\n", + " Stored in directory: /root/.cache/pip/wheels/0b/04/79/c3b0c3a0266a3cb4376da31e5bfe8bba0c489246968a68e843\n", + "Successfully built seqeval blinker subprocess32 pathtools\n", + "\u001b[31mERROR: google-colab 1.0.0 has requirement ipykernel~=4.10, but you'll have ipykernel 5.5.5 which is incompatible.\u001b[0m\n", + "\u001b[31mERROR: datasets 1.6.2 has requirement tqdm<4.50.0,>=4.27, but you'll have tqdm 4.61.0 which is incompatible.\u001b[0m\n", + "\u001b[31mERROR: transformers 4.6.1 has requirement huggingface-hub==0.0.8, but you'll have huggingface-hub 0.0.9 which is incompatible.\u001b[0m\n", + "Installing collected packages: smmap, gitdb, gitpython, ipykernel, pydeck, validators, base58, watchdog, blinker, streamlit, tokenizers, tensorboardx, sentry-sdk, configparser, subprocess32, pathtools, shortuuid, docker-pycreds, wandb, seqeval, tqdm, fsspec, xxhash, huggingface-hub, datasets, sacremoses, transformers, sentencepiece, simpletransformers\n", + " Found existing installation: ipykernel 4.10.1\n", + " Uninstalling ipykernel-4.10.1:\n", + " Successfully uninstalled ipykernel-4.10.1\n", + " Found existing installation: tqdm 4.41.1\n", + " Uninstalling tqdm-4.41.1:\n", + " Successfully uninstalled tqdm-4.41.1\n", + "Successfully installed base58-2.1.0 blinker-1.4 configparser-5.0.2 datasets-1.6.2 docker-pycreds-0.4.0 fsspec-2021.5.0 gitdb-4.0.7 gitpython-3.1.17 huggingface-hub-0.0.9 ipykernel-5.5.5 pathtools-0.1.2 pydeck-0.6.2 sacremoses-0.0.45 sentencepiece-0.1.95 sentry-sdk-1.1.0 seqeval-1.2.2 shortuuid-1.0.1 simpletransformers-0.61.5 smmap-4.0.0 streamlit-0.82.0 subprocess32-3.5.4 tensorboardx-2.2 tokenizers-0.10.3 tqdm-4.61.0 transformers-4.6.1 validators-0.18.2 wandb-0.10.30 watchdog-2.1.2 xxhash-2.0.2\n" + ] + }, + { + "data": { + "application/vnd.colab-display-data+json": { + "pip_warning": { + "packages": [ + "ipykernel" + ] + } + } + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" + } + ], + "source": [ + "!pip install simpletransformers" + ] }, - "language_info": { - "name": "python" + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "id": "3SZo6mRnYivr" + }, + "outputs": [], + "source": [ + "import json\n", + "with open(r\"train.json\", \"r\") as read_file:\n", + " train = json.load(read_file)" + ] }, - "accelerator": "GPU", - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "0b5ee432816e46f88158cfc5a15d9404": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "state": { - "_view_name": "HBoxView", - "_dom_classes": [], - "_model_name": "HBoxModel", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.5.0", - "box_style": "", - "layout": "IPY_MODEL_44a4217b7b7247358c72e675c948b9ae", - "_model_module": "@jupyter-widgets/controls", - "children": [ - "IPY_MODEL_6890f7d38f264242b7d358bb96a138c5", - "IPY_MODEL_28cdcbb9686e4a4a804dac34106a2a5f", - "IPY_MODEL_ae3da4fc79324b089f59eedf0b67525c" + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "zoiQlW1lZCzu", + "outputId": "0f532876-f0e0-4ff2-dad6-789181390ca9" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'context': 'Mistborn is a series of epic fantasy novels written by American author Brandon Sanderson.',\n", + " 'qas': [{'answers': [{'answer_start': 71, 'text': 'Brandon Sanderson'}],\n", + " 'id': '00001',\n", + " 'is_impossible': False,\n", + " 'question': 'Who is the author of the Mistborn series?'}]},\n", + " {'context': 'The first series, published between 2006 and 2008, consists of The Final Empire,The Well of Ascension, and The Hero of Ages.',\n", + " 'qas': [{'answers': [{'answer_start': 28, 'text': 'between 2006 and 2008'}],\n", + " 'id': '00002',\n", + " 'is_impossible': False,\n", + " 'question': 'When was the series published?'},\n", + " {'answers': [{'answer_start': 63,\n", + " 'text': 'The Final Empire, The Well of Ascension, and The Hero of Ages'}],\n", + " 'id': '00003',\n", + " 'is_impossible': False,\n", + " 'question': 'What are the three books in the series?'},\n", + " {'answers': [],\n", + " 'id': '00004',\n", + " 'is_impossible': True,\n", + " 'question': 'Who is the main character in the series?'}]}]" ] - } + }, + "execution_count": 2, + "metadata": { + "tags": [] + }, + "output_type": "execute_result" + } + ], + "source": [ + "train" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "id": "Zcf9395xZD7N" + }, + "outputs": [], + "source": [ + "with open(r\"test.json\", \"r\") as read_file:\n", + " test = json.load(read_file)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, - "44a4217b7b7247358c72e675c948b9ae": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + "id": "ENWqJL1eZH4e", + "outputId": "2de4f972-7c17-4a47-ea45-cc72691719bb" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'context': 'The series primarily takes place in a region called the Final Empire on a world called Scadrial, where the sun and sky are red, vegetation is brown, and the ground is constantly being covered under black volcanic ashfalls.',\n", + " 'qas': [{'answers': [{'answer_start': 38,\n", + " 'text': 'region called the Final Empire'},\n", + " {'answer_start': 74, 'text': 'world called Scadrial'}],\n", + " 'id': '00001',\n", + " 'is_impossible': False,\n", + " 'question': 'Where does the series take place?'}]},\n", + " {'context': '\"Mistings\" have only one of the many Allomantic powers, while \"Mistborns\" have all the powers.',\n", + " 'qas': [{'answers': [{'answer_start': 21, 'text': 'one'}],\n", + " 'id': '00002',\n", + " 'is_impossible': False,\n", + " 'question': 'How many powers does a Misting possess?'},\n", + " {'answers': [],\n", + " 'id': '00003',\n", + " 'is_impossible': True,\n", + " 'question': 'What are Allomantic powers?'}]}]" + ] + }, + "execution_count": 4, + "metadata": { + "tags": [] + }, + "output_type": "execute_result" + } + ], + "source": [ + "test" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "id": "x-ybl95CeEwo" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "id": "1fYyYz_cZI7v" + }, + "outputs": [], + "source": [ + "import logging\n", + "\n", + "from simpletransformers.question_answering import QuestionAnsweringModel, QuestionAnsweringArgs" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "id": "o2GXJIZshpoz" + }, + "outputs": [], + "source": [ + "model_type=\"bert\"\n", + "model_name= \"bert-base-cased\"\n", + "if model_type == \"bert\":\n", + " model_name = \"bert-base-cased\"\n", + "\n", + "elif model_type == \"roberta\":\n", + " model_name = \"roberta-base\"\n", + "\n", + "elif model_type == \"distilbert\":\n", + " model_name = \"distilbert-base-cased\"\n", + "\n", + "elif model_type == \"distilroberta\":\n", + " model_type = \"roberta\"\n", + " model_name = \"distilroberta-base\"\n", + "\n", + "elif model_type == \"electra-base\":\n", + " model_type = \"electra\"\n", + " model_name = \"google/electra-base-discriminator\"\n", + "\n", + "elif model_type == \"electra-small\":\n", + " model_type = \"electra\"\n", + " model_name = \"google/electra-small-discriminator\"\n", + "\n", + "elif model_type == \"xlnet\":\n", + " model_name = \"xlnet-base-cased\"" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "id": "QRdwLRNdZWWd" + }, + "outputs": [], + "source": [ + "# Configure the model \n", + "model_args = QuestionAnsweringArgs()\n", + "model_args.train_batch_size = 16\n", + "model_args.evaluate_during_training = True\n", + "model_args.n_best_size=3\n", + "model_args.num_train_epochs=5\n" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "id": "d6BA_Dr4iIsI" + }, + "outputs": [], + "source": [ + "### Advanced Methodology\n", + "train_args = {\n", + " \"reprocess_input_data\": True,\n", + " \"overwrite_output_dir\": True,\n", + " \"use_cached_eval_features\": True,\n", + " \"output_dir\": f\"outputs/{model_type}\",\n", + " \"best_model_dir\": f\"outputs/{model_type}/best_model\",\n", + " \"evaluate_during_training\": True,\n", + " \"max_seq_length\": 128,\n", + " \"num_train_epochs\": 5,\n", + " \"evaluate_during_training_steps\": 1000,\n", + " \"wandb_project\": \"Question Answer Application\",\n", + " \"wandb_kwargs\": {\"name\": model_name},\n", + " \"save_model_every_epoch\": False,\n", + " \"save_eval_checkpoints\": False,\n", + " \"n_best_size\":3,\n", + " # \"use_early_stopping\": True,\n", + " # \"early_stopping_metric\": \"mcc\",\n", + " # \"n_gpu\": 2,\n", + " # \"manual_seed\": 4,\n", + " # \"use_multiprocessing\": False,\n", + " \"train_batch_size\": 128,\n", + " \"eval_batch_size\": 64,\n", + " # \"config\": {\n", + " # \"output_hidden_states\": True\n", + " # }\n", + "}" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, - "6890f7d38f264242b7d358bb96a138c5": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "state": { - "_view_name": "HTMLView", - "style": "IPY_MODEL_a1dd7e959aa14e4b98517f8c3999c48f", - "_dom_classes": [], - "description": "", - "_model_name": "HTMLModel", - "placeholder": "​", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": "Epoch 5 of 5: 100%", - "_view_count": null, - "_view_module_version": "1.5.0", - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_c5ea4fa154d34774ab35c3f7cc65afa1" - } + "id": "l03UlJEeZdWs", + "outputId": "9243c235-f1c1-400d-8857-cf7bf6a86e39" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Some weights of the model checkpoint at bert-base-cased were not used when initializing BertForQuestionAnswering: ['cls.seq_relationship.weight', 'cls.predictions.bias', 'cls.seq_relationship.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.weight']\n", + "- This IS expected if you are initializing BertForQuestionAnswering from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n", + "- This IS NOT expected if you are initializing BertForQuestionAnswering from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n", + "Some weights of BertForQuestionAnswering were not initialized from the model checkpoint at bert-base-cased and are newly initialized: ['qa_outputs.weight', 'qa_outputs.bias']\n", + "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" + ] + } + ], + "source": [ + "model = QuestionAnsweringModel(\n", + " model_type,model_name, args=train_args\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "id": "OqZs8sp-amuQ" + }, + "outputs": [], + "source": [ + "### Remove output folder\n", + "!rm -rf outputs" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1000, + "referenced_widgets": [ + "0b5ee432816e46f88158cfc5a15d9404", + "44a4217b7b7247358c72e675c948b9ae", + "6890f7d38f264242b7d358bb96a138c5", + "28cdcbb9686e4a4a804dac34106a2a5f", + "ae3da4fc79324b089f59eedf0b67525c", + "a1dd7e959aa14e4b98517f8c3999c48f", + "c5ea4fa154d34774ab35c3f7cc65afa1", + "b010a66c56f64cac8bb0484e1a70e810", + "c2afb43c448d4cd5a8fbced2be0e15a2", + "e22b28ba6ec1430c8fe2f7a4892a36a4", + "77516bde7edc431cbfe170d3cd5e3cf8", + "22e5f993074e4ad095ead3b72014daad", + "db0bfe2709a540408ab2d2e527ea12f2", + "e673a6cfae4447afb64ddcec7adb4910", + "091a4f5876a64f969e54e7982880f6cb", + "f9069c067dbf4a5c89d23a2d0efa2fb6", + "f6d577afb7bf4d97baeb9c0795ad512b", + "cd2ce76442724c0498d6a4e5c861091e", + "c7df953a9faa47c1a90b71d35c81332e", + "a58c9abceb744f118f634b31a76a7bd8", + "92a286729b254f5ca48fb5d9e28dbf17", + "0c149bb97d49465393a54f3561f7281f", + "5c31615990a243108be5dd952260f350", + "75376836276e426f8ec855af266421b6", + "71813407ca74457b898473b319e253f4", + "3781ad7a5584429590dfecb7b644551d", + "b8ce0f65248a4110bfef367d5848a25f", + "8493294d041742328ef62841094d6c42", + "2c046f18114e443daead60573086a6dd", + "06c9dcac0a10465da24e1ca7e6b1977f", + "7dd75ef3a89147c58441b0bed9e66be9", + "0a5eade50e6f4cd4a490ed473b7d4460", + "dd35ae72151a4858b2700d92ec25d4f8", + "f8057921a5364527b1f9c1b538fe25d8", + "6066b91b466f4846ba2b45da95ef78c7", + "7f783f003527489a9c842665e7e0ab01", + "f3b7129b785a48b7a1a26261a983cb35", + "94f2f65f11514704b09156537d3b77a3", + "a30a6d490d38450ebbd039e65d5f66f2", + "0c2363f31ff94023aabfd0742cf2c19c", + "86670c2853bd437a990babd8e3909f9d", + "42692b252a7e4765ade293bd6f58d48a", + "a40954eb77344b72ba2c8827d6a74812", + "1ccb01edbd084aec98bafe27741ff750", + "6a0d63f38bcf4a5e9d3ff657ec8ee7e8", + "bdb5c03b530943d68c9c3ab96b8a855d", + "d722a13d11e74744af78f140ea8d86da", + "631c2bfad1bf4625afbfd663c04f9202", + "722f29fc306f4fd0807ec642cb73fd66", + "66b95ae3b79340bba8302c23dbae3d2b", + "2c26f8ec17df4fd182fe0b94f5b3709a", + "94d63dc4d36848e4b0c1a0567430b5cb", + "696faa310ef54840afa560c70010a15b", + "a28c7228865a41d0b3a532788b3b89e4", + "92152edb40d54de7b28a65f080fdb8f4", + "3f48d65399e24eb886e0d6bc69e7049d", + "617f4ccde4ad465c85cc9d055d812a54", + "c3cc39c042b543b4935db417e186255e", + "dbb0aaaa8d014816a1f92374376907e6", + "84701cd9af324aed9f7624ca8169f20d", + "4b8f5adaab8246f59e45369bac6d49cb", + "5ba2ca1e9ced40e6a9e0ccd282fa07bf", + "5f4c318ad8c9404d962f69c13aad2274", + "3816945510064a21ab4ee800a2fe994e", + "1b2215f0d4834a3ea2e3b5bad3a9391e", + "bbf5fc30e0f54253ae2751534f55b7a0", + "a4ac952a89c34007a31463d69bad59c6", + "cb6d028b77f24b6faddd14f676bb8e5c", + "716d5079d1934136b19c70638c655269", + "921a80e2ed824f96aeafb5de6547f1b0", + "8b8cf9e563c74a68ad68897ccedff0fa", + "eb8c2427926f46ceb230b9bf011f00b3", + "83314d5d823843f6b3cf38b85c8e8197", + "8ea8229b37aa47b8a76cb1f45b52dced", + "641e56d1619347659afb967e6b7235e5", + "5903d2d04a244de0929e1eee60eb61d8", + "a3e0eaf3cbf743d6b8d466cfc6c99702", + "e48903a2e25e48888c0bac2737106195", + "710965e7c5104f649d20dd09610306d7", + "1675bf757b6e4f9a802d6709c5138514", + "f443455612e542aaaa20b7b3d02bbe9b", + "3e888ceaccbc43dbba1a64ad68b63480", + "d7782e0b8c2f4635ad5ec638871c5140", + "1b2c598a01254472a6191348d8f4f9ea", + "832d816019844416bbe6f3eb67dfc66d", + "081690b4116b42a98a5328351d48bdf9", + "601394562ab4448482dd795241a168c3", + "4c8f1ecc79c246e580921ea3f2191cba", + "1128386ee4684dc6aa814c3213d2b92d", + "69c34ebd80e143e4b810733d4b25a6a1", + "c9a630f5a676417c8330ceb49e8b461c", + "9f253f40f4f34135a9017d0a32d5fc04", + "fe65c4070b5a404a8087dd663fbdb5e7", + "b4fe63e36536490ea8308f76c8f34b40", + "14be31da15ee462191a7cabe86d0c2d0", + "d89d469e300b4b6c9de570f9a241629f", + "0716bbdbec944aad8873d71d29c77758", + "37d628b85bad4569b63d8068b9b180d5", + "4fb4c6abc688444ea159d50aefc99332", + "0423dc0528cf4b11930cd97cbac3750f", + "c112529bba2a4d05a853f997bd8bb4f2", + "c6bb5998e42c400097ec8f78919cfccf", + "978a66b9988e449a9b2ab4fd88e9d56d", + "f3065b1696dd429f90ebf9390f0c3bf2", + "7110f0ba45fc4f728d75269f0d18524d", + "89eb2eee1bfc43de800ee49bf4cb401f", + "68d65940eea148bcadab476e79ecc720", + "6f6ce4f103bb4e97af03112844072576", + "413548e8eb484bcca9bea427ef828e90", + "cf6333ea666e4230a1193df60fe3f435", + "723b9e5482774968997e06d787d26caf", + "ac6a38f564d24a14b1aefcfe326c5676", + "9fcdeb5730094f21a51ccd31fb5abb75", + "f7ea7ee74c584695863f1583c2b5449f", + "aaafc07c3932439989e558afee87eb8b", + "147cd42375574013a06098894c5d695c", + "e9d127aab0984a2f982e45b7f4e87725", + "284cdbb512434508924f74e566c635c8", + "99964ee1e9bd4e8abde466bde6e6c87a", + "55455f6a1f854900a8447cb242fd5d1a", + "a7be93a06219440c9f8fafc580a064b1", + "bdaf1896009948cfbe9bcb3689587310", + "e36c81e45cee48458f7a055edbddbf5e", + "89771abf1ef246d7bc58a23373188167", + "d4ef4a14afc54842abcede90c27da86a", + "edbf4db6b27144d5803c6aa501cc5ae5", + "6109c4ce8b1944f18fb30f7261bebd61", + "8df5a86f876a4699a5917e5e0dfab0ed", + "8d38e67c4b814e89a2e4495ffbaaf310" + ] }, - "28cdcbb9686e4a4a804dac34106a2a5f": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "state": { - "_view_name": "ProgressView", - "style": "IPY_MODEL_b010a66c56f64cac8bb0484e1a70e810", - "_dom_classes": [], - "description": "", - "_model_name": "FloatProgressModel", - "bar_style": "success", - "max": 5, - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": 5, - "_view_count": null, - "_view_module_version": "1.5.0", - "orientation": "horizontal", - "min": 0, - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_c2afb43c448d4cd5a8fbced2be0e15a2" - } + "id": "XhAXYugxZfP-", + "outputId": "3eab43f6-aff4-4a27-dcec-f526b9ba1074" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "convert squad examples to features: 0%| | 0/4 [00:00" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "c2afb43c448d4cd5a8fbced2be0e15a2": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + { + "data": { + "text/html": [ + "
Waiting for W&B process to finish, PID 881
Program ended successfully." + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "e22b28ba6ec1430c8fe2f7a4892a36a4": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "state": { - "_view_name": "StyleView", - "_model_name": "DescriptionStyleModel", - "description_width": "", - "_view_module": "@jupyter-widgets/base", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.2.0", - "_model_module": "@jupyter-widgets/controls" - } + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "22e5f993074e4ad095ead3b72014daad", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(Label(value=' 0.03MB of 0.03MB uploaded (0.00MB deduped)\\r'), FloatProgress(value=1.0, max=1.0)…" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "77516bde7edc431cbfe170d3cd5e3cf8": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + { + "data": { + "text/html": [ + "Find user logs for this run at: /content/wandb/run-20210526_120044-3fvn96dp/logs/debug.log" + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "22e5f993074e4ad095ead3b72014daad": { - "model_module": "@jupyter-widgets/controls", - "model_name": "VBoxModel", - "state": { - "_view_name": "VBoxView", - "_dom_classes": [], - "_model_name": "VBoxModel", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.5.0", - "box_style": "", - "layout": "IPY_MODEL_db0bfe2709a540408ab2d2e527ea12f2", - "_model_module": "@jupyter-widgets/controls", - "children": [ - "IPY_MODEL_e673a6cfae4447afb64ddcec7adb4910", - "IPY_MODEL_091a4f5876a64f969e54e7982880f6cb" + { + "data": { + "text/html": [ + "Find internal logs for this run at: /content/wandb/run-20210526_120044-3fvn96dp/logs/debug-internal.log" + ], + "text/plain": [ + "" ] - } + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "db0bfe2709a540408ab2d2e527ea12f2": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + { + "data": { + "text/html": [ + "

Run summary:


\n", + "
global_step3
correct0
similar1
incorrect2
train_loss4.37429
eval_loss-0.10474
_runtime11
_timestamp1622030455
_step2
" + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "e673a6cfae4447afb64ddcec7adb4910": { - "model_module": "@jupyter-widgets/controls", - "model_name": "LabelModel", - "state": { - "_view_name": "LabelView", - "style": "IPY_MODEL_f9069c067dbf4a5c89d23a2d0efa2fb6", - "_dom_classes": [], - "description": "", - "_model_name": "LabelModel", - "placeholder": "​", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": " 0.04MB of 0.04MB uploaded (0.00MB deduped)\r", - "_view_count": null, - "_view_module_version": "1.5.0", - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_f6d577afb7bf4d97baeb9c0795ad512b" - } + { + "data": { + "text/html": [ + "

Run history:


\n", + "
global_step▁▅█
correct▁▁▁
similar▁▁▁
incorrect▁▁▁
train_loss██▁
eval_loss█▃▁
_runtime▁▂█
_timestamp▁▂█
_step▁▅█

" + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "091a4f5876a64f969e54e7982880f6cb": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "state": { - "_view_name": "ProgressView", - "style": "IPY_MODEL_cd2ce76442724c0498d6a4e5c861091e", - "_dom_classes": [], - "description": "", - "_model_name": "FloatProgressModel", - "bar_style": "", - "max": 1, - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": 1, - "_view_count": null, - "_view_module_version": "1.5.0", - "orientation": "horizontal", - "min": 0, - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_c7df953a9faa47c1a90b71d35c81332e" - } + { + "data": { + "text/html": [ + "Synced 5 W&B file(s), 1 media file(s), 0 artifact file(s) and 0 other file(s)" + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "f9069c067dbf4a5c89d23a2d0efa2fb6": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "state": { - "_view_name": "StyleView", - "_model_name": "DescriptionStyleModel", - "description_width": "", - "_view_module": "@jupyter-widgets/base", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.2.0", - "_model_module": "@jupyter-widgets/controls" - } + { + "data": { + "text/html": [ + "\n", + "
Synced bert-base-cased: https://wandb.ai/krishnaik06/Question%20Answer%20Application/runs/3fvn96dp
\n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "f6d577afb7bf4d97baeb9c0795ad512b": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + { + "data": { + "text/html": [ + "...Successfully finished last run (ID:3fvn96dp). Initializing new run:

" + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "cd2ce76442724c0498d6a4e5c861091e": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "state": { - "_view_name": "StyleView", - "_model_name": "ProgressStyleModel", - "description_width": "", - "_view_module": "@jupyter-widgets/base", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.2.0", - "bar_color": null, - "_model_module": "@jupyter-widgets/controls" - } + { + "data": { + "text/html": [ + "\n", + " Tracking run with wandb version 0.10.30
\n", + " Syncing run bert-base-cased to Weights & Biases (Documentation).
\n", + " Project page: https://wandb.ai/krishnaik06/Question%20Answer%20Application
\n", + " Run page: https://wandb.ai/krishnaik06/Question%20Answer%20Application/runs/1nwdd28e
\n", + " Run data is saved locally in /content/wandb/run-20210526_120247-1nwdd28e

\n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, - "c7df953a9faa47c1a90b71d35c81332e": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "a58c9abceb744f118f634b31a76a7bd8", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Running Epoch 0 of 5: 0%| | 0/1 [00:00=4.2.0\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d5/43/cfe4ee779bbd6a678ac6a97c5a5cdeb03c35f9eaebbb9720b036680f9a2d/transformers-4.6.1-py3-none-any.whl (2.2MB)\n", - "\u001b[K |████████████████████████████████| 2.3MB 63.8MB/s \n", - "\u001b[?25hCollecting sentencepiece\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f5/99/e0808cb947ba10f575839c43e8fafc9cc44e4a7a2c8f79c60db48220a577/sentencepiece-0.1.95-cp37-cp37m-manylinux2014_x86_64.whl (1.2MB)\n", - "\u001b[K |████████████████████████████████| 1.2MB 51.8MB/s \n", - "\u001b[?25hRequirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (1.19.5)\n", - "Collecting tqdm>=4.47.0\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/42/d7/f357d98e9b50346bcb6095fe3ad205d8db3174eb5edb03edfe7c4099576d/tqdm-4.61.0-py2.py3-none-any.whl (75kB)\n", - "\u001b[K |████████████████████████████████| 81kB 12.2MB/s \n", - "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from simpletransformers) (2.23.0)\n", - "Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->simpletransformers) (1.0.1)\n", - "Requirement already satisfied: cachetools>=4.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (4.2.2)\n", - "Requirement already satisfied: astor in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (0.8.1)\n", - "Requirement already satisfied: altair>=3.2.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (4.1.0)\n", - "Collecting gitpython\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/27/da/6f6224fdfc47dab57881fe20c0d1bc3122be290198ba0bf26a953a045d92/GitPython-3.1.17-py3-none-any.whl (166kB)\n", - "\u001b[K |████████████████████████████████| 174kB 57.5MB/s \n", - "\u001b[?25hRequirement already satisfied: protobuf!=3.11,>=3.6.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (3.12.4)\n", - "Requirement already satisfied: tornado>=5.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (5.1.1)\n", - "Requirement already satisfied: pyarrow; python_version < \"3.9\" in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (3.0.0)\n", - "Collecting pydeck>=0.1.dev5\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/d6/bc/f0e44828e4290367c869591d50d3671a4d0ee94926da6cb734b7b200308c/pydeck-0.6.2-py2.py3-none-any.whl (4.2MB)\n", - "\u001b[K |████████████████████████████████| 4.2MB 45.5MB/s \n", - "\u001b[?25hCollecting validators\n", - " Downloading https://files.pythonhosted.org/packages/db/2f/7fed3ee94ad665ad2c1de87f858f10a7785251ff75b4fd47987888d07ef1/validators-0.18.2-py3-none-any.whl\n", - "Requirement already satisfied: python-dateutil in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (2.8.1)\n", - "Requirement already satisfied: click<8.0,>=7.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (7.1.2)\n", - "Collecting base58\n", - " Downloading https://files.pythonhosted.org/packages/b8/a1/d9f565e9910c09fd325dc638765e8843a19fa696275c16cc08cf3b0a3c25/base58-2.1.0-py3-none-any.whl\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (7.1.2)\n", - "Requirement already satisfied: tzlocal in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (1.5.1)\n", - "Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (20.9)\n", - "Collecting watchdog; platform_system != \"Darwin\"\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/f2/5b/36b3b11e557830de6fc1dc06e9aa3ee274119b8cea9cc98175dbbf72cf87/watchdog-2.1.2-py3-none-manylinux2014_x86_64.whl (74kB)\n", - "\u001b[K |████████████████████████████████| 81kB 10.1MB/s \n", - "\u001b[?25hCollecting blinker\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1b/51/e2a9f3b757eb802f61dc1f2b09c8c99f6eb01cf06416c0671253536517b6/blinker-1.4.tar.gz (111kB)\n", - "\u001b[K |████████████████████████████████| 112kB 72.6MB/s \n", - "\u001b[?25hRequirement already satisfied: toml in /usr/local/lib/python3.7/dist-packages (from streamlit->simpletransformers) (0.10.2)\n", - "Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->simpletransformers) (2018.9)\n", - "Requirement already satisfied: promise<3,>=2.0 in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (2.3)\n", - "Collecting sentry-sdk>=0.4.0\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/1c/4a/a54b254f67d8f4052338d54ebe90126f200693440a93ef76d254d581e3ec/sentry_sdk-1.1.0-py2.py3-none-any.whl (131kB)\n", - "\u001b[K |████████████████████████████████| 133kB 63.8MB/s \n", - "\u001b[?25hCollecting configparser>=3.8.1\n", - " Downloading https://files.pythonhosted.org/packages/fd/01/ff260a18caaf4457eb028c96eeb405c4a230ca06c8ec9c1379f813caa52e/configparser-5.0.2-py3-none-any.whl\n", - "Requirement already satisfied: psutil>=5.0.0 in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (5.4.8)\n", - "Requirement already satisfied: PyYAML in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (3.13)\n", - "Requirement already satisfied: six>=1.13.0 in /usr/local/lib/python3.7/dist-packages (from wandb->simpletransformers) (1.15.0)\n", - "Collecting subprocess32>=3.5.3\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/32/c8/564be4d12629b912ea431f1a50eb8b3b9d00f1a0b1ceff17f266be190007/subprocess32-3.5.4.tar.gz (97kB)\n", - "\u001b[K |████████████████████████████████| 102kB 14.4MB/s \n", - "\u001b[?25hCollecting pathtools\n", - " Downloading https://files.pythonhosted.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a/pathtools-0.1.2.tar.gz\n", - "Collecting shortuuid>=0.5.0\n", - " Downloading https://files.pythonhosted.org/packages/25/a6/2ecc1daa6a304e7f1b216f0896b26156b78e7c38e1211e9b798b4716c53d/shortuuid-1.0.1-py3-none-any.whl\n", - "Collecting docker-pycreds>=0.4.0\n", - " Downloading https://files.pythonhosted.org/packages/f5/e8/f6bd1eee09314e7e6dee49cbe2c5e22314ccdb38db16c9fc72d2fa80d054/docker_pycreds-0.4.0-py2.py3-none-any.whl\n", - "Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from datasets->simpletransformers) (4.0.1)\n", - "Collecting fsspec\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/bc/52/816d1a3a599176057bf29dfacb1f8fadb61d35fbd96cb1bab4aaa7df83c0/fsspec-2021.5.0-py3-none-any.whl (111kB)\n", - "\u001b[K |████████████████████████████████| 112kB 63.2MB/s \n", - "\u001b[?25hRequirement already satisfied: dill in /usr/local/lib/python3.7/dist-packages (from datasets->simpletransformers) (0.3.3)\n", - "Collecting xxhash\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/7d/4f/0a862cad26aa2ed7a7cd87178cbbfa824fc1383e472d63596a0d018374e7/xxhash-2.0.2-cp37-cp37m-manylinux2010_x86_64.whl (243kB)\n", - "\u001b[K |████████████████████████████████| 245kB 48.8MB/s \n", - "\u001b[?25hCollecting huggingface-hub<0.1.0\n", - " Downloading https://files.pythonhosted.org/packages/32/a1/7c5261396da23ec364e296a4fb8a1cd6a5a2ff457215c6447038f18c0309/huggingface_hub-0.0.9-py3-none-any.whl\n", - "Requirement already satisfied: multiprocess in /usr/local/lib/python3.7/dist-packages (from datasets->simpletransformers) (0.70.11.1)\n", - "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers>=4.2.0->simpletransformers) (3.0.12)\n", - "Collecting sacremoses\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/75/ee/67241dc87f266093c533a2d4d3d69438e57d7a90abb216fa076e7d475d4a/sacremoses-0.0.45-py3-none-any.whl (895kB)\n", - "\u001b[K |████████████████████████████████| 901kB 54.1MB/s \n", - "\u001b[?25hRequirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->simpletransformers) (2020.12.5)\n", - "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->simpletransformers) (3.0.4)\n", - "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->simpletransformers) (2.10)\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->simpletransformers) (1.24.3)\n", - "Requirement already satisfied: entrypoints in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (0.3)\n", - "Requirement already satisfied: toolz in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (0.11.1)\n", - "Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (2.11.3)\n", - "Requirement already satisfied: jsonschema in /usr/local/lib/python3.7/dist-packages (from altair>=3.2.0->streamlit->simpletransformers) (2.6.0)\n", - "Requirement already satisfied: typing-extensions>=3.7.4.0; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from gitpython->streamlit->simpletransformers) (3.7.4.3)\n", - "Collecting gitdb<5,>=4.0.1\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/ea/e8/f414d1a4f0bbc668ed441f74f44c116d9816833a48bf81d22b697090dba8/gitdb-4.0.7-py3-none-any.whl (63kB)\n", - "\u001b[K |████████████████████████████████| 71kB 9.1MB/s \n", - "\u001b[?25hRequirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from protobuf!=3.11,>=3.6.0->streamlit->simpletransformers) (56.1.0)\n", - "Requirement already satisfied: ipywidgets>=7.0.0 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit->simpletransformers) (7.6.3)\n", - "Collecting ipykernel>=5.1.2; python_version >= \"3.4\"\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/90/6d/6c8fe4b658f77947d4244ce81f60230c4c8d1dc1a21ae83e63b269339178/ipykernel-5.5.5-py3-none-any.whl (120kB)\n", - "\u001b[K |████████████████████████████████| 122kB 44.0MB/s \n", - "\u001b[?25hRequirement already satisfied: traitlets>=4.3.2 in /usr/local/lib/python3.7/dist-packages (from pydeck>=0.1.dev5->streamlit->simpletransformers) (5.0.5)\n", - "Requirement already satisfied: decorator>=3.4.0 in /usr/local/lib/python3.7/dist-packages (from validators->streamlit->simpletransformers) (4.4.2)\n", - "Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->streamlit->simpletransformers) (2.4.7)\n", - "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->datasets->simpletransformers) (3.4.1)\n", - "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->altair>=3.2.0->streamlit->simpletransformers) (2.0.1)\n", - "Collecting smmap<5,>=3.0.1\n", - " Downloading https://files.pythonhosted.org/packages/68/ee/d540eb5e5996eb81c26ceffac6ee49041d473bc5125f2aa995cf51ec1cf1/smmap-4.0.0-py2.py3-none-any.whl\n", - "Requirement already satisfied: ipython>=4.0.0; python_version >= \"3.3\" in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.5.0)\n", - "Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (3.5.1)\n", - "Requirement already satisfied: jupyterlab-widgets>=1.0.0; python_version >= \"3.6\" in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.0.0)\n", - "Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.1.3)\n", - "Requirement already satisfied: jupyter-client in /usr/local/lib/python3.7/dist-packages (from ipykernel>=5.1.2; python_version >= \"3.4\"->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.3.5)\n", - "Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.7/dist-packages (from traitlets>=4.3.2->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.2.0)\n", - "Requirement already satisfied: pexpect; sys_platform != \"win32\" in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (4.8.0)\n", - "Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.0.18)\n", - "Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (2.6.1)\n", - "Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.7.5)\n", - "Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.8.1)\n", - "Requirement already satisfied: notebook>=4.4.1 in /usr/local/lib/python3.7/dist-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.3.1)\n", - "Requirement already satisfied: jupyter-core in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (4.7.1)\n", - "Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client->ipykernel>=5.1.2; python_version >= \"3.4\"->pydeck>=0.1.dev5->streamlit->simpletransformers) (22.0.3)\n", - "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.7/dist-packages (from pexpect; sys_platform != \"win32\"->ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.7.0)\n", - "Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=4.0.0; python_version >= \"3.3\"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.2.5)\n", - "Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.10.0)\n", - "Requirement already satisfied: Send2Trash in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.5.0)\n", - "Requirement already satisfied: nbconvert in /usr/local/lib/python3.7/dist-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (5.6.1)\n", - "Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (1.4.3)\n", - "Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (3.3.0)\n", - "Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.7.1)\n", - "Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.5.0)\n", - "Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.8.4)\n", - "Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit->simpletransformers) (0.5.1)\n", - "Building wheels for collected packages: seqeval, blinker, subprocess32, pathtools\n", - " Building wheel for seqeval (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for seqeval: filename=seqeval-1.2.2-cp37-none-any.whl size=16172 sha256=6ce447af50e56210de246f069f2da9c8161f4a5928dcd48dc961e05eee47c2bf\n", - " Stored in directory: /root/.cache/pip/wheels/52/df/1b/45d75646c37428f7e626214704a0e35bd3cfc32eda37e59e5f\n", - " Building wheel for blinker (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for blinker: filename=blinker-1.4-cp37-none-any.whl size=13448 sha256=769c30e20f601a60ead8bdf552a593b27ed09008b50ba67be92d8241b38031bd\n", - " Stored in directory: /root/.cache/pip/wheels/92/a0/00/8690a57883956a301d91cf4ec999cc0b258b01e3f548f86e89\n", - " Building wheel for subprocess32 (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for subprocess32: filename=subprocess32-3.5.4-cp37-none-any.whl size=6489 sha256=08d0d6af0349a4458713ddec6d01a0037ac0c3f2e2266bd25535b65465f00f81\n", - " Stored in directory: /root/.cache/pip/wheels/68/39/1a/5e402bdfdf004af1786c8b853fd92f8c4a04f22aad179654d1\n", - " Building wheel for pathtools (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for pathtools: filename=pathtools-0.1.2-cp37-none-any.whl size=8786 sha256=c49e5852d18a7dc8a1617bec9549c6151bf47d4cf9947a7e1b7ce1455cd07472\n", - " Stored in directory: /root/.cache/pip/wheels/0b/04/79/c3b0c3a0266a3cb4376da31e5bfe8bba0c489246968a68e843\n", - "Successfully built seqeval blinker subprocess32 pathtools\n", - "\u001b[31mERROR: google-colab 1.0.0 has requirement ipykernel~=4.10, but you'll have ipykernel 5.5.5 which is incompatible.\u001b[0m\n", - "\u001b[31mERROR: datasets 1.6.2 has requirement tqdm<4.50.0,>=4.27, but you'll have tqdm 4.61.0 which is incompatible.\u001b[0m\n", - "\u001b[31mERROR: transformers 4.6.1 has requirement huggingface-hub==0.0.8, but you'll have huggingface-hub 0.0.9 which is incompatible.\u001b[0m\n", - "Installing collected packages: smmap, gitdb, gitpython, ipykernel, pydeck, validators, base58, watchdog, blinker, streamlit, tokenizers, tensorboardx, sentry-sdk, configparser, subprocess32, pathtools, shortuuid, docker-pycreds, wandb, seqeval, tqdm, fsspec, xxhash, huggingface-hub, datasets, sacremoses, transformers, sentencepiece, simpletransformers\n", - " Found existing installation: ipykernel 4.10.1\n", - " Uninstalling ipykernel-4.10.1:\n", - " Successfully uninstalled ipykernel-4.10.1\n", - " Found existing installation: tqdm 4.41.1\n", - " Uninstalling tqdm-4.41.1:\n", - " Successfully uninstalled tqdm-4.41.1\n", - "Successfully installed base58-2.1.0 blinker-1.4 configparser-5.0.2 datasets-1.6.2 docker-pycreds-0.4.0 fsspec-2021.5.0 gitdb-4.0.7 gitpython-3.1.17 huggingface-hub-0.0.9 ipykernel-5.5.5 pathtools-0.1.2 pydeck-0.6.2 sacremoses-0.0.45 sentencepiece-0.1.95 sentry-sdk-1.1.0 seqeval-1.2.2 shortuuid-1.0.1 simpletransformers-0.61.5 smmap-4.0.0 streamlit-0.82.0 subprocess32-3.5.4 tensorboardx-2.2 tokenizers-0.10.3 tqdm-4.61.0 transformers-4.6.1 validators-0.18.2 wandb-0.10.30 watchdog-2.1.2 xxhash-2.0.2\n" - ], - "name": "stdout" }, - { - "output_type": "display_data", - "data": { - "application/vnd.colab-display-data+json": { - "pip_warning": { - "packages": [ - "ipykernel" - ] - } - } - }, - "metadata": { - "tags": [] + "bbf5fc30e0f54253ae2751534f55b7a0": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_921a80e2ed824f96aeafb5de6547f1b0", + "placeholder": "​", + "style": "IPY_MODEL_716d5079d1934136b19c70638c655269", + "value": "Epochs 2/5. Running Loss: 4.6400: 100%" } - } - ] - }, - { - "cell_type": "code", - "metadata": { - "id": "3SZo6mRnYivr" - }, - "source": [ - "import json\n", - "with open(r\"train.json\", \"r\") as read_file:\n", - " train = json.load(read_file)" - ], - "execution_count": 1, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" }, - "id": "zoiQlW1lZCzu", - "outputId": "0f532876-f0e0-4ff2-dad6-789181390ca9" - }, - "source": [ - "train" - ], - "execution_count": 2, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "[{'context': 'Mistborn is a series of epic fantasy novels written by American author Brandon Sanderson.',\n", - " 'qas': [{'answers': [{'answer_start': 71, 'text': 'Brandon Sanderson'}],\n", - " 'id': '00001',\n", - " 'is_impossible': False,\n", - " 'question': 'Who is the author of the Mistborn series?'}]},\n", - " {'context': 'The first series, published between 2006 and 2008, consists of The Final Empire,The Well of Ascension, and The Hero of Ages.',\n", - " 'qas': [{'answers': [{'answer_start': 28, 'text': 'between 2006 and 2008'}],\n", - " 'id': '00002',\n", - " 'is_impossible': False,\n", - " 'question': 'When was the series published?'},\n", - " {'answers': [{'answer_start': 63,\n", - " 'text': 'The Final Empire, The Well of Ascension, and The Hero of Ages'}],\n", - " 'id': '00003',\n", - " 'is_impossible': False,\n", - " 'question': 'What are the three books in the series?'},\n", - " {'answers': [],\n", - " 'id': '00004',\n", - " 'is_impossible': True,\n", - " 'question': 'Who is the main character in the series?'}]}]" - ] - }, - "metadata": { - "tags": [] - }, - "execution_count": 2 - } - ] - }, - { - "cell_type": "code", - "metadata": { - "id": "Zcf9395xZD7N" - }, - "source": [ - "with open(r\"test.json\", \"r\") as read_file:\n", - " test = json.load(read_file)" - ], - "execution_count": 3, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" + "bdaf1896009948cfbe9bcb3689587310": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_6109c4ce8b1944f18fb30f7261bebd61", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_edbf4db6b27144d5803c6aa501cc5ae5", + "value": 1 + } }, - "id": "ENWqJL1eZH4e", - "outputId": "2de4f972-7c17-4a47-ea45-cc72691719bb" - }, - "source": [ - "test" - ], - "execution_count": 4, - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "[{'context': 'The series primarily takes place in a region called the Final Empire on a world called Scadrial, where the sun and sky are red, vegetation is brown, and the ground is constantly being covered under black volcanic ashfalls.',\n", - " 'qas': [{'answers': [{'answer_start': 38,\n", - " 'text': 'region called the Final Empire'},\n", - " {'answer_start': 74, 'text': 'world called Scadrial'}],\n", - " 'id': '00001',\n", - " 'is_impossible': False,\n", - " 'question': 'Where does the series take place?'}]},\n", - " {'context': '\"Mistings\" have only one of the many Allomantic powers, while \"Mistborns\" have all the powers.',\n", - " 'qas': [{'answers': [{'answer_start': 21, 'text': 'one'}],\n", - " 'id': '00002',\n", - " 'is_impossible': False,\n", - " 'question': 'How many powers does a Misting possess?'},\n", - " {'answers': [],\n", - " 'id': '00003',\n", - " 'is_impossible': True,\n", - " 'question': 'What are Allomantic powers?'}]}]" - ] - }, - "metadata": { - "tags": [] - }, - "execution_count": 4 - } - ] - }, - { - "cell_type": "code", - "metadata": { - "id": "x-ybl95CeEwo" - }, - "source": [ - "" - ], - "execution_count": 52, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "id": "1fYyYz_cZI7v" - }, - "source": [ - "import logging\n", - "\n", - "from simpletransformers.question_answering import QuestionAnsweringModel, QuestionAnsweringArgs" - ], - "execution_count": 5, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "id": "o2GXJIZshpoz" - }, - "source": [ - "model_type=\"bert\"\n", - "model_name= \"bert-base-cased\"\n", - "if model_type == \"bert\":\n", - " model_name = \"bert-base-cased\"\n", - "\n", - "elif model_type == \"roberta\":\n", - " model_name = \"roberta-base\"\n", - "\n", - "elif model_type == \"distilbert\":\n", - " model_name = \"distilbert-base-cased\"\n", - "\n", - "elif model_type == \"distilroberta\":\n", - " model_type = \"roberta\"\n", - " model_name = \"distilroberta-base\"\n", - "\n", - "elif model_type == \"electra-base\":\n", - " model_type = \"electra\"\n", - " model_name = \"google/electra-base-discriminator\"\n", - "\n", - "elif model_type == \"electra-small\":\n", - " model_type = \"electra\"\n", - " model_name = \"google/electra-small-discriminator\"\n", - "\n", - "elif model_type == \"xlnet\":\n", - " model_name = \"xlnet-base-cased\"" - ], - "execution_count": 63, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "id": "QRdwLRNdZWWd" - }, - "source": [ - "# Configure the model \n", - "model_args = QuestionAnsweringArgs()\n", - "model_args.train_batch_size = 16\n", - "model_args.evaluate_during_training = True\n", - "model_args.n_best_size=3\n", - "model_args.num_train_epochs=5\n" - ], - "execution_count": 39, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "id": "d6BA_Dr4iIsI" - }, - "source": [ - "### Advanced Methodology\n", - "train_args = {\n", - " \"reprocess_input_data\": True,\n", - " \"overwrite_output_dir\": True,\n", - " \"use_cached_eval_features\": True,\n", - " \"output_dir\": f\"outputs/{model_type}\",\n", - " \"best_model_dir\": f\"outputs/{model_type}/best_model\",\n", - " \"evaluate_during_training\": True,\n", - " \"max_seq_length\": 128,\n", - " \"num_train_epochs\": 5,\n", - " \"evaluate_during_training_steps\": 1000,\n", - " \"wandb_project\": \"Question Answer Application\",\n", - " \"wandb_kwargs\": {\"name\": model_name},\n", - " \"save_model_every_epoch\": False,\n", - " \"save_eval_checkpoints\": False,\n", - " \"n_best_size\":3\n", - " # \"use_early_stopping\": True,\n", - " # \"early_stopping_metric\": \"mcc\",\n", - " # \"n_gpu\": 2,\n", - " # \"manual_seed\": 4,\n", - " # \"use_multiprocessing\": False,\n", - " \"train_batch_size\": 128,\n", - " \"eval_batch_size\": 64,\n", - " # \"config\": {\n", - " # \"output_hidden_states\": True\n", - " # }\n", - "}" - ], - "execution_count": 73, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" + "bdb5c03b530943d68c9c3ab96b8a855d": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_94d63dc4d36848e4b0c1a0567430b5cb", + "placeholder": "​", + "style": "IPY_MODEL_2c26f8ec17df4fd182fe0b94f5b3709a", + "value": " 1/1 [00:00<00:00, 7.52it/s]" + } }, - "id": "l03UlJEeZdWs", - "outputId": "9243c235-f1c1-400d-8857-cf7bf6a86e39" - }, - "source": [ - "model = QuestionAnsweringModel(\n", - " model_type,model_name, args=train_args\n", - ")" - ], - "execution_count": 75, - "outputs": [ - { - "output_type": "stream", - "text": [ - "Some weights of the model checkpoint at bert-base-cased were not used when initializing BertForQuestionAnswering: ['cls.seq_relationship.weight', 'cls.predictions.bias', 'cls.seq_relationship.bias', 'cls.predictions.decoder.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.LayerNorm.weight']\n", - "- This IS expected if you are initializing BertForQuestionAnswering from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n", - "- This IS NOT expected if you are initializing BertForQuestionAnswering from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n", - "Some weights of BertForQuestionAnswering were not initialized from the model checkpoint at bert-base-cased and are newly initialized: ['qa_outputs.weight', 'qa_outputs.bias']\n", - "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" - ], - "name": "stderr" - } - ] - }, - { - "cell_type": "code", - "metadata": { - "id": "OqZs8sp-amuQ" - }, - "source": [ - "### Remove output folder\n", - "!rm -rf outputs" - ], - "execution_count": 74, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 1000, - "referenced_widgets": [ - "0b5ee432816e46f88158cfc5a15d9404", - "44a4217b7b7247358c72e675c948b9ae", - "6890f7d38f264242b7d358bb96a138c5", - "28cdcbb9686e4a4a804dac34106a2a5f", - "ae3da4fc79324b089f59eedf0b67525c", - "a1dd7e959aa14e4b98517f8c3999c48f", - "c5ea4fa154d34774ab35c3f7cc65afa1", - "b010a66c56f64cac8bb0484e1a70e810", - "c2afb43c448d4cd5a8fbced2be0e15a2", - "e22b28ba6ec1430c8fe2f7a4892a36a4", - "77516bde7edc431cbfe170d3cd5e3cf8", - "22e5f993074e4ad095ead3b72014daad", - "db0bfe2709a540408ab2d2e527ea12f2", - "e673a6cfae4447afb64ddcec7adb4910", - "091a4f5876a64f969e54e7982880f6cb", - "f9069c067dbf4a5c89d23a2d0efa2fb6", - "f6d577afb7bf4d97baeb9c0795ad512b", - "cd2ce76442724c0498d6a4e5c861091e", - "c7df953a9faa47c1a90b71d35c81332e", - "a58c9abceb744f118f634b31a76a7bd8", - "92a286729b254f5ca48fb5d9e28dbf17", - "0c149bb97d49465393a54f3561f7281f", - "5c31615990a243108be5dd952260f350", - "75376836276e426f8ec855af266421b6", - "71813407ca74457b898473b319e253f4", - "3781ad7a5584429590dfecb7b644551d", - "b8ce0f65248a4110bfef367d5848a25f", - "8493294d041742328ef62841094d6c42", - "2c046f18114e443daead60573086a6dd", - "06c9dcac0a10465da24e1ca7e6b1977f", - "7dd75ef3a89147c58441b0bed9e66be9", - "0a5eade50e6f4cd4a490ed473b7d4460", - "dd35ae72151a4858b2700d92ec25d4f8", - "f8057921a5364527b1f9c1b538fe25d8", - "6066b91b466f4846ba2b45da95ef78c7", - "7f783f003527489a9c842665e7e0ab01", - "f3b7129b785a48b7a1a26261a983cb35", - "94f2f65f11514704b09156537d3b77a3", - "a30a6d490d38450ebbd039e65d5f66f2", - "0c2363f31ff94023aabfd0742cf2c19c", - "86670c2853bd437a990babd8e3909f9d", - "42692b252a7e4765ade293bd6f58d48a", - "a40954eb77344b72ba2c8827d6a74812", - "1ccb01edbd084aec98bafe27741ff750", - "6a0d63f38bcf4a5e9d3ff657ec8ee7e8", - "bdb5c03b530943d68c9c3ab96b8a855d", - "d722a13d11e74744af78f140ea8d86da", - "631c2bfad1bf4625afbfd663c04f9202", - "722f29fc306f4fd0807ec642cb73fd66", - "66b95ae3b79340bba8302c23dbae3d2b", - "2c26f8ec17df4fd182fe0b94f5b3709a", - "94d63dc4d36848e4b0c1a0567430b5cb", - "696faa310ef54840afa560c70010a15b", - "a28c7228865a41d0b3a532788b3b89e4", - "92152edb40d54de7b28a65f080fdb8f4", - "3f48d65399e24eb886e0d6bc69e7049d", - "617f4ccde4ad465c85cc9d055d812a54", - "c3cc39c042b543b4935db417e186255e", - "dbb0aaaa8d014816a1f92374376907e6", - "84701cd9af324aed9f7624ca8169f20d", - "4b8f5adaab8246f59e45369bac6d49cb", - "5ba2ca1e9ced40e6a9e0ccd282fa07bf", - "5f4c318ad8c9404d962f69c13aad2274", - "3816945510064a21ab4ee800a2fe994e", - "1b2215f0d4834a3ea2e3b5bad3a9391e", - "bbf5fc30e0f54253ae2751534f55b7a0", - "a4ac952a89c34007a31463d69bad59c6", - "cb6d028b77f24b6faddd14f676bb8e5c", - "716d5079d1934136b19c70638c655269", - "921a80e2ed824f96aeafb5de6547f1b0", - "8b8cf9e563c74a68ad68897ccedff0fa", - "eb8c2427926f46ceb230b9bf011f00b3", - "83314d5d823843f6b3cf38b85c8e8197", - "8ea8229b37aa47b8a76cb1f45b52dced", - "641e56d1619347659afb967e6b7235e5", - "5903d2d04a244de0929e1eee60eb61d8", - "a3e0eaf3cbf743d6b8d466cfc6c99702", - "e48903a2e25e48888c0bac2737106195", - "710965e7c5104f649d20dd09610306d7", - "1675bf757b6e4f9a802d6709c5138514", - "f443455612e542aaaa20b7b3d02bbe9b", - "3e888ceaccbc43dbba1a64ad68b63480", - "d7782e0b8c2f4635ad5ec638871c5140", - "1b2c598a01254472a6191348d8f4f9ea", - "832d816019844416bbe6f3eb67dfc66d", - "081690b4116b42a98a5328351d48bdf9", - "601394562ab4448482dd795241a168c3", - "4c8f1ecc79c246e580921ea3f2191cba", - "1128386ee4684dc6aa814c3213d2b92d", - "69c34ebd80e143e4b810733d4b25a6a1", - "c9a630f5a676417c8330ceb49e8b461c", - "9f253f40f4f34135a9017d0a32d5fc04", - "fe65c4070b5a404a8087dd663fbdb5e7", - "b4fe63e36536490ea8308f76c8f34b40", - "14be31da15ee462191a7cabe86d0c2d0", - "d89d469e300b4b6c9de570f9a241629f", - "0716bbdbec944aad8873d71d29c77758", - "37d628b85bad4569b63d8068b9b180d5", - "4fb4c6abc688444ea159d50aefc99332", - "0423dc0528cf4b11930cd97cbac3750f", - "c112529bba2a4d05a853f997bd8bb4f2", - "c6bb5998e42c400097ec8f78919cfccf", - "978a66b9988e449a9b2ab4fd88e9d56d", - "f3065b1696dd429f90ebf9390f0c3bf2", - "7110f0ba45fc4f728d75269f0d18524d", - "89eb2eee1bfc43de800ee49bf4cb401f", - "68d65940eea148bcadab476e79ecc720", - "6f6ce4f103bb4e97af03112844072576", - "413548e8eb484bcca9bea427ef828e90", - "cf6333ea666e4230a1193df60fe3f435", - "723b9e5482774968997e06d787d26caf", - "ac6a38f564d24a14b1aefcfe326c5676", - "9fcdeb5730094f21a51ccd31fb5abb75", - "f7ea7ee74c584695863f1583c2b5449f", - "aaafc07c3932439989e558afee87eb8b", - "147cd42375574013a06098894c5d695c", - "e9d127aab0984a2f982e45b7f4e87725", - "284cdbb512434508924f74e566c635c8", - "99964ee1e9bd4e8abde466bde6e6c87a", - "55455f6a1f854900a8447cb242fd5d1a", - "a7be93a06219440c9f8fafc580a064b1", - "bdaf1896009948cfbe9bcb3689587310", - "e36c81e45cee48458f7a055edbddbf5e", - "89771abf1ef246d7bc58a23373188167", - "d4ef4a14afc54842abcede90c27da86a", - "edbf4db6b27144d5803c6aa501cc5ae5", - "6109c4ce8b1944f18fb30f7261bebd61", - "8df5a86f876a4699a5917e5e0dfab0ed", - "8d38e67c4b814e89a2e4495ffbaaf310" - ] + "c112529bba2a4d05a853f997bd8bb4f2": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_68d65940eea148bcadab476e79ecc720", + "placeholder": "​", + "style": "IPY_MODEL_89eb2eee1bfc43de800ee49bf4cb401f", + "value": " 1/1 [00:00<00:00, 21.10it/s]" + } + }, + "c2afb43c448d4cd5a8fbced2be0e15a2": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c3cc39c042b543b4935db417e186255e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c5ea4fa154d34774ab35c3f7cc65afa1": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c6bb5998e42c400097ec8f78919cfccf": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "c7df953a9faa47c1a90b71d35c81332e": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "c9a630f5a676417c8330ceb49e8b461c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "cb6d028b77f24b6faddd14f676bb8e5c": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8ea8229b37aa47b8a76cb1f45b52dced", + "placeholder": "​", + "style": "IPY_MODEL_83314d5d823843f6b3cf38b85c8e8197", + "value": " 1/1 [00:00<00:00, 7.97it/s]" + } + }, + "cd24d3bfb7f24c3a883153c15bc24e94": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "cd2ce76442724c0498d6a4e5c861091e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "cf6333ea666e4230a1193df60fe3f435": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f7ea7ee74c584695863f1583c2b5449f", + "placeholder": "​", + "style": "IPY_MODEL_9fcdeb5730094f21a51ccd31fb5abb75", + "value": "Epochs 4/5. Running Loss: 3.9420: 100%" + } + }, + "d45223d29f3946e2ad36ec1e4dfb5a5a": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_e2d392f6fecc4f098b50087f3202bfe7", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2d1e1728b1f24cf0b81bc2a3876842ab", + "value": 1 + } }, - "id": "XhAXYugxZfP-", - "outputId": "3eab43f6-aff4-4a27-dcec-f526b9ba1074" - }, - "source": [ - "# Train the model\n", - "model.train_model(train, eval_data=test)" - ], - "execution_count": 76, - "outputs": [ - { - "output_type": "stream", - "text": [ - "\n", - "convert squad examples to features: 0%| | 0/4 [00:00" - ] - }, - "metadata": { - "tags": [] + "d7782e0b8c2f4635ad5ec638871c5140": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d89d469e300b4b6c9de570f9a241629f": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "db0bfe2709a540408ab2d2e527ea12f2": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "
Waiting for W&B process to finish, PID 881
Program ended successfully." - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "dbb0aaaa8d014816a1f92374376907e6": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null } }, - { - "output_type": "display_data", - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "22e5f993074e4ad095ead3b72014daad", - "version_minor": 0, - "version_major": 2 - }, - "text/plain": [ - "VBox(children=(Label(value=' 0.03MB of 0.03MB uploaded (0.00MB deduped)\\r'), FloatProgress(value=1.0, max=1.0)…" - ] - }, - "metadata": { - "tags": [] + "dd35ae72151a4858b2700d92ec25d4f8": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f3b7129b785a48b7a1a26261a983cb35", + "placeholder": "​", + "style": "IPY_MODEL_7f783f003527489a9c842665e7e0ab01", + "value": "Running Evaluation: 100%" } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "Find user logs for this run at: /content/wandb/run-20210526_120044-3fvn96dp/logs/debug.log" - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e11f59a1f14147138d57a7fad0b77d48": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "Find internal logs for this run at: /content/wandb/run-20210526_120044-3fvn96dp/logs/debug-internal.log" - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e22b28ba6ec1430c8fe2f7a4892a36a4": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "

Run summary:


\n", - "
global_step3
correct0
similar1
incorrect2
train_loss4.37429
eval_loss-0.10474
_runtime11
_timestamp1622030455
_step2
" - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e2d392f6fecc4f098b50087f3202bfe7": { + "model_module": "@jupyter-widgets/base", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "

Run history:


\n", - "
global_step▁▅█
correct▁▁▁
similar▁▁▁
incorrect▁▁▁
train_loss██▁
eval_loss█▃▁
_runtime▁▂█
_timestamp▁▂█
_step▁▅█

" - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e36c81e45cee48458f7a055edbddbf5e": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_8d38e67c4b814e89a2e4495ffbaaf310", + "placeholder": "​", + "style": "IPY_MODEL_8df5a86f876a4699a5917e5e0dfab0ed", + "value": " 1/1 [00:00<00:00, 22.19it/s]" } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "Synced 5 W&B file(s), 1 media file(s), 0 artifact file(s) and 0 other file(s)" + "e3e6d44436874c5dbbff96f0abafaf5b": { + "model_module": "@jupyter-widgets/controls", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_1a4e76baee4f46aab1454c458d260dbc", + "IPY_MODEL_0524e83805e14ce3af08099251a1301f", + "IPY_MODEL_4a88fd07a39c4f878b06c25574925e46" ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "layout": "IPY_MODEL_b8d529a5b95d4c8f93c0ece29d89db39" } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "\n", - "
Synced bert-base-cased: https://wandb.ai/krishnaik06/Question%20Answer%20Application/runs/3fvn96dp
\n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e48903a2e25e48888c0bac2737106195": { + "model_module": "@jupyter-widgets/controls", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d7782e0b8c2f4635ad5ec638871c5140", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_3e888ceaccbc43dbba1a64ad68b63480", + "value": 1 } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "...Successfully finished last run (ID:3fvn96dp). Initializing new run:

" - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e673a6cfae4447afb64ddcec7adb4910": { + "model_module": "@jupyter-widgets/controls", + "model_name": "LabelModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "LabelModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "LabelView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_f6d577afb7bf4d97baeb9c0795ad512b", + "placeholder": "​", + "style": "IPY_MODEL_f9069c067dbf4a5c89d23a2d0efa2fb6", + "value": " 0.04MB of 0.04MB uploaded (0.00MB deduped)\r" } }, - { - "output_type": "display_data", - "data": { - "text/html": [ - "\n", - " Tracking run with wandb version 0.10.30
\n", - " Syncing run bert-base-cased to Weights & Biases (Documentation).
\n", - " Project page: https://wandb.ai/krishnaik06/Question%20Answer%20Application
\n", - " Run page: https://wandb.ai/krishnaik06/Question%20Answer%20Application/runs/1nwdd28e
\n", - " Run data is saved locally in /content/wandb/run-20210526_120247-1nwdd28e

\n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] + "e9d127aab0984a2f982e45b7f4e87725": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" } }, - { - "output_type": "display_data", - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "a58c9abceb744f118f634b31a76a7bd8", - "version_minor": 0, - "version_major": 2 - }, - "text/plain": [ - "Running Epoch 0 of 5: 0%| | 0/1 [00:00