Skip to content

Instantly share code, notes, and snippets.

@habedi
Last active May 2, 2024 15:22
Show Gist options
  • Save habedi/352e4fd8ec29601e576bfbd4c7f929fb to your computer and use it in GitHub Desktop.
Save habedi/352e4fd8ec29601e576bfbd4c7f929fb to your computer and use it in GitHub Desktop.
end_to_end_pipeline_single_model.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/habedi/352e4fd8ec29601e576bfbd4c7f929fb/end_to_end_pipeline_single_model.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"CV score (partial): 0.4772\n",
"LB score: 0.4555"
],
"metadata": {
"id": "Zz7qo-YqYkzR"
}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "CF1Yc3Y71b7N"
},
"outputs": [],
"source": [
"#!pip -q install tensorflow==2.9"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "PC1xR4D0twlN",
"outputId": "3cb4ab8a-4e33-407b-e25b-9daa50b40620"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
]
}
],
"source": [
"from google.colab import drive\n",
"drive.mount('/content/drive')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "m5oqTJJ3vRdV",
"outputId": "0d99b4da-5e4c-4464-db11-6125011bcf04"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"'drive/MyDrive/Colab Notebooks/RATER/data/competition_data_like_fp21c.zip' -> './data/competition_data_like_fp21c.zip'\n"
]
}
],
"source": [
"!cp -rv drive/MyDrive/Colab\\ Notebooks/RATER/data ."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "GOQgHuWIwEJr"
},
"outputs": [],
"source": [
"!cd data && unzip -qo competition_data_like_fp21c.zip"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "c5Os6DwhwHsw",
"outputId": "9c9a720e-09fb-4d2a-ad69-391e7f0da064"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"competition_data_like_fp21c competition_data_like_fp21c.zip\n"
]
}
],
"source": [
"!ls data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "BLzv1OdwrXEF",
"outputId": "049661c9-4ff7-47d8-d289-c21e9e833999"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Thu Mar 21 02:16:05 2024 \n",
"+---------------------------------------------------------------------------------------+\n",
"| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |\n",
"|-----------------------------------------+----------------------+----------------------+\n",
"| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
"| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n",
"| | | MIG M. |\n",
"|=========================================+======================+======================|\n",
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
"| N/A 42C P8 9W / 70W | 3MiB / 15360MiB | 0% Default |\n",
"| | | N/A |\n",
"+-----------------------------------------+----------------------+----------------------+\n",
" \n",
"+---------------------------------------------------------------------------------------+\n",
"| Processes: |\n",
"| GPU GI CI PID Type Process name GPU Memory |\n",
"| ID ID Usage |\n",
"|=======================================================================================|\n",
"| No running processes found |\n",
"+---------------------------------------------------------------------------------------+\n"
]
}
],
"source": [
"gpu_info = !nvidia-smi\n",
"gpu_info = '\\n'.join(gpu_info)\n",
"if gpu_info.find('failed') >= 0:\n",
" print('Not connected to a GPU')\n",
"else:\n",
" print(gpu_info)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "E8jzik8crXyY",
"outputId": "6abe150d-add7-4f3f-ba30-0537e7bcd5c4"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Your runtime has 13.6 gigabytes of available RAM\n",
"\n",
"Not using a high-RAM runtime\n"
]
}
],
"source": [
"from psutil import virtual_memory\n",
"ram_gb = virtual_memory().total / 1e9\n",
"print('Your runtime has {:.1f} gigabytes of available RAM\\n'.format(ram_gb))\n",
"\n",
"if ram_gb < 20:\n",
" print('Not using a high-RAM runtime')\n",
"else:\n",
" print('You are using a high-RAM runtime!')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "dIrotiJEUE7M"
},
"outputs": [],
"source": [
"import tf_keras"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "-S-qOFxr40wl"
},
"outputs": [],
"source": [
"from tensorflow.keras import mixed_precision"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "T_aO8SpS4zmY"
},
"outputs": [],
"source": [
"policy = mixed_precision.Policy('mixed_float16')\n",
"mixed_precision.set_global_policy(policy)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "fTyhOLQm5PKw",
"outputId": "08c31104-331b-4d50-8bcb-03f93b5a2f41"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Compute dtype: float16\n",
"Variable dtype: float32\n"
]
}
],
"source": [
"print('Compute dtype: %s' % policy.compute_dtype)\n",
"print('Variable dtype: %s' % policy.variable_dtype)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "jqNVp0nCobwu"
},
"outputs": [],
"source": [
"import os\n",
"# DECLARE HOW MANY GPUS YOU WISH TO USE.\n",
"# KAGGLE ONLY HAS 1, BUT OFFLINE, YOU CAN USE MORE\n",
"os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\" #0,1,2,3 for four gpu\n",
"\n",
"# VERSION FOR SAVING/LOADING MODEL WEIGHTS\n",
"# THIS SHOULD MATCH THE MODEL IN LOAD_MODEL_FROM\n",
"VER=14\n",
"\n",
"# IF VARIABLE IS NONE, THEN NOTEBOOK COMPUTES TOKENS\n",
"# OTHERWISE NOTEBOOK LOADS TOKENS FROM PATH\n",
"LOAD_TOKENS_FROM = None #'../input/tf-longformer-v12'\n",
"\n",
"# IF VARIABLE IS NONE, THEN NOTEBOOK TRAINS A NEW MODEL\n",
"# OTHERWISE IT LOADS YOUR PREVIOUSLY TRAINED MODEL\n",
"LOAD_MODEL_FROM = None #'../input/tflongformerv14'\n",
"\n",
"# IF FOLLOWING IS NONE, THEN NOTEBOOK\n",
"# USES INTERNET AND DOWNLOADS HUGGINGFACE\n",
"# CONFIG, TOKENIZER, AND MODEL\n",
"DOWNLOADED_MODEL_PATH = None #'../input/tf-longformer-v12'\n",
"\n",
"if DOWNLOADED_MODEL_PATH is None:\n",
" DOWNLOADED_MODEL_PATH = 'model'\n",
"MODEL_NAME = 'allenai/longformer-base-4096'\n",
"#MODEL_NAME = 'FacebookAI/roberta-base'\n",
"#MODEL_NAME = 'google/bigbird-roberta-large'\n",
"MODEL_NAME = 'microsoft/deberta-v3-xsmall'\n",
"#MODEL_NAME = 'microsoft/deberta-v3-base'\n",
"#MODEL_NAME = 'microsoft/deberta-v3-xlarge'\n",
"#MODEL_NAME = 'microsoft/deberta-v3-large'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "glCcaATB2jS-"
},
"outputs": [],
"source": [
"from transformers import AutoTokenizer, AutoConfig, TFAutoModel"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 373,
"referenced_widgets": [
"c1f4a1f9930749d3a76cfad025d2917e",
"2d832372122743ecb70f70701ae2284b",
"ad42ec5540264f348b91b4bdc7c0fea4",
"7cf60dbb6e3b4020a09b3b8e8f4d783d",
"3fbf03f7022d4647bd9ee793e595a965",
"4485e460e67b443f9e919416038fc132",
"7762eeed26a74d3b814c6571ab2c784d",
"58758870e6e04659a95b910dd12f492e",
"9c361f4af4894de28eb68f796d8aa91c",
"94ee0de552704033b23578974afc5d7f",
"97eeaf4565db46ebae88e81bb878ac0e",
"92437b1c71e749559b06d1cd1b43f1e4",
"ca58462900c04c41a37f28d04a4b80e7",
"52a3c9c2179b4e41b2cbcb1179dba738",
"1a2735bb87724029a84e91e2fec29efd",
"6c430a8f383d4fc2b900d28d8e4bc853",
"b7ebce7ef8d5464aaf09c16ef4b0d6a1",
"62cfed46cc74456cadb7c0a896099b8c",
"a7576f54666144fb9d4a5d970d83d34a",
"b42359e4c4004555a094aec8eb3b84d2",
"468dc0af70b444498b275cf8ab34cf7c",
"f19cff5e34d24827bcffafd51c0ce873",
"e454849ea1c34494b42a6abc1da83eaa",
"6fdf0c77ddfe42a1be25a1460e651e37",
"404e7ab2517e4ce3a81e00c0b4601c76",
"a3fe22c2a1d0413a8af7aa5041269cd7",
"2a05cd863d3f46fc96357375b952a6ab",
"682c0ef88bc14e638f96d50fdcb9f6c1",
"4b595e695d5946a0b2dbd297e7651343",
"2b0913dd1dc948efafde2d3ef4204bf4",
"9274b8066b464bdfb403a449f73000a8",
"e97cb919245e464b94532f33b80ef9cd",
"1d98393b3fc44510b603c1a0abcbcd76",
"aeda8c3dc246486abae516856b1816bd",
"4a08d5eff5714864adb30f3aaf798f31",
"30952d3740eb48f2b28c25f159ae7e3e",
"87295fc7b439471db295e9e9dc6d556b",
"eb94cbc2ba684ce387403b5411f787c9",
"a97bdb7ee2a14286ae3730164d2c55d0",
"bd2d363d396f48239ea91ee272537f37",
"63e51aae96854cedbc84ceb42a199039",
"ff097d0b6f8148f18673fb458dc27502",
"c6765f1449b44479909f02705389e29a",
"746176d8b161464d8990d4364d6c4abd"
]
},
"id": "6cY3dxxLowLt",
"outputId": "c6ffa3f0-6c5f-41d5-c317-e37db38806f2"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:88: UserWarning: \n",
"The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
"To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
"You will be able to reuse this secret in all of your notebooks.\n",
"Please note that authentication is recommended but still optional to access public models or datasets.\n",
" warnings.warn(\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c1f4a1f9930749d3a76cfad025d2917e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"tokenizer_config.json: 0%| | 0.00/52.0 [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "92437b1c71e749559b06d1cd1b43f1e4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"config.json: 0%| | 0.00/578 [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e454849ea1c34494b42a6abc1da83eaa",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"spm.model: 0%| | 0.00/2.46M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python3.10/dist-packages/transformers/convert_slow_tokenizer.py:550: UserWarning: The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option which is not implemented in the fast tokenizers. In practice this means that the fast version of the tokenizer can produce unknown tokens whereas the sentencepiece version would have converted these unknown tokens into a sequence of byte tokens matching the original piece of text.\n",
" warnings.warn(\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aeda8c3dc246486abae516856b1816bd",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"tf_model.h5: 0%| | 0.00/283M [00:00<?, ?B/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"All model checkpoint layers were used when initializing TFDebertaV2Model.\n",
"\n",
"All the layers of TFDebertaV2Model were initialized from the model checkpoint at microsoft/deberta-v3-xsmall.\n",
"If your task is similar to the task the model of the checkpoint was trained on, you can already use TFDebertaV2Model for predictions without further training.\n"
]
}
],
"source": [
"if DOWNLOADED_MODEL_PATH == 'model':\n",
"\n",
" try:\n",
" os.mkdir('model')\n",
" except Exception as e:\n",
" pass\n",
"\n",
" tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)\n",
" tokenizer.save_pretrained('model')\n",
"\n",
" config = AutoConfig.from_pretrained(MODEL_NAME)\n",
" config.save_pretrained('model')\n",
"\n",
" backbone = TFAutoModel.from_pretrained(MODEL_NAME, config=config)\n",
" backbone.save_pretrained('model')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "aQH18ri9owJV",
"outputId": "17bc51e5-18ac-408a-8359-b68f05f747d4"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"TF version 2.15.0\n"
]
}
],
"source": [
"import pandas as pd, numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import tensorflow as tf\n",
"os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n",
"print('TF version',tf.__version__)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "tTC0veudo_0r",
"outputId": "e3a0f422-9870-4bdf-fae8-315542cd18e7"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"single strategy\n"
]
}
],
"source": [
"# USE MULTIPLE GPUS\n",
"if os.environ[\"CUDA_VISIBLE_DEVICES\"].count(',') == 0:\n",
" strategy = tf.distribute.get_strategy()\n",
" print('single strategy')\n",
"else:\n",
" strategy = tf.distribute.MirroredStrategy()\n",
" print('multiple strategy')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "FXE44JlEowHG"
},
"outputs": [],
"source": [
"#tf.config.optimizer.set_experimental_options({\"auto_mixed_precision\": True})\n",
"#print('Mixed precision enabled')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 435
},
"id": "3ySRrnrsowFJ",
"outputId": "4219d8af-1ecc-4f78-be7d-1dc97a90415b"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(173266, 8)\n"
]
},
{
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "train"
},
"text/html": [
"\n",
" <div id=\"df-8e58ebd2-89fb-4542-af4d-b6446bd3a2f3\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>discourse_id</th>\n",
" <th>discourse_start</th>\n",
" <th>discourse_end</th>\n",
" <th>discourse_text</th>\n",
" <th>discourse_type</th>\n",
" <th>discourse_type_num</th>\n",
" <th>predictionstring</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>423A1CA112E2</td>\n",
" <td>1.622628e+12</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>Phones\\n\\n</td>\n",
" <td>Unannotated</td>\n",
" <td>Unannotated 1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>423A1CA112E2</td>\n",
" <td>1.622628e+12</td>\n",
" <td>8</td>\n",
" <td>229</td>\n",
" <td>Modern humans today are always on their phone....</td>\n",
" <td>Lead</td>\n",
" <td>Lead 1</td>\n",
" <td>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>423A1CA112E2</td>\n",
" <td>1.622628e+12</td>\n",
" <td>230</td>\n",
" <td>312</td>\n",
" <td>They are some really bad consequences when stu...</td>\n",
" <td>Position</td>\n",
" <td>Position 1</td>\n",
" <td>45 46 47 48 49 50 51 52 53 54 55 56 57 58 59</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>423A1CA112E2</td>\n",
" <td>1.622628e+12</td>\n",
" <td>313</td>\n",
" <td>400</td>\n",
" <td>Some certain areas in the United States ban ph...</td>\n",
" <td>Evidence</td>\n",
" <td>Evidence 1</td>\n",
" <td>60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>423A1CA112E2</td>\n",
" <td>1.622628e+12</td>\n",
" <td>401</td>\n",
" <td>756</td>\n",
" <td>When people have phones, they know about certa...</td>\n",
" <td>Evidence</td>\n",
" <td>Evidence 2</td>\n",
" <td>76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 9...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-8e58ebd2-89fb-4542-af4d-b6446bd3a2f3')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-8e58ebd2-89fb-4542-af4d-b6446bd3a2f3 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-8e58ebd2-89fb-4542-af4d-b6446bd3a2f3');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-37dfbdf8-98d8-4403-b8cb-9e3c519f17b4\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-37dfbdf8-98d8-4403-b8cb-9e3c519f17b4')\"\n",
" title=\"Suggest charts\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-37dfbdf8-98d8-4403-b8cb-9e3c519f17b4 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
],
"text/plain": [
" id discourse_id discourse_start discourse_end \\\n",
"0 423A1CA112E2 1.622628e+12 0 7 \n",
"1 423A1CA112E2 1.622628e+12 8 229 \n",
"2 423A1CA112E2 1.622628e+12 230 312 \n",
"3 423A1CA112E2 1.622628e+12 313 400 \n",
"4 423A1CA112E2 1.622628e+12 401 756 \n",
"\n",
" discourse_text discourse_type \\\n",
"0 Phones\\n\\n Unannotated \n",
"1 Modern humans today are always on their phone.... Lead \n",
"2 They are some really bad consequences when stu... Position \n",
"3 Some certain areas in the United States ban ph... Evidence \n",
"4 When people have phones, they know about certa... Evidence \n",
"\n",
" discourse_type_num predictionstring \n",
"0 Unannotated 1 0 \n",
"1 Lead 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1... \n",
"2 Position 1 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 \n",
"3 Evidence 1 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 \n",
"4 Evidence 2 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 9... "
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#train = pd.read_csv('../input/feedback-prize-2021/train.csv')\n",
"#train = pd.read_csv('/kaggle/input/rater-dataset-like-fp21c/competition_data_like_fp21c/train.csv')\n",
"train = pd.read_csv('data/competition_data_like_fp21c/train.csv')#[:30000]\n",
"# Merge rhe Unannotated and claim types\n",
"#train['discourse_type'] = train['discourse_type'].replace('Unannotated', 'Claim')\n",
"#train = train.sample(frac=0.2, replace=False, random_state=42)\n",
"print( train.shape )\n",
"train.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "qoKF7nTtowDE",
"outputId": "cacfcdb3-d521-4c82-a788-420f74c2895d"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The train labels are:\n"
]
},
{
"data": {
"text/plain": [
"array(['Unannotated', 'Lead', 'Position', 'Evidence', 'Claim',\n",
" 'Concluding Statement', 'Counterclaim', 'Rebuttal'], dtype=object)"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print('The train labels are:')\n",
"train.discourse_type.unique()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NDNCwWOvowBF",
"outputId": "0c13b021-56be-4d27-e17c-a6791a452e09"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"There are 15594 train texts.\n"
]
}
],
"source": [
"IDS = train.id.unique()\n",
"print('There are',len(IDS),'train texts.')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "4bjNGqsHov-r"
},
"outputs": [],
"source": [
"MAX_LEN = 512\n",
"\n",
"# THE TOKENS AND ATTENTION ARRAYS\n",
"tokenizer = AutoTokenizer.from_pretrained(DOWNLOADED_MODEL_PATH)\n",
"train_tokens = np.zeros((len(IDS),MAX_LEN), dtype='int32')\n",
"train_attention = np.zeros((len(IDS),MAX_LEN), dtype='int32')\n",
"\n",
"# THE 14 CLASSES FOR NER\n",
"lead_b = np.zeros((len(IDS),MAX_LEN))\n",
"lead_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"position_b = np.zeros((len(IDS),MAX_LEN))\n",
"position_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"evidence_b = np.zeros((len(IDS),MAX_LEN))\n",
"evidence_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"claim_b = np.zeros((len(IDS),MAX_LEN))\n",
"claim_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"conclusion_b = np.zeros((len(IDS),MAX_LEN))\n",
"conclusion_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"counterclaim_b = np.zeros((len(IDS),MAX_LEN))\n",
"counterclaim_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"rebuttal_b = np.zeros((len(IDS),MAX_LEN))\n",
"rebuttal_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"unannotated_b = np.zeros((len(IDS),MAX_LEN))\n",
"unannotated_i = np.zeros((len(IDS),MAX_LEN))\n",
"\n",
"# HELPER VARIABLES\n",
"#train_lens = []\n",
"#targets_b = [lead_b, position_b, evidence_b, claim_b, conclusion_b, counterclaim_b, rebuttal_b]\n",
"#targets_i = [lead_i, position_i, evidence_i, claim_i, conclusion_i, counterclaim_i, rebuttal_i]\n",
"#target_map = {'Lead':0, 'Position':1, 'Evidence':2, 'Claim':3, 'Concluding Statement':4, 'Counterclaim':5, 'Rebuttal':6}"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "cG8G9Fdyov8K"
},
"outputs": [],
"source": [
"train_lens = []\n",
"target_map = {'Lead':0, 'Position':1, 'Claim':2, 'Evidence':3, 'Counterclaim':4, 'Rebuttal':5,\n",
" 'Concluding Statement':6,\n",
" 'Unannotated': 7\n",
" }\n",
"targets_b = [lead_b, position_b, claim_b, evidence_b, counterclaim_b, rebuttal_b,\n",
" conclusion_b,\n",
" unannotated_b\n",
" ]\n",
"targets_i = [lead_i, position_i, claim_i, evidence_i, counterclaim_i, rebuttal_i,\n",
" conclusion_i,\n",
" unannotated_i\n",
" ]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "rMEsG6cFov59",
"outputId": "ddcf2032-59d8-4352-dbfa-7f369a45a402"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 , 100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 1000 , 1100 , 1200 , 1300 , 1400 , 1500 , 1600 , 1700 , 1800 , 1900 , 2000 , 2100 , 2200 , 2300 , 2400 , 2500 , 2600 , 2700 , 2800 , 2900 , 3000 , 3100 , 3200 , 3300 , 3400 , 3500 , 3600 , 3700 , 3800 , 3900 , 4000 , 4100 , 4200 , 4300 , 4400 , 4500 , 4600 , 4700 , 4800 , 4900 , 5000 , 5100 , 5200 , 5300 , 5400 , 5500 , 5600 , 5700 , 5800 , 5900 , 6000 , 6100 , 6200 , 6300 , 6400 , 6500 , 6600 , 6700 , 6800 , 6900 , 7000 , 7100 , 7200 , 7300 , 7400 , 7500 , 7600 , 7700 , 7800 , 7900 , 8000 , 8100 , 8200 , 8300 , 8400 , 8500 , 8600 , 8700 , 8800 , 8900 , 9000 , 9100 , 9200 , 9300 , 9400 , 9500 , 9600 , 9700 , 9800 , 9900 , 10000 , 10100 , 10200 , 10300 , 10400 , 10500 , 10600 , 10700 , 10800 , 10900 , 11000 , 11100 , 11200 , 11300 , 11400 , 11500 , 11600 , 11700 , 11800 , 11900 , 12000 , 12100 , 12200 , 12300 , 12400 , 12500 , 12600 , 12700 , 12800 , 12900 , 13000 , 13100 , 13200 , 13300 , 13400 , 13500 , 13600 , 13700 , 13800 , 13900 , 14000 , 14100 , 14200 , 14300 , 14400 , 14500 , 14600 , 14700 , 14800 , 14900 , 15000 , 15100 , 15200 , 15300 , 15400 , 15500 , "
]
}
],
"source": [
"# WE ASSUME DATAFRAME IS ASCENDING WHICH IT IS\n",
"assert( np.sum(train.groupby('id')['discourse_start'].diff()<=0)==0 )\n",
"\n",
"# FOR LOOP THROUGH EACH TRAIN TEXT\n",
"for id_num in range(len(IDS)):\n",
" if LOAD_TOKENS_FROM: break\n",
" if id_num%100==0: print(id_num,', ',end='')\n",
"\n",
" # READ TRAIN TEXT, TOKENIZE, AND SAVE IN TOKEN ARRAYS\n",
" n = IDS[id_num]\n",
" #name = f'../input/feedback-prize-2021/train/{n}.txt'\n",
" #name = f'/kaggle/input/rater-dataset-like-fp21c/competition_data_like_fp21c/train/{n}.txt'\n",
" name = f'data/competition_data_like_fp21c/train/{n}.txt'\n",
" txt = open(name, 'r').read()\n",
" train_lens.append( len(txt.split()))\n",
" tokens = tokenizer.encode_plus(txt, max_length=MAX_LEN, padding='max_length',\n",
" truncation=True, return_offsets_mapping=True)\n",
" train_tokens[id_num,] = tokens['input_ids']\n",
" train_attention[id_num,] = tokens['attention_mask']\n",
"\n",
" # FIND TARGETS IN TEXT AND SAVE IN TARGET ARRAYS\n",
" offsets = tokens['offset_mapping']\n",
" offset_index = 0\n",
" df = train.loc[train.id==n]\n",
" for index,row in df.iterrows():\n",
" a = row.discourse_start\n",
" b = row.discourse_end\n",
" if offset_index>len(offsets)-1:\n",
" break\n",
" c = offsets[offset_index][0]\n",
" d = offsets[offset_index][1]\n",
" beginning = True\n",
" while b>c:\n",
" if (c>=a)&(b>=d):\n",
" k = target_map[row.discourse_type]\n",
" if beginning:\n",
" targets_b[k][id_num][offset_index] = 1\n",
" beginning = False\n",
" else:\n",
" targets_i[k][id_num][offset_index] = 1\n",
" offset_index += 1\n",
" if offset_index>len(offsets)-1:\n",
" break\n",
" c = offsets[offset_index][0]\n",
" d = offsets[offset_index][1]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 479
},
"id": "Wrg_jIWuov3x",
"outputId": "086cd8cb-bd50-40c7-c6ed-1f5891593b08"
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAHOCAYAAACy+PKHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABHz0lEQVR4nO3deXhUReLu8bezE6A7JJgEhAAKEvYd0qCCiASMCgpeZAAj8huVAQZFGUTZXEHkuuCIqFfBjVGZcQWRzbCHXZBFGEAgCCRBkCRsWUjdP3j6/GiSQBICOQnfz/P0A6mq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+SPbs2aM5c+Zozpw5euONNzR8+PAiP+7AgQM1a9Ys3XLLLbrrrru0adMmLVy4UMuWLdPSpUvVrl27Qm0nMDBQbrdbCQkJSkhIUNu2ba06zxdXx44d1b59e/n5+SkhIUFjx4612mzYsEEZGRkKCgpSTEyMVT537lz17t1bZ86cUf369XXfffcpNTVVS5cu1U8//aT58+frgw8+yLdPu3btUosWLRQQEKAOHTrIGKOqVatKOhf2b7/9dq1evVoVK1ZU165dVaFCBc2fP19z585VXFxcUZ9K6w+PPn36KDAwsMj3/+2339S5c2ft379f1113ne68805lZ2crISFBo0aN0hdffKFFixapSpUqRd72xRT2PVC3bl3Fx8fr3//+t06ePKlevXqpUqVK1nY8a6s++ugj64+utm3b6rbbbtPp06f1+++/6/PPP1fVqlXzDWcoBoNyq1atWkaSmTFjxkXbdezY0Ugy48eP9ypPSEgwkkzHjh29ym+77TYjyXz66ad5tnX8+HGTmJjoVTZjxgwjycTHxxfYhz59+hhJpl27duaPP/6wyjMyMkz37t2NJNO+fXuv+xw8eNBUqlTJSDJvvvmmV93SpUtNxYoVjSST39vcU+50OvP012Pt2rVmy5YtecoPHjxomjVrZiSZL7/80qtu79691rZvvPFGs2/fPqvujz/+MPXq1TOSTJMmTUzbtm29xvrbb7+ZKlWqGElmxYoVBT5XF5o3b56RZIKCgsyCBQu86v7f//t/RpLx9/c3W7du9aorzOtSWJ4xJyQkeJV73kOSTNOmTc3hw4fzvf8PP/xgDh06lKd81apVxul0Gn9/f/P777/nu+0L35/nvwa1atUyO3futOpycnLMww8/bCSZrl27FmmMzz//vJFkYmNjvco7d+5sfH19zfHjx40xxsTExJigoCBz5swZq82kSZOMJNO5c2erLDk52bhcLiPJvPjiiyY3N9eqW7dunfVeeO+997web/z48db4+vfv7/U4Hk899ZSRZKKjo83Bgwet8pMnT5oePXpY97/wd74g2dnZxsfHx0gyH3/8caHuc6F27doZSeaee+4xJ06csMpTU1NNy5YtjSTzl7/8xes+l3qPel7rWrVq5VtenPeA53Nz7969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aNKve19dXc+bM0eDBg+V2u1WxYkXFx8fr+eefL+muAACAMsphjDGl3YmiSk9Pl8vlUlpaWqmtR6n99NxSedxrzb5JcaXdBQBACSnK9zfX4gEAALZDQAEAALZDQAEAALZDQAEAALZT4kfxAFdSfouTWUgLAOUPAaUQOGIHAICri108AADAdggoAADAdtjFA1tj9xoAXJuYQQEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALZDQAEAALbDxQJR5l14QcF9k+JKqScAgJLCDAoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdAgoAALAdv9LuAFDSaj89N0/ZvklxpdATAEBxMYMCAABsh4ACAABsh4ACAABsh4ACAABsh4ACAABsh4ACAABsh4ACAABsp0gB5Z133lHTpk3ldDrldDrldrs1b948q/7MmTMaMmSIwsLCVKlSJfXq1UspKSle20hKSlJcXJyCg4MVHh6ukSNHKicnp2RGAwAAyoUiBZQaNWpo0qRJ2rBhg9avX6/OnTurR48e2rZtmyTpiSee0Pfff6/Zs2dr6dKlOnTokO677z7r/mfPnlVcXJyysrK0atUqffTRR5o5c6bGjRtXsqMCAABlmsMYYy5nA6GhoXr11VfVu3dvXXfddZo1a5Z69+4tSdqxY4caNGigxMRExcTEaN68ebrrrrt06NAhRURESJKmT5+uUaNG6ciRIwoICCjUY6anp8vlciktLU1Op/Nyul8o+Z2ZFGULZ5IFgNJXlO/vYq9BOXv2rD7//HOdPHlSbrdbGzZsUHZ2trp06WK1iY6OVlRUlBITEyVJiYmJatKkiRVOJCk2Nlbp6enWLEx+MjMzlZ6e7nUDAADlV5EDypYtW1SpUiUFBgbqscce09dff62GDRsqOTlZAQEBCgkJ8WofERGh5ORkSVJycrJXOPHUe+oKMnHiRLlcLutWs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yGgAAAA2yGgAAAA2yGgAAAA2yGgAAAA2/n/TA1d0joQykwAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"if LOAD_TOKENS_FROM is None:\n",
" plt.hist(train_lens,bins=100)\n",
" plt.title('Histogram of Train Word Counts',size=16)\n",
" plt.xlabel('Train Word Count',size=14)\n",
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "WDnZJIkiov1W"
},
"outputs": [],
"source": [
"if LOAD_TOKENS_FROM is None:\n",
" targets = np.zeros((len(IDS),MAX_LEN,17), dtype='int32')\n",
" for k in range(8):\n",
" targets[:,:,2*k] = targets_b[k]\n",
" targets[:,:,2*k+1] = targets_i[k]\n",
" targets[:,:,16] = 1-np.max(targets,axis=-1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "ujKtirsUovyu",
"outputId": "c6c57a36-1468-4c1a-a1a2-6a7d5a7ea6d4"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved NER tokens\n"
]
}
],
"source": [
"if LOAD_TOKENS_FROM is None:\n",
" np.save(f'targets_{MAX_LEN}', targets)\n",
" np.save(f'tokens_{MAX_LEN}', train_tokens)\n",
" np.save(f'attention_{MAX_LEN}', train_attention)\n",
" print('Saved NER tokens')\n",
"else:\n",
" targets = np.load(f'{LOAD_TOKENS_FROM}/targets_{MAX_LEN}.npy')\n",
" train_tokens = np.load(f'{LOAD_TOKENS_FROM}/tokens_{MAX_LEN}.npy')\n",
" train_attention = np.load(f'{LOAD_TOKENS_FROM}/attention_{MAX_LEN}.npy')\n",
" print('Loaded NER tokens')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "i21cY9eT-XKw"
},
"outputs": [],
"source": [
"#import tf_keras"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "bHPDFSKOovwE"
},
"outputs": [],
"source": [
"def build_model():\n",
"\n",
" tokens = tf_keras.layers.Input(shape=(MAX_LEN,), name = 'tokens', dtype=tf.int32)\n",
" attention = tf_keras.layers.Input(shape=(MAX_LEN,), name = 'attention', dtype=tf.int32)\n",
"\n",
" config = AutoConfig.from_pretrained(DOWNLOADED_MODEL_PATH+'/config.json')\n",
" backbone = TFAutoModel.from_pretrained(DOWNLOADED_MODEL_PATH+'/tf_model.h5', config=config)\n",
"\n",
" x = backbone(tokens, attention_mask=attention)\n",
" x = tf_keras.layers.Dense(256, activation='relu')(x[0])\n",
" x = tf_keras.layers.Dense(17, activation='softmax', dtype='float32')(x)\n",
"\n",
" model = tf_keras.Model(inputs=[tokens,attention], outputs=x)\n",
" model.compile(optimizer = tf_keras.optimizers.Adam(lr = 1e-4),\n",
" loss = [tf_keras.losses.CategoricalCrossentropy()],\n",
" metrics = [tf_keras.metrics.CategoricalAccuracy()])\n",
"\n",
" return model"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "269KNxTtpiCt",
"outputId": "4e09d504-814c-4542-dd78-79dc46163925"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"All model checkpoint layers were used when initializing TFDebertaV2Model.\n",
"\n",
"All the layers of TFDebertaV2Model were initialized from the model checkpoint at model/tf_model.h5.\n",
"If your task is similar to the task the model of the checkpoint was trained on, you can already use TFDebertaV2Model for predictions without further training.\n",
"WARNING:absl:`lr` is deprecated in TF-Keras optimizer, please use `learning_rate` or use the legacy optimizer, e.g.,tf.keras.optimizers.legacy.Adam.\n"
]
}
],
"source": [
"with strategy.scope():\n",
" model = build_model()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "ikFu4aHUph_n"
},
"outputs": [],
"source": [
"# LEARNING RATE SCHEDULE AND MODEL CHECKPOINT\n",
"EPOCHS = 5\n",
"BATCH_SIZE = 5\n",
"LRS = [0.25e-4, 0.25e-4, 0.25e-4, 0.25e-4, 0.25e-5]\n",
"def lrfn(epoch):\n",
" return LRS[epoch]\n",
"lr_callback = tf_keras.callbacks.LearningRateScheduler(lrfn, verbose = True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "l2sATmhuph1j",
"outputId": "db343135-7186-4ae8-cd21-14f4886a7c34"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Train size 14034 , Valid size 1560\n"
]
}
],
"source": [
"# TRAIN VALID SPLIT 90% 10%\n",
"np.random.seed(42)\n",
"train_idx = np.random.choice(np.arange(len(IDS)),int(0.9*len(IDS)),replace=False)\n",
"valid_idx = np.setdiff1d(np.arange(len(IDS)),train_idx)\n",
"np.random.seed(None)\n",
"print('Train size',len(train_idx),', Valid size',len(valid_idx))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true,
"base_uri": "https://localhost:8080/"
},
"id": "IEHiLBN4ovtQ",
"outputId": "e7e8e99d-e78c-4d8f-8901-b3055d8961f8"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Epoch 1: LearningRateScheduler setting learning rate to 2.5e-05.\n",
"Epoch 1/5\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.10/dist-packages/transformers/models/deberta_v2/modeling_tf_deberta_v2.py:137: Bernoulli.__init__ (from tensorflow.python.ops.distributions.bernoulli) is deprecated and will be removed after 2019-01-01.\n",
"Instructions for updating:\n",
"The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of `tf.distributions`.\n",
"WARNING:tensorflow:From /usr/local/lib/python3.10/dist-packages/tensorflow/python/ops/distributions/bernoulli.py:86: Distribution.__init__ (from tensorflow.python.ops.distributions.distribution) is deprecated and will be removed after 2019-01-01.\n",
"Instructions for updating:\n",
"The TensorFlow Distributions library has moved to TensorFlow Probability (https://github.com/tensorflow/probability). You should update all references to use `tfp.distributions` instead of `tf.distributions`.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2807/2807 - 1803s - loss: 0.7434 - categorical_accuracy: 0.7688 - val_loss: 0.6000 - val_categorical_accuracy: 0.8020 - lr: 2.5000e-05 - 1803s/epoch - 642ms/step\n",
"\n",
"Epoch 2: LearningRateScheduler setting learning rate to 2.5e-05.\n",
"Epoch 2/5\n",
"2807/2807 - 1658s - loss: 0.5845 - categorical_accuracy: 0.8066 - val_loss: 0.5786 - val_categorical_accuracy: 0.8095 - lr: 2.5000e-05 - 1658s/epoch - 591ms/step\n",
"\n",
"Epoch 3: LearningRateScheduler setting learning rate to 2.5e-05.\n",
"Epoch 3/5\n",
"2807/2807 - 1652s - loss: 0.5327 - categorical_accuracy: 0.8206 - val_loss: 0.5791 - val_categorical_accuracy: 0.8104 - lr: 2.5000e-05 - 1652s/epoch - 589ms/step\n",
"\n",
"Epoch 4: LearningRateScheduler setting learning rate to 2.5e-05.\n",
"Epoch 4/5\n",
"2807/2807 - 1653s - loss: 0.4898 - categorical_accuracy: 0.8337 - val_loss: 0.5771 - val_categorical_accuracy: 0.8117 - lr: 2.5000e-05 - 1653s/epoch - 589ms/step\n",
"\n",
"Epoch 5: LearningRateScheduler setting learning rate to 2.5e-06.\n",
"Epoch 5/5\n",
"2807/2807 - 1626s - loss: 0.4303 - categorical_accuracy: 0.8516 - val_loss: 0.6042 - val_categorical_accuracy: 0.8106 - lr: 2.5000e-06 - 1626s/epoch - 579ms/step\n"
]
}
],
"source": [
"# LOAD MODEL\n",
"if LOAD_MODEL_FROM:\n",
" model.load_weights(f'{LOAD_MODEL_FROM}/long_v{VER}.h5')\n",
"\n",
"# OR TRAIN MODEL\n",
"else:\n",
" model.fit(x = [train_tokens[train_idx,], train_attention[train_idx,]],\n",
" y = targets[train_idx,],\n",
" validation_data = ([train_tokens[valid_idx,], train_attention[valid_idx,]],\n",
" targets[valid_idx,]),\n",
" callbacks = [lr_callback],\n",
" epochs = EPOCHS,\n",
" batch_size = BATCH_SIZE,\n",
" verbose = 2)\n",
"\n",
" # SAVE MODEL WEIGHTS\n",
" model.save_weights(f'long_v{VER}.h5')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "S9jfUQoypxff",
"outputId": "e529992e-e4cd-4531-dcde-14fc4b1fa822"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"98/98 - 52s - 52s/epoch - 530ms/step\n",
"OOF predictions shape: (1560, 512, 17)\n"
]
}
],
"source": [
"p = model.predict([train_tokens[valid_idx,], train_attention[valid_idx,]], batch_size=16, verbose=2)\n",
"print('OOF predictions shape:',p.shape)\n",
"oof_preds = np.argmax(p,axis=-1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "0hM2kQcSXqLg",
"outputId": "08c32217-019c-4c38-dcea-f2c7a3d7c578"
},
"outputs": [
{
"data": {
"text/plain": [
"array([14, 15, 15, 15, 16, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
" 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
" 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
" 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
" 1, 1, 1, 1, 1, 1, 16, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,\n",
" 3, 3, 3, 14, 15, 15, 15, 15, 5, 5, 5, 5, 5, 5, 5, 16, 6,\n",
" 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n",
" 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,\n",
" 7, 7, 7, 7, 7, 7, 7, 7, 7, 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, 16, 16,\n",
" 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,\n",
" 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,\n",
" 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,\n",
" 16, 16])"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.argmax(p,axis=-1)[0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "zuhVMPifpxcX"
},
"outputs": [],
"source": [
"#target_map_rev = {0:'Lead', 1:'Position', 2:'Evidence', 3:'Claim', 4:'Concluding Statement', 5:'Counterclaim', 6:'Rebuttal', 7:'blank'}"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "Wc0cSWsmpxZX"
},
"outputs": [],
"source": [
"target_map_rev = {0:'Lead', 1:'Position', 2:'Claim', 3:'Evidence', 4:'Counterclaim', 5:'Rebuttal',\n",
" 6:'Concluding Statement',\n",
" 7:'Unannotated',\n",
" 8:'blank'}"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "pTTmBv3Ap7Ae"
},
"outputs": [],
"source": [
"def get_preds(dataset='train', verbose=True, text_ids=IDS[valid_idx], preds=oof_preds):\n",
" all_predictions = []\n",
"\n",
" for id_num in range(len(preds)):\n",
"\n",
" # GET ID\n",
" if (id_num%100==0)&(verbose):\n",
" print(id_num,', ',end='')\n",
"\n",
" n = text_ids[id_num]\n",
"\n",
" #print(n)\n",
"\n",
" # GET TOKEN POSITIONS IN CHARS\n",
" #name = f'../input/feedback-prize-2021/{dataset}/{n}.txt'\n",
" #name = f'/kaggle/input/rater-dataset-like-fp21c/competition_data_like_fp21c/{dataset}/{n}.txt'\n",
" name = f'data/competition_data_like_fp21c/{dataset}/{n}.txt'\n",
" txt = open(name, 'r').read()\n",
" tokens = tokenizer.encode_plus(txt, max_length=MAX_LEN, padding='max_length',\n",
" truncation=True, return_offsets_mapping=True)\n",
" off = tokens['offset_mapping']\n",
"\n",
" # GET WORD POSITIONS IN CHARS\n",
" w = []\n",
" blank = True\n",
" for i in range(len(txt)):\n",
" if (txt[i]!=' ')&(txt[i]!='\\n')&(txt[i]!='\\xa0')&(txt[i]!='\\x85')&(blank==True):\n",
" w.append(i)\n",
" blank=False\n",
" elif (txt[i]==' ')|(txt[i]=='\\n')|(txt[i]=='\\xa0')|(txt[i]=='\\x85'):\n",
" blank=True\n",
" w.append(1e6)\n",
"\n",
" # MAPPING FROM TOKENS TO WORDS\n",
" word_map = -1 * np.ones(MAX_LEN,dtype='int32')\n",
" w_i = 0\n",
" for i in range(len(off)):\n",
" if off[i][1]==0: continue\n",
" while off[i][0]>=w[w_i+1]: w_i += 1\n",
" word_map[i] = int(w_i)\n",
"\n",
" # CONVERT TOKEN PREDICTIONS INTO WORD LABELS\n",
" ### KEY: ###\n",
" # 0: LEAD_B, 1: LEAD_I\n",
" # 2: POSITION_B, 3: POSITION_I\n",
" # 4: EVIDENCE_B, 5: EVIDENCE_I\n",
" # 6: CLAIM_B, 7: CLAIM_I\n",
" # 8: CONCLUSION_B, 9: CONCLUSION_I\n",
" # 10: COUNTERCLAIM_B, 11: COUNTERCLAIM_I\n",
" # 12: REBUTTAL_B, 13: REBUTTAL_I\n",
" # 14: NOTHING i.e. O\n",
" ### NOTE THESE VALUES ARE DIVIDED BY 2 IN NEXT CODE LINE\n",
" pred = preds[id_num,]/2.0\n",
"\n",
" #print(\"*********************************************\")\n",
"\n",
" i = 0\n",
" while i<MAX_LEN:\n",
" prediction = []\n",
" start = pred[i]\n",
" if start in [0, 1, 2, 3, 4, 5, 6, 7, 8]:\n",
" prediction.append(word_map[i])\n",
" i += 1\n",
" if i>=MAX_LEN: break\n",
" while pred[i]==start+0.5:\n",
" if not word_map[i] in prediction:\n",
" prediction.append(word_map[i])\n",
" i += 1\n",
" if i>=MAX_LEN: break\n",
" else:\n",
" i += 1\n",
" #print(prediction)\n",
" prediction = [x for x in prediction if x!=-1]\n",
" #print(prediction)\n",
" if len(prediction)>4:\n",
" all_predictions.append( (n, target_map_rev[int(start)],\n",
" ' '.join([str(x) for x in prediction]) ) )\n",
"\n",
" #print(all_predictions)\n",
" # MAKE DATAFRAME\n",
" df = pd.DataFrame(all_predictions)\n",
" df.columns = ['id','class','predictionstring']\n",
"\n",
" return df"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "QkUbdcA3p69d",
"outputId": "37b0eb54-1f27-4e3c-ad3a-1f1d1b83e783"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 , 100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 , 1000 , 1100 , 1200 , 1300 , 1400 , 1500 , "
]
},
{
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"summary": "{\n \"name\": \"oof\",\n \"rows\": 9016,\n \"fields\": [\n {\n \"column\": \"id\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1547,\n \"samples\": [\n \"54C4268BBE5A\",\n \"83D933BD5B81\",\n \"5C66CBD21170\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"class\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 8,\n \"samples\": [\n \"Position\",\n \"Concluding Statement\",\n \"Lead\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"predictionstring\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 6456,\n \"samples\": [\n \"233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249\",\n \"45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81\",\n \"197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}",
"type": "dataframe",
"variable_name": "oof"
},
"text/html": [
"\n",
" <div id=\"df-68d757e0-0590-494c-ada4-2db6723c3875\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>class</th>\n",
" <th>predictionstring</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>50B3435E475B</td>\n",
" <td>Lead</td>\n",
" <td>3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>50B3435E475B</td>\n",
" <td>Position</td>\n",
" <td>63 64 65 66 67 68 69 70 71 72 73 74 75</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>50B3435E475B</td>\n",
" <td>Unannotated</td>\n",
" <td>75 76 77 78 79</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>50B3435E475B</td>\n",
" <td>Evidence</td>\n",
" <td>87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>50B3435E475B</td>\n",
" <td>Claim</td>\n",
" <td>178 179 180 181 182 183</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-68d757e0-0590-494c-ada4-2db6723c3875')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-68d757e0-0590-494c-ada4-2db6723c3875 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-68d757e0-0590-494c-ada4-2db6723c3875');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-ffac1b52-555c-45e0-bb07-6fbf7581831e\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-ffac1b52-555c-45e0-bb07-6fbf7581831e')\"\n",
" title=\"Suggest charts\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-ffac1b52-555c-45e0-bb07-6fbf7581831e button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
],
"text/plain": [
" id class \\\n",
"0 50B3435E475B Lead \n",
"1 50B3435E475B Position \n",
"2 50B3435E475B Unannotated \n",
"3 50B3435E475B Evidence \n",
"4 50B3435E475B Claim \n",
"\n",
" predictionstring \n",
"0 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20... \n",
"1 63 64 65 66 67 68 69 70 71 72 73 74 75 \n",
"2 75 76 77 78 79 \n",
"3 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101... \n",
"4 178 179 180 181 182 183 "
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"oof = get_preds( dataset='train', verbose=True, text_ids=IDS[valid_idx] )\n",
"oof.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "mIvR8JEep65k",
"outputId": "32cf995d-610a-4929-89f7-573111d8114a"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The following classes are present in oof preds:\n"
]
},
{
"data": {
"text/plain": [
"array(['Lead', 'Position', 'Unannotated', 'Evidence', 'Claim',\n",
" 'Concluding Statement', 'Counterclaim', 'Rebuttal'], dtype=object)"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print('The following classes are present in oof preds:')\n",
"oof['class'].unique()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "QWNA_ocOp62N"
},
"outputs": [],
"source": [
"# CODE FROM : Rob Mulla @robikscube\n",
"# https://www.kaggle.com/robikscube/student-writing-competition-twitch\n",
"def calc_overlap(row):\n",
" \"\"\"\n",
" Calculates the overlap between prediction and\n",
" ground truth and overlap percentages used for determining\n",
" true positives.\n",
" \"\"\"\n",
" set_pred = set(row.predictionstring_pred.split(' '))\n",
" set_gt = set(row.predictionstring_gt.split(' '))\n",
" # Length of each and intersection\n",
" len_gt = len(set_gt)\n",
" len_pred = len(set_pred)\n",
" inter = len(set_gt.intersection(set_pred))\n",
" overlap_1 = inter / len_gt\n",
" overlap_2 = inter/ len_pred\n",
" return [overlap_1, overlap_2]\n",
"\n",
"\n",
"def score_feedback_comp(pred_df, gt_df):\n",
" \"\"\"\n",
" A function that scores for the kaggle\n",
" Student Writing Competition\n",
"\n",
" Uses the steps in the evaluation page here:\n",
" https://www.kaggle.com/c/feedback-prize-2021/overview/evaluation\n",
" \"\"\"\n",
" gt_df = gt_df[['id','discourse_type','predictionstring']] \\\n",
" .reset_index(drop=True).copy()\n",
" pred_df = pred_df[['id','class','predictionstring']] \\\n",
" .reset_index(drop=True).copy()\n",
" pred_df['pred_id'] = pred_df.index\n",
" gt_df['gt_id'] = gt_df.index\n",
" # Step 1. all ground truths and predictions for a given class are compared.\n",
" joined = pred_df.merge(gt_df,\n",
" left_on=['id','class'],\n",
" right_on=['id','discourse_type'],\n",
" how='outer',\n",
" suffixes=('_pred','_gt')\n",
" )\n",
" joined['predictionstring_gt'] = joined['predictionstring_gt'].fillna(' ')\n",
" joined['predictionstring_pred'] = joined['predictionstring_pred'].fillna(' ')\n",
"\n",
" joined['overlaps'] = joined.apply(calc_overlap, axis=1)\n",
"\n",
" # 2. If the overlap between the ground truth and prediction is >= 0.5,\n",
" # and the overlap between the prediction and the ground truth >= 0.5,\n",
" # the prediction is a match and considered a true positive.\n",
" # If multiple matches exist, the match with the highest pair of overlaps is taken.\n",
" joined['overlap1'] = joined['overlaps'].apply(lambda x: eval(str(x))[0])\n",
" joined['overlap2'] = joined['overlaps'].apply(lambda x: eval(str(x))[1])\n",
"\n",
"\n",
" joined['potential_TP'] = (joined['overlap1'] >= 0.5) & (joined['overlap2'] >= 0.5)\n",
" joined['max_overlap'] = joined[['overlap1','overlap2']].max(axis=1)\n",
" tp_pred_ids = joined.query('potential_TP') \\\n",
" .sort_values('max_overlap', ascending=False) \\\n",
" .groupby(['id','predictionstring_gt']).first()['pred_id'].values\n",
"\n",
" # 3. Any unmatched ground truths are false negatives\n",
" # and any unmatched predictions are false positives.\n",
" fp_pred_ids = [p for p in joined['pred_id'].unique() if p not in tp_pred_ids]\n",
"\n",
" matched_gt_ids = joined.query('potential_TP')['gt_id'].unique()\n",
" unmatched_gt_ids = [c for c in joined['gt_id'].unique() if c not in matched_gt_ids]\n",
"\n",
" # Get numbers of each type\n",
" TP = len(tp_pred_ids)\n",
" FP = len(fp_pred_ids)\n",
" FN = len(unmatched_gt_ids)\n",
" #calc microf1\n",
" my_f1_score = TP / (TP + 0.5*(FP+FN))\n",
" return my_f1_score"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "UhBh_N9NpxVX"
},
"outputs": [],
"source": [
"# VALID DATAFRAME\n",
"valid = train.loc[train['id'].isin(IDS[valid_idx])]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "pMi3OvSBovlq",
"outputId": "e4edf0f0-74ce-4164-be30-0f22fcbfc978"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Lead 0.805921052631579\n",
"Position 0.6635446685878963\n",
"Unannotated 0.15553576728999705\n",
"Evidence 0.517376763123455\n",
"Claim 0.46879405356914006\n",
"Concluding Statement 0.525089605734767\n",
"Counterclaim 0.3812785388127854\n",
"Rebuttal 0.30016863406408095\n",
"\n",
"Overall 0.4772136354767126\n"
]
}
],
"source": [
"f1s = []\n",
"CLASSES = oof['class'].unique()\n",
"for c in CLASSES:\n",
" pred_df = oof.loc[oof['class']==c].copy()\n",
" gt_df = valid.loc[valid['discourse_type']==c].copy()\n",
" f1 = score_feedback_comp(pred_df, gt_df)\n",
" print(c,f1)\n",
" f1s.append(f1)\n",
"print()\n",
"print('Overall',np.mean(f1s))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "p8z-ZHtZovUh",
"outputId": "d53b7c69-7319-46a8-db64-6b03720a6551"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"There are 10402 test texts.\n"
]
}
],
"source": [
"# GET TEST TEXT IDS\n",
"#files = os.listdir('../input/feedback-prize-2021/test')\n",
"#files = os.listdir('/kaggle/input/rater-dataset-like-fp21c/competition_data_like_fp21c/test')\n",
"files = os.listdir('data/competition_data_like_fp21c/test')\n",
"TEST_IDS = [f.replace('.txt','') for f in files if 'txt' in f]\n",
"print('There are',len(TEST_IDS),'test texts.')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "YZWXhyw3qez7"
},
"outputs": [],
"source": [
"# CONVERT TEST TEXT TO TOKENS\n",
"test_tokens = np.zeros((len(TEST_IDS),MAX_LEN), dtype='int32')\n",
"test_attention = np.zeros((len(TEST_IDS),MAX_LEN), dtype='int32')\n",
"\n",
"for id_num in range(len(TEST_IDS)):\n",
"\n",
" # READ TRAIN TEXT, TOKENIZE, AND SAVE IN TOKEN ARRAYS\n",
" n = TEST_IDS[id_num]\n",
" #name = f'../input/feedback-prize-2021/test/{n}.txt'\n",
" #name = f'/kaggle/input/rater-dataset-like-fp21c/competition_data_like_fp21c/test/{n}.txt'\n",
" name = f'data/competition_data_like_fp21c/test/{n}.txt'\n",
" txt = open(name, 'r').read()\n",
" tokens = tokenizer.encode_plus(txt, max_length=MAX_LEN, padding='max_length',\n",
" truncation=True, return_offsets_mapping=True)\n",
" test_tokens[id_num,] = tokens['input_ids']\n",
" test_attention[id_num,] = tokens['attention_mask']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "zYERYRWYqew6",
"outputId": "df94a8d5-2fb3-4b92-d784-29bb709894c5"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"326/326 - 257s - 257s/epoch - 787ms/step\n",
"Test predictions shape: (10402, 512, 17)\n"
]
}
],
"source": [
"# INFER TEST TEXTS\n",
"p = model.predict([test_tokens, test_attention], batch_size=32, verbose=2)\n",
"print('Test predictions shape:',p.shape)\n",
"test_preds = np.argmax(p,axis=-1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "f3KwQoeFqeua"
},
"outputs": [],
"source": [
"# GET TEST PREDICIONS\n",
"sub = get_preds( dataset='test', verbose=False, text_ids=TEST_IDS, preds=test_preds )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "wP3R9KB2rCVl",
"outputId": "7b611504-58d7-482d-f0a6-2230313f623b"
},
"outputs": [
{
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"summary": "{\n \"name\": \"sub\",\n \"rows\": 57914,\n \"fields\": [\n {\n \"column\": \"id\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 10272,\n \"samples\": [\n \"FE776C83FE1B\",\n \"E89C454FDDCB\",\n \"487321AC33FE\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"class\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 8,\n \"samples\": [\n \"Position\",\n \"Evidence\",\n \"Lead\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"predictionstring\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 24705,\n \"samples\": [\n \"6 7 8 9 10 11 12\",\n \"294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382\",\n \"133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}",
"type": "dataframe",
"variable_name": "sub"
},
"text/html": [
"\n",
" <div id=\"df-9281444f-a035-4092-8329-2dd3ad067a92\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>class</th>\n",
" <th>predictionstring</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Lead</td>\n",
" <td>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Position</td>\n",
" <td>104 105 106 107 108 109 110 111 112 113 114</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Claim</td>\n",
" <td>116 117 118 119 120 121</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Claim</td>\n",
" <td>122 123 124 125 126 127 128 129</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Claim</td>\n",
" <td>131 132 133 134 135 136 137 138 139 140 141 142</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-9281444f-a035-4092-8329-2dd3ad067a92')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-9281444f-a035-4092-8329-2dd3ad067a92 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-9281444f-a035-4092-8329-2dd3ad067a92');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-df211e6d-9482-4970-9a85-8a71390c662c\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-df211e6d-9482-4970-9a85-8a71390c662c')\"\n",
" title=\"Suggest charts\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-df211e6d-9482-4970-9a85-8a71390c662c button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
],
"text/plain": [
" id class predictionstring\n",
"0 B5881296C4D9 Lead 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...\n",
"1 B5881296C4D9 Position 104 105 106 107 108 109 110 111 112 113 114\n",
"2 B5881296C4D9 Claim 116 117 118 119 120 121\n",
"3 B5881296C4D9 Claim 122 123 124 125 126 127 128 129\n",
"4 B5881296C4D9 Claim 131 132 133 134 135 136 137 138 139 140 141 142"
]
},
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sub.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"background_save": true
},
"id": "qB0gg4fxqerV"
},
"outputs": [],
"source": [
"# WRITE SUBMISSION CSV\n",
"#sub.to_csv('submission.csv',index=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "6X_qJgKZcWEo"
},
"outputs": [],
"source": [
"sub['class'].unique()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "YF7ykHBIrMq3",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 175
},
"outputId": "4b3c363c-d43e-4cef-bb5c-fc29f2635b45"
},
"outputs": [
{
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"summary": "{\n \"name\": \"sample_sub\",\n \"rows\": 4,\n \"fields\": [\n {\n \"column\": \"essay_id_comp\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1,\n \"samples\": [\n \"215B5CA132E4\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"predictionstring\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 4,\n \"samples\": [\n \"12 13 14 15 16 17 18 19 20 21 22\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"score_discourse_effectiveness_0\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.1373559851869101,\n \"min\": 0.217,\n \"max\": 0.521,\n \"num_unique_values\": 4,\n \"samples\": [\n 0.217\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"score_discourse_effectiveness_1\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.1373559851869101,\n \"min\": 0.479,\n \"max\": 0.783,\n \"num_unique_values\": 4,\n \"samples\": [\n 0.783\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"discourse_type\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 0,\n \"max\": 3,\n \"num_unique_values\": 4,\n \"samples\": [\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}",
"type": "dataframe",
"variable_name": "sample_sub"
},
"text/html": [
"\n",
" <div id=\"df-31448d52-9082-4737-bbc2-f4f465bfa44f\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>essay_id_comp</th>\n",
" <th>predictionstring</th>\n",
" <th>score_discourse_effectiveness_0</th>\n",
" <th>score_discourse_effectiveness_1</th>\n",
" <th>discourse_type</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>215B5CA132E4</td>\n",
" <td>1 2 3 4 5 6 7 8 9 10 11</td>\n",
" <td>0.483</td>\n",
" <td>0.517</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>215B5CA132E4</td>\n",
" <td>12 13 14 15 16 17 18 19 20 21 22</td>\n",
" <td>0.217</td>\n",
" <td>0.783</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>215B5CA132E4</td>\n",
" <td>23 24 25 26 27 28 29 30 31 32 33 34 35 36</td>\n",
" <td>0.521</td>\n",
" <td>0.479</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>215B5CA132E4</td>\n",
" <td>35 36 37 38 39 40 41 42 43 44 45</td>\n",
" <td>0.359</td>\n",
" <td>0.641</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-31448d52-9082-4737-bbc2-f4f465bfa44f')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-31448d52-9082-4737-bbc2-f4f465bfa44f button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-31448d52-9082-4737-bbc2-f4f465bfa44f');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-2f81389d-6ffc-4302-abfc-42b8b6bc1500\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-2f81389d-6ffc-4302-abfc-42b8b6bc1500')\"\n",
" title=\"Suggest charts\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-2f81389d-6ffc-4302-abfc-42b8b6bc1500 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
],
"text/plain": [
" essay_id_comp predictionstring \\\n",
"0 215B5CA132E4 1 2 3 4 5 6 7 8 9 10 11 \n",
"1 215B5CA132E4 12 13 14 15 16 17 18 19 20 21 22 \n",
"2 215B5CA132E4 23 24 25 26 27 28 29 30 31 32 33 34 35 36 \n",
"3 215B5CA132E4 35 36 37 38 39 40 41 42 43 44 45 \n",
"\n",
" score_discourse_effectiveness_0 score_discourse_effectiveness_1 \\\n",
"0 0.483 0.517 \n",
"1 0.217 0.783 \n",
"2 0.521 0.479 \n",
"3 0.359 0.641 \n",
"\n",
" discourse_type \n",
"0 0 \n",
"1 1 \n",
"2 3 \n",
"3 2 "
]
},
"execution_count": 71,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sample_sub = pd.read_csv('data/competition_data_like_fp21c/sample_submission.csv')\n",
"sample_sub.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "ifprmPUIrsrv",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
},
"outputId": "cbf30bbe-183f-45ea-94df-7af9adaa9edd"
},
"outputs": [
{
"data": {
"application/vnd.google.colaboratory.intrinsic+json": {
"summary": "{\n \"name\": \"sub\",\n \"rows\": 57914,\n \"fields\": [\n {\n \"column\": \"id\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 10272,\n \"samples\": [\n \"FE776C83FE1B\",\n \"E89C454FDDCB\",\n \"487321AC33FE\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"class\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 8,\n \"samples\": [\n \"Position\",\n \"Evidence\",\n \"Lead\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"predictionstring\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 24705,\n \"samples\": [\n \"6 7 8 9 10 11 12\",\n \"294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382\",\n \"133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"essay_id_comp\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 10272,\n \"samples\": [\n \"FE776C83FE1B\",\n \"E89C454FDDCB\",\n \"487321AC33FE\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"score_discourse_effectiveness_0\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 2.2204652196996427e-16,\n \"min\": 0.9,\n \"max\": 0.9,\n \"num_unique_values\": 1,\n \"samples\": [\n 0.9\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"score_discourse_effectiveness_1\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.0,\n \"min\": 0.1,\n \"max\": 0.1,\n \"num_unique_values\": 1,\n \"samples\": [\n 0.1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"discourse_type\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 0,\n \"max\": 7,\n \"num_unique_values\": 8,\n \"samples\": [\n 1\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}",
"type": "dataframe",
"variable_name": "sub"
},
"text/html": [
"\n",
" <div id=\"df-aef6b292-f28c-480e-9e58-cb45c9733312\" class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>class</th>\n",
" <th>predictionstring</th>\n",
" <th>essay_id_comp</th>\n",
" <th>score_discourse_effectiveness_0</th>\n",
" <th>score_discourse_effectiveness_1</th>\n",
" <th>discourse_type</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Lead</td>\n",
" <td>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...</td>\n",
" <td>B5881296C4D9</td>\n",
" <td>0.9</td>\n",
" <td>0.1</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Position</td>\n",
" <td>104 105 106 107 108 109 110 111 112 113 114</td>\n",
" <td>B5881296C4D9</td>\n",
" <td>0.9</td>\n",
" <td>0.1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Claim</td>\n",
" <td>116 117 118 119 120 121</td>\n",
" <td>B5881296C4D9</td>\n",
" <td>0.9</td>\n",
" <td>0.1</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Claim</td>\n",
" <td>122 123 124 125 126 127 128 129</td>\n",
" <td>B5881296C4D9</td>\n",
" <td>0.9</td>\n",
" <td>0.1</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>B5881296C4D9</td>\n",
" <td>Claim</td>\n",
" <td>131 132 133 134 135 136 137 138 139 140 141 142</td>\n",
" <td>B5881296C4D9</td>\n",
" <td>0.9</td>\n",
" <td>0.1</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-aef6b292-f28c-480e-9e58-cb45c9733312')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
"\n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-aef6b292-f28c-480e-9e58-cb45c9733312 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-aef6b292-f28c-480e-9e58-cb45c9733312');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
"\n",
"\n",
"<div id=\"df-2f54d42a-80ce-4d02-bd4a-8e17ec61fddb\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-2f54d42a-80ce-4d02-bd4a-8e17ec61fddb')\"\n",
" title=\"Suggest charts\"\n",
" style=\"display:none;\">\n",
"\n",
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-2f54d42a-80ce-4d02-bd4a-8e17ec61fddb button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
" </div>\n",
" </div>\n"
],
"text/plain": [
" id class predictionstring \\\n",
"0 B5881296C4D9 Lead 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18... \n",
"1 B5881296C4D9 Position 104 105 106 107 108 109 110 111 112 113 114 \n",
"2 B5881296C4D9 Claim 116 117 118 119 120 121 \n",
"3 B5881296C4D9 Claim 122 123 124 125 126 127 128 129 \n",
"4 B5881296C4D9 Claim 131 132 133 134 135 136 137 138 139 140 141 142 \n",
"\n",
" essay_id_comp score_discourse_effectiveness_0 \\\n",
"0 B5881296C4D9 0.9 \n",
"1 B5881296C4D9 0.9 \n",
"2 B5881296C4D9 0.9 \n",
"3 B5881296C4D9 0.9 \n",
"4 B5881296C4D9 0.9 \n",
"\n",
" score_discourse_effectiveness_1 discourse_type \n",
"0 0.1 0 \n",
"1 0.1 1 \n",
"2 0.1 2 \n",
"3 0.1 2 \n",
"4 0.1 2 "
]
},
"execution_count": 72,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sub['essay_id_comp'] = sub['id']\n",
"sub['score_discourse_effectiveness_0'] = 0.90\n",
"sub['score_discourse_effectiveness_1'] = 0.10\n",
"sub['discourse_type'] = sub['class'].apply(lambda x: target_map[x])\n",
"sub.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "lGd3xHGqtUtN",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "655bb28e-f9ed-4c5a-e403-608be0ecc4ea"
},
"outputs": [
{
"data": {
"text/plain": [
"(57914, 7)"
]
},
"execution_count": 73,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sub.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "pbNYI6VZtaEH",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "140653ca-5934-4daa-85cc-b635765b2584"
},
"outputs": [
{
"data": {
"text/plain": [
"(55433, 5)"
]
},
"execution_count": 74,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"final_sub = sub[sub['discourse_type'] < 7][sample_sub.columns]\n",
"final_sub.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "AionYk2Nzi38",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "aaa79155-3cf1-493d-a57a-8ed473841c4b"
},
"outputs": [
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"2CE147B3C45D not in the final_sub\n",
"10F740050AD3 not in the final_sub\n",
"BA16E742ED38 not in the final_sub\n",
"54B46324BA23 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"6150E2E5C088 not in the final_sub\n",
"2F414512211C not in the final_sub\n",
"56BC9B63B5DD not in the final_sub\n",
"72DFE98B5939 not in the final_sub\n",
"7EEF18A458A3 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"A27FFF687F43 not in the final_sub\n",
"091AA1C56303 not in the final_sub\n",
"92A336C2C49E not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"922A0E117642 not in the final_sub\n",
"FCA8E7A879AB not in the final_sub\n",
"3C6E141725A0 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"2D2288A28050 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"2BE26052C376 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"BA01E697AF3D not in the final_sub\n",
"AFEEFDBDDBDF not in the final_sub\n",
"FCE99B6AA6EB not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"CE0BD510CEA7 not in the final_sub\n",
"ED4795127FC4 not in the final_sub\n",
"D1BB1EA6F163 not in the final_sub\n",
"D73D36BC9D03 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"87E09CE6EEAA not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"17025BA7A3B3 not in the final_sub\n",
"261DCD26AE0C not in the final_sub\n",
"078A66FE7AFB not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"9C77931379FA not in the final_sub\n",
"C1344792E69D not in the final_sub\n",
"5576D8973B5A not in the final_sub\n",
"C5CC69261CD9 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"0B58C8B94F19 not in the final_sub\n",
"E9197A319E30 not in the final_sub\n",
"4EA97FE40C2A not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"A08EBC05B02F not in the final_sub\n",
"FDDD74678C7A not in the final_sub\n",
"5822ECBEECAF not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"0E3B34467BCE not in the final_sub\n",
"0A911626AF3B not in the final_sub\n",
"6D564FDF2684 not in the final_sub\n",
"A6693E6AB1C7 not in the final_sub\n",
"97A38CA2F500 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"DCEB264BCBC5 not in the final_sub\n",
"5DDAA8731B0F not in the final_sub\n",
"0B72BCCD5631 not in the final_sub\n",
"BC6D001F512D not in the final_sub\n",
"3C3DB575B145 not in the final_sub\n",
"AEE7027DF5C3 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"54986FCA3028 not in the final_sub\n",
"9D46E8F0C62A not in the final_sub\n",
"0FE8E2AE214E not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"6E5EB6C0E758 not in the final_sub\n",
"6739BB5B429D not in the final_sub\n",
"EB3C0D72CD1E not in the final_sub\n",
"590BC5332D0E not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"E24EC53BA8C3 not in the final_sub\n",
"5C95E3F7B0BE not in the final_sub\n",
"C958F3586AD8 not in the final_sub\n",
"2E660063BE26 not in the final_sub\n",
"A0D127A810E3 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"93E547BF9654 not in the final_sub\n",
"224E9914A127 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"C54C7EF5A5A6 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"D123B48DE9CD not in the final_sub\n",
"9F4AB89F0977 not in the final_sub\n",
"F8C397108272 not in the final_sub\n",
"94B6301B0B93 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"07B2C5347CF8 not in the final_sub\n",
"D26A9600ED57 not in the final_sub\n",
"7A7AB3A514CC not in the final_sub\n",
"B51DFF531F7E not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"6B7A90B2252E not in the final_sub\n",
"3187EC7C91DB not in the final_sub\n",
"313D87B65C8E not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"FDA59178D44A not in the final_sub\n",
"D9FEA69DB869 not in the final_sub\n",
"111482F37FF0 not in the final_sub\n",
"295D0A2F0BE9 not in the final_sub\n",
"35B8D5BA3032 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"B4CC50884BFF not in the final_sub\n",
"918C7B07757B not in the final_sub\n",
"0AF80C04491F not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"96153ADEDED4 not in the final_sub\n",
"4F694E02BFD3 not in the final_sub\n",
"073DBAEE6E0B not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"EB8E99B283D6 not in the final_sub\n",
"D75BACBBB288 not in the final_sub\n",
"5A51FC731752 not in the final_sub\n",
"2B31F5857EFD not in the final_sub\n",
"CB7961563277 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"E8C25EDACD20 not in the final_sub\n",
"AC2BD6966E7A not in the final_sub\n",
"EA485A2E96A8 not in the final_sub\n",
"4D7021E21BAF not in the final_sub\n",
"6AB3F41436B9 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"FB501A408B8A not in the final_sub\n",
"4259261D1C5E not in the final_sub\n",
"DDB0899400DE not in the final_sub\n",
"4881ADFB25A8 not in the final_sub\n",
"D5548F92DE61 not in the final_sub\n",
"3BB27F945141 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"A0D4D5DD8D7F not in the final_sub\n",
"AA5E62173BB5 not in the final_sub\n",
"8E6E2F81AB56 not in the final_sub\n",
"88755B067B5C not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"CCD8783CF958 not in the final_sub\n",
"C85A7965C5D4 not in the final_sub\n",
"0A2B81D2B7FF not in the final_sub\n",
"85DF590446F7 not in the final_sub\n",
"1DA7E85139DF not in the final_sub\n",
"46E4B04ABD2E not in the final_sub\n",
"29CA2A976785 not in the final_sub\n",
"FD713681D841 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"702FDD64B9D5 not in the final_sub\n",
"DFB707766C4F not in the final_sub\n",
"C716B4A085B3 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"67A0D6085DB8 not in the final_sub\n",
"9B1FBCAE9C99 not in the final_sub\n",
"31B60CC104C9 not in the final_sub\n",
"D1B22107BD62 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"9A9F2CF7C638 not in the final_sub\n",
"8B81ECA8E78D not in the final_sub\n",
"F73160F1E089 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"B7929D12F8C6 not in the final_sub\n",
"3F37BC755B3E not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"878CFA39A45F not in the final_sub\n",
"CBD00586CABD not in the final_sub\n",
"B1AF430ED707 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"D0085EB3F954 not in the final_sub\n",
"3A08C3C79A53 not in the final_sub\n",
"419FFE0FF11B not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n",
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stdout",
"output_type": "stream",
"text": [
"37B47DC62A78 not in the final_sub\n"
]
},
{
"metadata": {
"tags": null
},
"name": "stderr",
"output_type": "stream",
"text": [
"<ipython-input-75-aa533a275bbd>:14: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)\n"
]
}
],
"source": [
"from pathlib import Path\n",
"import pandas as pd\n",
"\n",
"final_sub_comb = final_sub.copy()\n",
"missing_essays = []\n",
"\n",
"for essay_file in Path('data/competition_data_like_fp21c/test').glob(\"*.txt\"):\n",
" essay_id = essay_file.stem\n",
" if essay_id not in final_sub['essay_id_comp'].values:\n",
" print(f'{essay_id} not in the final_sub')\n",
" missing_essays.append(essay_id)\n",
" new_row = final_sub.iloc[0].to_dict()\n",
" new_row['essay_id_comp'] = essay_id\n",
" final_sub_comb = final_sub_comb.append(new_row, ignore_index=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "QoGNGclA6pC-",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "376861f1-9fd0-46db-ef12-713d8a06f78f"
},
"outputs": [
{
"data": {
"text/plain": [
"133"
]
},
"execution_count": 76,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(missing_essays)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "vTGHNcmis1-d"
},
"outputs": [],
"source": [
"final_sub_comb.to_csv('submission.csv',index=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "TWFOgfX41cOO"
},
"outputs": [],
"source": [
"!zip -rq9 run_deberta3_xsmall_1.zip model attention_512.npy submission.csv targets_512.npy tokens_512.npy long_v14.h5"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "CfQPwO7Zqbn1"
},
"outputs": [],
"source": [
"!cp run_deberta3_xsmall_1.zip '/content/drive/MyDrive/Colab Notebooks/RATER/output'"
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "mNU6Q8oeWxag"
},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"provenance": [],
"authorship_tag": "ABX9TyPxeFLqwo1dhP3ltMaiWjPT",
"include_colab_link": true
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"1a2735bb87724029a84e91e2fec29efd": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_468dc0af70b444498b275cf8ab34cf7c",
"placeholder": "​",
"style": "IPY_MODEL_f19cff5e34d24827bcffafd51c0ce873",
"value": " 578/578 [00:00&lt;00:00, 40.4kB/s]"
}
},
"1d98393b3fc44510b603c1a0abcbcd76": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"2a05cd863d3f46fc96357375b952a6ab": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"2b0913dd1dc948efafde2d3ef4204bf4": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"2d832372122743ecb70f70701ae2284b": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_4485e460e67b443f9e919416038fc132",
"placeholder": "​",
"style": "IPY_MODEL_7762eeed26a74d3b814c6571ab2c784d",
"value": "tokenizer_config.json: 100%"
}
},
"30952d3740eb48f2b28c25f159ae7e3e": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_63e51aae96854cedbc84ceb42a199039",
"max": 283006984,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_ff097d0b6f8148f18673fb458dc27502",
"value": 283006984
}
},
"3fbf03f7022d4647bd9ee793e595a965": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"404e7ab2517e4ce3a81e00c0b4601c76": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_2b0913dd1dc948efafde2d3ef4204bf4",
"max": 2464616,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_9274b8066b464bdfb403a449f73000a8",
"value": 2464616
}
},
"4485e460e67b443f9e919416038fc132": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"468dc0af70b444498b275cf8ab34cf7c": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"4a08d5eff5714864adb30f3aaf798f31": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_a97bdb7ee2a14286ae3730164d2c55d0",
"placeholder": "​",
"style": "IPY_MODEL_bd2d363d396f48239ea91ee272537f37",
"value": "tf_model.h5: 100%"
}
},
"4b595e695d5946a0b2dbd297e7651343": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"52a3c9c2179b4e41b2cbcb1179dba738": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_a7576f54666144fb9d4a5d970d83d34a",
"max": 578,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_b42359e4c4004555a094aec8eb3b84d2",
"value": 578
}
},
"58758870e6e04659a95b910dd12f492e": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"62cfed46cc74456cadb7c0a896099b8c": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"63e51aae96854cedbc84ceb42a199039": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"682c0ef88bc14e638f96d50fdcb9f6c1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"6c430a8f383d4fc2b900d28d8e4bc853": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"6fdf0c77ddfe42a1be25a1460e651e37": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_682c0ef88bc14e638f96d50fdcb9f6c1",
"placeholder": "​",
"style": "IPY_MODEL_4b595e695d5946a0b2dbd297e7651343",
"value": "spm.model: 100%"
}
},
"746176d8b161464d8990d4364d6c4abd": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"7762eeed26a74d3b814c6571ab2c784d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"7cf60dbb6e3b4020a09b3b8e8f4d783d": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_94ee0de552704033b23578974afc5d7f",
"placeholder": "​",
"style": "IPY_MODEL_97eeaf4565db46ebae88e81bb878ac0e",
"value": " 52.0/52.0 [00:00&lt;00:00, 3.49kB/s]"
}
},
"87295fc7b439471db295e9e9dc6d556b": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_c6765f1449b44479909f02705389e29a",
"placeholder": "​",
"style": "IPY_MODEL_746176d8b161464d8990d4364d6c4abd",
"value": " 283M/283M [00:04&lt;00:00, 49.1MB/s]"
}
},
"92437b1c71e749559b06d1cd1b43f1e4": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_ca58462900c04c41a37f28d04a4b80e7",
"IPY_MODEL_52a3c9c2179b4e41b2cbcb1179dba738",
"IPY_MODEL_1a2735bb87724029a84e91e2fec29efd"
],
"layout": "IPY_MODEL_6c430a8f383d4fc2b900d28d8e4bc853"
}
},
"9274b8066b464bdfb403a449f73000a8": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"94ee0de552704033b23578974afc5d7f": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"97eeaf4565db46ebae88e81bb878ac0e": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"9c361f4af4894de28eb68f796d8aa91c": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"a3fe22c2a1d0413a8af7aa5041269cd7": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_e97cb919245e464b94532f33b80ef9cd",
"placeholder": "​",
"style": "IPY_MODEL_1d98393b3fc44510b603c1a0abcbcd76",
"value": " 2.46M/2.46M [00:00&lt;00:00, 27.5MB/s]"
}
},
"a7576f54666144fb9d4a5d970d83d34a": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"a97bdb7ee2a14286ae3730164d2c55d0": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"ad42ec5540264f348b91b4bdc7c0fea4": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_58758870e6e04659a95b910dd12f492e",
"max": 52,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_9c361f4af4894de28eb68f796d8aa91c",
"value": 52
}
},
"aeda8c3dc246486abae516856b1816bd": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_4a08d5eff5714864adb30f3aaf798f31",
"IPY_MODEL_30952d3740eb48f2b28c25f159ae7e3e",
"IPY_MODEL_87295fc7b439471db295e9e9dc6d556b"
],
"layout": "IPY_MODEL_eb94cbc2ba684ce387403b5411f787c9"
}
},
"b42359e4c4004555a094aec8eb3b84d2": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"b7ebce7ef8d5464aaf09c16ef4b0d6a1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"bd2d363d396f48239ea91ee272537f37": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"c1f4a1f9930749d3a76cfad025d2917e": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_2d832372122743ecb70f70701ae2284b",
"IPY_MODEL_ad42ec5540264f348b91b4bdc7c0fea4",
"IPY_MODEL_7cf60dbb6e3b4020a09b3b8e8f4d783d"
],
"layout": "IPY_MODEL_3fbf03f7022d4647bd9ee793e595a965"
}
},
"c6765f1449b44479909f02705389e29a": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"ca58462900c04c41a37f28d04a4b80e7": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_b7ebce7ef8d5464aaf09c16ef4b0d6a1",
"placeholder": "​",
"style": "IPY_MODEL_62cfed46cc74456cadb7c0a896099b8c",
"value": "config.json: 100%"
}
},
"e454849ea1c34494b42a6abc1da83eaa": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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_6fdf0c77ddfe42a1be25a1460e651e37",
"IPY_MODEL_404e7ab2517e4ce3a81e00c0b4601c76",
"IPY_MODEL_a3fe22c2a1d0413a8af7aa5041269cd7"
],
"layout": "IPY_MODEL_2a05cd863d3f46fc96357375b952a6ab"
}
},
"e97cb919245e464b94532f33b80ef9cd": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"eb94cbc2ba684ce387403b5411f787c9": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"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
}
},
"f19cff5e34d24827bcffafd51c0ce873": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
},
"ff097d0b6f8148f18673fb458dc27502": {
"model_module": "@jupyter-widgets/controls",
"model_module_version": "1.5.0",
"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": ""
}
}
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment