7663 lines (7663 with data), 275.3 kB
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/jlopetegui98/NER-ClinicalTrials-Elegibility-Criteria/blob/main/Roberta%2BLLM/compare_two_prompts.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "QO5obdMWWJJw",
"outputId": "c0b8b68d-1af6-4308-8ea1-873bd428ecd5"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/drive\n"
]
}
],
"source": [
"# uncomment if working in colab\n",
"from google.colab import drive\n",
"drive.mount('/content/drive')"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "uXHZTGK9WJJx",
"outputId": "c8a0372f-8774-40df-d275-03e90c2c8848"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m510.5/510.5 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m13.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m11.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m12.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting seqeval\n",
" Downloading seqeval-1.2.2.tar.gz (43 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m43.6/43.6 kB\u001b[0m \u001b[31m1.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
"Requirement already satisfied: numpy>=1.14.0 in /usr/local/lib/python3.10/dist-packages (from seqeval) (1.25.2)\n",
"Requirement already satisfied: scikit-learn>=0.21.3 in /usr/local/lib/python3.10/dist-packages (from seqeval) (1.2.2)\n",
"Requirement already satisfied: scipy>=1.3.2 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.21.3->seqeval) (1.11.4)\n",
"Requirement already satisfied: joblib>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.21.3->seqeval) (1.4.0)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn>=0.21.3->seqeval) (3.4.0)\n",
"Building wheels for collected packages: seqeval\n",
" Building wheel for seqeval (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16161 sha256=3d05e378a95e6360b53d3fd878ed43d9796294678465f3f139c5e30bef6ab718\n",
" Stored in directory: /root/.cache/pip/wheels/1a/67/4a/ad4082dd7dfc30f2abfe4d80a2ed5926a506eb8a972b4767fa\n",
"Successfully built seqeval\n",
"Installing collected packages: seqeval\n",
"Successfully installed seqeval-1.2.2\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m84.1/84.1 kB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
" Building wheel for transformers (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m119.8/119.8 MB\u001b[0m \u001b[31m8.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m297.4/297.4 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25h Building wheel for peft (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
" Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
" Building wheel for accelerate (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"
]
}
],
"source": [
"# uncomment if using colab\n",
"!pip install -q -U datasets\n",
"!pip install seqeval\n",
"!pip install -q -U evaluate\n",
"!pip install -q -U git+https://github.com/huggingface/transformers.git\n",
"!pip install -q -U bitsandbytes\n",
"# !pip install -i https://pypi.org/simple/ bitsandbytes\n",
"!pip install -q -U git+https://github.com/huggingface/peft.git\n",
"!pip install -q -U git+https://github.com/huggingface/accelerate.git"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "iwRXECp_WJJx"
},
"outputs": [],
"source": [
"from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, TextGenerationPipeline\n",
"import torch\n",
"import accelerate\n",
"import os\n",
"from utils import *"
]
},
{
"cell_type": "code",
"source": [
"import pandas as pd\n",
"from datasets import Dataset, DatasetDict"
],
"metadata": {
"id": "-De8g6lgpWtZ"
},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"source": [
"from datasets import load_dataset, load_metric"
],
"metadata": {
"id": "e7Bpoz11bRe3"
},
"execution_count": 3,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 159,
"referenced_widgets": [
"0f4e594a6aa64dd697fb841d4207d4b7",
"413c1cd08da84e32ba2de36d891bf86a",
"ba7f75db7de145abb174658862ef50a3",
"d55f2bd66fe044e4816348c1b4b032bf",
"d1fd6600f76a4bf7968b0d13de093148",
"b00aef23e75445c785a6b3b8756b9c94",
"1fa716b65c7f47989184cc24bd56e5bd",
"494b9dacddb948f7b08b509e7a79f3f1",
"e3e2f93363b74e24bf22abcaf021b3dc",
"b607f0954b3844e18ed2a887372d42c5",
"95176ba773274023b4e3356bb3cb4cc9",
"ac4c65187e864fd09e296fcbbe3ad6d8",
"540f2e543376445d849e1a56ac38e4d4",
"a9d9e19fa5ae41109e7c7cf9a4d8a13c",
"4fd000047a0a402194cb3b99bb59d8f9",
"9d08585ce6fd40538dc10d1c5d1aee70",
"f4642fc990e94bf99c7d26017d8771ba",
"9c49b620b2c04b83ae01bf4ab06e7270",
"d47d0c2d528c40a38965fac763e450cf",
"374d4f7c917d48c2b81f24cbfcfce062",
"9f151f163b2c4966b9460dd31e184a84",
"67a9e41b56a741baa4a953905d11c263",
"e32ad767760d4bddb2f3a0a38327339b",
"681dac30b90b4b02b38f9e5bb99429c0",
"dd0df631524e42e48299283f1a9555e9",
"609d5b49e085499994a11342e8dd425f",
"3e7792c5d2484e24950f1f83f899ba4a",
"8fae6bd7ebc54636a14b375fa46ec0dc",
"7fa56a404f8847239109441a3b043a77",
"d34e4794cb944c1cb8ae88845cad54fb",
"4856843799e242ac8b72cf37ad1a159f",
"c3c6d1e8aeb14e999ea3fadc10539861"
]
},
"id": "SMrGGcyPWJJy",
"outputId": "1988c833-06f1-44c2-c832-525b2dabee55"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "0f4e594a6aa64dd697fb841d4207d4b7"
}
},
"metadata": {}
}
],
"source": [
"from huggingface_hub import notebook_login\n",
"\n",
"notebook_login()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"id": "eOQPAyi5WJJy"
},
"outputs": [],
"source": [
"# dict for the entities (entity to int value)\n",
"simple_ent = {\"Condition\", \"Value\", \"Drug\", \"Procedure\", \"Measurement\", \"Temporal\", \"Observation\", \"Person\", \"Device\"}\n",
"sel_ent = {\n",
" \"O\": 0,\n",
" \"B-Condition\": 1,\n",
" \"I-Condition\": 2,\n",
" \"B-Value\": 3,\n",
" \"I-Value\": 4,\n",
" \"B-Drug\": 5,\n",
" \"I-Drug\": 6,\n",
" \"B-Procedure\": 7,\n",
" \"I-Procedure\": 8,\n",
" \"B-Measurement\": 9,\n",
" \"I-Measurement\": 10,\n",
" \"B-Temporal\": 11,\n",
" \"I-Temporal\": 12,\n",
" \"B-Observation\": 13,\n",
" \"I-Observation\": 14,\n",
" \"B-Person\": 15,\n",
" \"I-Person\": 16,\n",
" \"B-Device\": 17,\n",
" \"I-Device\": 18\n",
"}\n",
"\n",
"entities_list = list(sel_ent.keys())\n",
"sel_ent_inv = {v: k for k, v in sel_ent.items()}"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"id": "5mCzQOK7WJJy"
},
"outputs": [],
"source": [
"root = '..'\n",
"root = './drive/MyDrive/TER-LISN-2024'\n",
"data_path = f'{root}/data'\n",
"models_path = f'{root}/models'"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"id": "9WoScuG9WJJy"
},
"outputs": [],
"source": [
"model_name = \"mistralai/Mistral-7B-v0.1\""
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 173,
"referenced_widgets": [
"e1b0ea4e59bd4bebb31544a4ca43fae6",
"bb7c0220e2404676a2a37b5f8e45a560",
"d9a38641722d4d1698c9eb12c9ba2aa2",
"726b3712020e475e8e5734e51ad3255b",
"b834f5ce5d4b4e8eac3688c2119e0e6e",
"99fea94eaf344a1687764756225e9a88",
"640023c221074c73a38d147a05cfedaf",
"e2a1e70aa375450299d81baa7a007f1f",
"4f06ce02f7b8452981731c87ac3814bc",
"ed7294f2acf84015ac0c0c3b78c629cb",
"1cf1101362c545738dcbb5e528f1af33"
]
},
"id": "-R1Ht6AqWJJy",
"outputId": "9b883de3-f658-4402-c902-cfd946986427"
},
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"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"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "e1b0ea4e59bd4bebb31544a4ca43fae6"
}
},
"metadata": {}
}
],
"source": [
"# Load base model(Mistral 7B)\n",
"bnb_config = BitsAndBytesConfig(\n",
" load_in_4bit= True,\n",
" bnb_4bit_quant_type= \"nf4\",\n",
" bnb_4bit_compute_dtype= torch.bfloat16,\n",
" bnb_4bit_use_double_quant= False,\n",
")\n",
"model = AutoModelForCausalLM.from_pretrained(\n",
" model_name,\n",
" quantization_config=bnb_config,\n",
" device_map={\"\": 0}\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "zjt27HXtWJJz",
"outputId": "0df3c4ce-03eb-4f64-9546-b790d5fdd3a8"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(True, True)"
]
},
"metadata": {},
"execution_count": 9
}
],
"source": [
"# import tokenizer for mistral-7B\n",
"tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)\n",
"tokenizer.padding_side = 'left'\n",
"tokenizer.pad_token = tokenizer.eos_token\n",
"tokenizer.add_eos_token = True\n",
"tokenizer.add_bos_token, tokenizer.add_eos_token"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"id": "_CvK-Os_WJJz"
},
"outputs": [],
"source": [
"pipe = TextGenerationPipeline(model = model, tokenizer = tokenizer)"
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "ooEQwK2tSDat"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"id": "DjRonD-qWJJz"
},
"outputs": [],
"source": [
"dataset = load_dataset('JavierLopetegui/chia_v1')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"id": "4OY0LfqXWJJz"
},
"outputs": [],
"source": [
"# for each sentence save the text\n",
"def generate_sentences_from_tokens(sentences):\n",
" texts_sentences = []\n",
" sentences_tokens = sentences['tokens']\n",
" for sentence in sentences_tokens:\n",
" sent_text = \" \".join(sentence)\n",
" texts_sentences.append(sent_text)\n",
" sentences['text'] = texts_sentences\n",
" return sentences"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"id": "3RB2Ao-7WJJz"
},
"outputs": [],
"source": [
"def build_prompts(sentences, prompt_type=2):\n",
" sentences_prompts = []\n",
" for sent in sentences['text']:\n",
" prompt = build_prompt(sent, prompt_type)\n",
" sentences_prompts.append(prompt)\n",
" sentences['prompt'] = sentences_prompts\n",
" return sentences"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"id": "brYkkOKPWJJ0"
},
"outputs": [],
"source": [
"dataset = dataset.map(lambda x: generate_sentences_from_tokens(x), batched = True)\n",
"dataset_prompt1 = dataset.map(lambda x: build_prompts(x, prompt_type=1), batched = True)\n",
"dataset_prompt2 = dataset.map(lambda x: build_prompts(x, prompt_type=2), batched = True)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"id": "-DsYscp_WJJ0"
},
"outputs": [],
"source": [
"test_dataset_p1 = dataset_prompt1['test']\n",
"test_dataset_p2 = dataset_prompt2['test']"
]
},
{
"cell_type": "code",
"source": [
"test_dataset_p1['prompt'][0]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 209
},
"id": "brQSqtjxbbJ8",
"outputId": "2da15406-ca32-490f-8349-c5f0b78fb1b9"
},
"execution_count": 16,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'I need to perform a named entity recognition task on a text related with inclusion criteria in clinical trials.\\n The entities you need to recognize are: Condition, Value, Drug, Procedure, Measurement, Temporal, Observation, Person, Mood, Device and Pregnancy_considerations.\\n Particularly you have to produce the ouput in the BIO format. I will show you an example of the expected output.\\n Input text: Patients with symptomatic CNS metastases or leptomeningeal involvement\\n Output:\\n Patients O\\n with O\\n symptomatic O\\n CNS B-Condition\\n metastases I-Condition\\n or O\\n leptomeningeal B-Condition\\n involvement I-Condition\\n\\n You can see that tokens without any entity are labeled as O, and the tokens that are part of an entity are labeled as B-<entity> or I-<entity> depending on if they are the beginning or the inside of the entity.\\n Please, just answer the question for this specific example and stop writting after that.\\n Input text: self - reported healthy adults between the ages of 18 - 60 who are fluent in English .'"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 16
}
]
},
{
"cell_type": "code",
"source": [
"test_dataset_p2['prompt'][0]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 209
},
"id": "tJzeOg9vbh3j",
"outputId": "aaeb49fb-3d83-4832-abda-034df0f7aede"
},
"execution_count": 17,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'I am working on a named entity recognition problem, in the context of clinical\\n trials eligibility criteria. I will show you the list of entities:\\n - Condition\\n - Value\\n - Drug\\n - Procedure\\n - Measurement\\n - Temporal\\n - Observation\\n - Person\\n - Mood\\n - Device\\n\\n Your task consists in annotate the named entities in a given sentence in the format I will explain you.\\n I will explain you with some examples:\\n\\n Example 1:\\n Input: Patients who have received prior chemotherapy for unresectable disease.\\n Output: Patients who have received prior <Procedure>chemotherapy</Procedure> for <Condition>unresectable disease</Condition>.\\n\\n Example 2:\\n Input: Patients with any other severe concurrent disease, which in the judgment of the investigator, would make the patient inappropriate for entry into this study.\\n Ouput: Patients with any other severe <Condition>concurrent disease</Condition>, which in the judgment of the investigator, would make the patient <Mood>inappropriate for <Observation>entry into this study</Observation>.\\n\\n As you can see, in each example, the extracted entities are enclosed using the sintax: <ENT>text of the entity</ENT>.\\n\\n Please now annotate as explained before the following sentence:\\n\\n Input: self - reported healthy adults between the ages of 18 - 60 who are fluent in English .'"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 17
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "ANrMTM9xWJJ0"
},
"outputs": [],
"source": [
"# # keep just the prompt column\n",
"# test_dataset_p1 = test_dataset_p1.remove_columns(['tokens', 'text', 'ner_tags', 'file'])\n",
"# test_dataset_p2 = test_dataset_p2.remove_columns(['tokens', 'text', 'ner_tags', 'file'])"
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "fTKRysEQWaSM"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "W4SlSxy7WJJ0"
},
"outputs": [],
"source": [
"# data_loader_p1 = torch.utils.data.DataLoader(test_dataset_p1, batch_size=4, shuffle=False)\n",
"# data_loader_p2 = torch.utils.data.DataLoader(test_dataset_p2, batch_size=4, shuffle=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "Kgd_0VL8WJJ0"
},
"outputs": [],
"source": [
"# generated_sentences_p1 = []\n",
"# for batch in data_loader_p1:\n",
"# generated_sentences_p1.extend(pipe(batch['prompt'], max_new_tokens = 500, return_full_text = False, handle_long_generation = \"hole\"))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "nX5E-USMWJJ0"
},
"outputs": [],
"source": [
"# generated_sentences_p2 = []\n",
"# for batch in data_loader_p2:\n",
"# generated_sentences_p2.extend(pipe(batch['prompt'], max_new_tokens = 500, return_full_text = False, handle_long_generation = \"hole\"))"
]
},
{
"cell_type": "code",
"source": [
"from tqdm import tqdm"
],
"metadata": {
"id": "0JaNvN8Ec1Ko"
},
"execution_count": 21,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "yGBo9jS8WJJ0",
"outputId": "cc2c9e02-f75c-40ac-a262-7be58e3e09d0"
},
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
" 12%|█▏ | 6/50 [04:11<29:42, 40.51s/it]You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset\n",
"100%|██████████| 50/50 [33:08<00:00, 39.77s/it]\n"
]
}
],
"source": [
"# generation one by one\n",
"generated_sentences_p1 = []\n",
"for sentence in tqdm(test_dataset_p1['prompt'][:50]):\n",
" output = pipe(sentence, max_new_tokens = 500, return_full_text = False, handle_long_generation = \"hole\")[0]['generated_text']\n",
" output = output.split('\\n\\n')[0]\n",
" generated_sentences_p1.append(output)"
]
},
{
"cell_type": "code",
"source": [
"from tqdm import tqdm"
],
"metadata": {
"id": "rQ23uzq6A8NW"
},
"execution_count": 26,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "fASHzsJCWJJ0",
"outputId": "eb43ea5f-1eed-4794-945b-68fe63fd72a2"
},
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
" 14%|█▍ | 7/50 [04:47<29:07, 40.64s/it]You seem to be using the pipelines sequentially on GPU. In order to maximize efficiency please use a dataset\n",
"100%|██████████| 50/50 [34:05<00:00, 40.91s/it]\n"
]
}
],
"source": [
"generated_sentences_p2 = []\n",
"for sentence in tqdm(test_dataset_p2['prompt'][:50]):\n",
" sentence += '\\noutput: '\n",
" output = pipe(sentence, max_new_tokens = 500, return_full_text = False, handle_long_generation = \"hole\")[0]['generated_text']\n",
" output = output.split('\\n')[0]\n",
" generated_sentences_p2.append(output)"
]
},
{
"cell_type": "code",
"source": [
"generated_sentences_p2[0]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52
},
"id": "DoGkaFUrKux6",
"outputId": "c42a73f4-0e9c-40a1-9137-cf4adc1f937c"
},
"execution_count": 29,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"' self - reported healthy adults between the ages of <Measurement>18 - 60</Measurement> who are fluent in <Language>English</Language>.'"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 29
}
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 145,
"referenced_widgets": [
"c8846cf2991a4e93a0e91bc1802f1079",
"3b12538b8e254b4ebcc79d694b2b272c",
"205f861cb2ed48209b795217f645e077",
"25605c2b3e93464daedc1fcade1f47b4",
"98919ba0701545fd997e3d71f4eff69e",
"013efa5f201d460e9332bd047982c449",
"7a0323004bd14c579c27df13bf3f861b",
"ef49e0a4613f4207b11012c494b4ed15",
"f88c80704c59405f9224c9a98105303d",
"1a4eab919e9e475ea452687215355489",
"cf5d7616d08944108ae6dcfdb487cd5a",
"ae392574043b40c8bf461468e8f06f18",
"8af0715bcf2647c390c073430ffbbe5d",
"44e3af9f1124467b94cbb6f90f1669a3",
"804dbc29e4a9404d935b8ab10dc481e9",
"6ed75fda4c3f4fb2ab931ee7e162b3c4",
"d71d92ee94994f93bbbdedb475dc5ba5",
"1780c6cc045a49a6838bc1e43c89dca1",
"51b7d216e4144dd0a5ea92eb12e410b7",
"6e2bf10b566a453d8b342e824ec36fdf",
"1a7b5758d56d4811902698d1ad696163",
"11047f16bb534e70ad1d6bdde663cfa4",
"3791512b6e92422799da4e950c6dde6d",
"161970c8736a46899cd017c5e5906352",
"cfafc68041754603b0916c8e28a90d0b",
"a91cbbefe5ca4c07a46ad81424e2f0a7",
"995f169324d647fbb1c09c7ea3ec22d6",
"c617e79d6b4448f1af28c2d3c46d4ee5",
"1d23076205f3470590110feb368afd52",
"99a5dcb8b54c4e1da8747d16e1d54538",
"a890ce1e992a4f04a524d3c76927d5f6",
"4e12dbb6c203422193cf12d58338f1c3",
"ee8308b8ca9a4dd8b9993824f2df176c",
"3786b6a492114f58b8c92f904c80b9e2",
"d6d29174233e4d1596dd391b9a22eac2",
"fc135f2fe68d4b83ad57ecb3085febe1",
"f539dc11a57e425ea714a681d5027960",
"af7fa5b783c54fe4b62e53cd6641de2b",
"f0e324c229f7477baf1bb26fa4bc85ed",
"205312c7b62b4410a5aa1298deb1fb6f",
"4847afa0d5044cb0a0d693495ff05c63",
"0a7d5f7c3174491990f4f1018cbafe4f",
"b01bb888c2a646c0af368da52b9b4f2f",
"bf557e4621f04d56a736fda56470d77e"
]
},
"id": "3L_-8fahWJJ0",
"outputId": "4366e679-185a-490a-8b61-2677a32c83c5"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"tokenizer_config.json: 0%| | 0.00/25.0 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c8846cf2991a4e93a0e91bc1802f1079"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"config.json: 0%| | 0.00/615 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "ae392574043b40c8bf461468e8f06f18"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"sentencepiece.bpe.model: 0%| | 0.00/5.07M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "3791512b6e92422799da4e950c6dde6d"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"tokenizer.json: 0%| | 0.00/9.10M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "3786b6a492114f58b8c92f904c80b9e2"
}
},
"metadata": {}
}
],
"source": [
"tokenizer = AutoTokenizer.from_pretrained('xlm-roberta-base')"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"id": "9TAmhnSSWJJ1"
},
"outputs": [],
"source": [
"# tokenize and align the labels in the dataset\n",
"def tokenize_and_align_labels(sentence, flag = 'I'):\n",
" \"\"\"\n",
" Tokenize the sentence and align the labels\n",
" inputs:\n",
" sentence: dict, the sentence from the dataset\n",
" flag: str, the flag to indicate how to deal with the labels for subwords\n",
" - 'I': use the label of the first subword for all subwords but as intermediate (I-ENT)\n",
" - 'B': use the label of the first subword for all subwords as beginning (B-ENT)\n",
" - None: use -100 for subwords\n",
" outputs:\n",
" tokenized_sentence: dict, the tokenized sentence now with a field for the labels\n",
" \"\"\"\n",
" tokenized_sentence = tokenizer(sentence['tokens'], is_split_into_words=True, truncation=True)\n",
"\n",
" labels = []\n",
" for i, labels_s in enumerate(sentence['ner_tags']):\n",
" word_ids = tokenized_sentence.word_ids(batch_index=i)\n",
" previous_word_idx = None\n",
" label_ids = []\n",
" for word_idx in word_ids:\n",
" # if the word_idx is None, assign -100\n",
" if word_idx is None:\n",
" label_ids.append(-100)\n",
" # if it is a new word, assign the corresponding label\n",
" elif word_idx != previous_word_idx:\n",
" label_ids.append(labels_s[word_idx])\n",
" # if it is the same word, check the flag to assign\n",
" else:\n",
" if flag == 'I':\n",
" if entities_list[labels_s[word_idx]].startswith('I'):\n",
" label_ids.append(labels_s[word_idx])\n",
" else:\n",
" label_ids.append(labels_s[word_idx] + 1)\n",
" elif flag == 'B':\n",
" label_ids.append(labels_s[word_idx])\n",
" elif flag == None:\n",
" label_ids.append(-100)\n",
" previous_word_idx = word_idx\n",
" labels.append(label_ids)\n",
" tokenized_sentence['labels'] = labels\n",
" return tokenized_sentence"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "0KSHfmoLWJJ1"
},
"source": [
"**Standarizing true annotations**"
]
},
{
"cell_type": "code",
"source": [
"import re"
],
"metadata": {
"id": "p0OeK1ero68J"
},
"execution_count": 32,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "OVY071a-WJJ2",
"outputId": "e40e2a96-71e6-45f6-82c6-0c343fdc3f0f"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"1307"
]
},
"metadata": {},
"execution_count": 33
}
],
"source": [
"new_true_annotations = []\n",
"for sent in dataset['test']:\n",
" annotation = []\n",
" for word, tag in zip(sent['tokens'], sent['ner_tags']):\n",
" annotation.append((word, entities_list[tag]))\n",
" new_annotation = []\n",
" ps = r'(\\.|\\,|\\:|\\;|\\!|\\?|\\-|\\(|\\)|\\[|\\]|\\{|\\}|\\\")'\n",
" for i,(word, tag) in enumerate(annotation):\n",
" if re.search(ps, word):\n",
" # find the ocurrences of the punctuation signs\n",
" occurrences = re.finditer(ps, word)\n",
" indexes = [(match.start(), match.end()) for match in occurrences]\n",
" # create the new tokens\n",
" last = 0\n",
" for j, (beg, end) in enumerate(indexes):\n",
" if beg > last:\n",
" new_annotation.append((word[last:beg], tag))\n",
" if tag != \"O\":\n",
" label = f'I-{tag.split(\"-\")[1]}'\n",
" else:\n",
" label = \"O\"\n",
" if end < len(word) or (i < len(annotation) - 1 and annotation[i+1][1] == label):\n",
" new_annotation.append((word[beg:end], label))\n",
" else:\n",
" new_annotation.append((word[beg:end], 'O'))\n",
" last = end\n",
" if last < len(word):\n",
" new_annotation.append((word[last:], label))\n",
" else:\n",
" new_annotation.append((word, tag))\n",
" new_true_annotations.append(new_annotation)\n",
"len(new_true_annotations)"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "K0LaWT56WJJ2",
"outputId": "5d996a00-56dc-421c-d81f-17ad3549330e"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"1307"
]
},
"metadata": {},
"execution_count": 34
}
],
"source": [
"true_annotations = []\n",
"for sent in new_true_annotations:\n",
" dicc_sent = {\"tokens\":[], \"ner_tags\":[]}\n",
" for word, tag in sent:\n",
" dicc_sent[\"tokens\"].append(word)\n",
" dicc_sent[\"ner_tags\"].append(sel_ent[tag])\n",
" true_annotations.append(dicc_sent)\n",
"len(true_annotations)"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"id": "FQgSF-gaWJJ2"
},
"outputs": [],
"source": [
"true_df = pd.DataFrame(true_annotations)\n",
"true_ann_dataset = Dataset.from_pandas(true_df)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 49,
"referenced_widgets": [
"cabdca2ad56e43eaa506e4588087c3f2",
"116d6d8de1af401a971f3da77cb4b916",
"5644e8831133414dbb54e899f1253e8b",
"75cff91a18654513bc53045df04832f6",
"883ee6d5131443eba2c4598c9fa0223e",
"5454af7e0b964f388ecab1f83f74ecc9",
"9f62543c61b04183b7784826e9178321",
"dd31f0ed6eee4b6a97d4c9ee6addabe3",
"9f072c7c1f7646ef876b49917e1eccff",
"76f09404ea3d447782bb09cd27e9a723",
"f2356694803b4c678de2ca0a11cb11e2"
]
},
"id": "5aO9u8ceWJJ2",
"outputId": "6f999f1c-db84-4839-e645-aa81650f4168"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Map: 0%| | 0/1307 [00:00<?, ? examples/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "cabdca2ad56e43eaa506e4588087c3f2"
}
},
"metadata": {}
}
],
"source": [
"true_ann_dataset = true_ann_dataset.map(tokenize_and_align_labels, batched=True)"
]
},
{
"cell_type": "code",
"source": [
"true_ann_dataset['ner_tags'][0]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "D2eYI1XdpirH",
"outputId": "a65ef39b-f749-4ece-86e9-2ba03f39e4fe"
},
"execution_count": 37,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[0, 0, 0, 1, 15, 3, 4, 4, 4, 4, 4, 4, 0, 0, 13, 14, 14, 0]"
]
},
"metadata": {},
"execution_count": 37
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "VMMWntNGWJJ2"
},
"source": [
"**Evaluating prompt 1**"
]
},
{
"cell_type": "code",
"execution_count": 121,
"metadata": {
"id": "bTLXGyNwWJJ2"
},
"outputs": [],
"source": [
"new_p1_annotations = []\n",
"for sent in generated_sentences_p1:\n",
" annotation = []\n",
" for line in sent.split('\\n')[2:]:\n",
" if line != '':\n",
" splited_line = line.split()\n",
" if len(splited_line) > 2:\n",
" splited_line = [' '.join(splited_line[:-1]), splited_line[-1]]\n",
" if len(splited_line) != 2:\n",
" continue\n",
" word, tag = splited_line\n",
" annotation.append((word, tag))\n",
" new_annotation = []\n",
" ps = r'(\\.|\\,|\\:|\\;|\\!|\\?|\\-|\\(|\\)|\\[|\\]|\\{|\\}|\\\")'\n",
" for i,(word, tag) in enumerate(annotation):\n",
" if tag not in sel_ent:\n",
" tag = \"O\"\n",
" if re.search(ps, word):\n",
" # find the ocurrences of the punctuation signs\n",
" occurrences = re.finditer(ps, word)\n",
" indexes = [(match.start(), match.end()) for match in occurrences]\n",
" # create the new tokens\n",
" last = 0\n",
" for j, (beg, end) in enumerate(indexes):\n",
" if beg > last:\n",
" new_annotation.append((word[last:beg], tag))\n",
" if tag != \"O\":\n",
" if not tag.startswith('I') and not tag.startswith('B'):\n",
" label = \"O\"\n",
" else:\n",
" label = f'I-{tag.split(\"-\")[1]}'\n",
" else:\n",
" label = \"O\"\n",
" if end < len(word) or (i < len(annotation) - 1 and annotation[i+1][1] == label):\n",
" new_annotation.append((word[beg:end], label))\n",
" else:\n",
" new_annotation.append((word[beg:end], 'O'))\n",
" last = end\n",
" if last < len(word):\n",
" new_annotation.append((word[last:], label))\n",
" else:\n",
" new_annotation.append((word, tag))\n",
" new_p1_annotations.append(new_annotation)\n",
"len(new_p1_annotations)"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "nICoEVoIWJJ3",
"outputId": "7d65b295-6d8a-4cc1-b751-384433a1c7ea"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"50"
]
},
"metadata": {},
"execution_count": 73
}
],
"source": [
"p1_annotations = []\n",
"for sent in new_p1_annotations:\n",
" dicc_sent = {\"tokens\":[], \"ner_tags\":[]}\n",
" for word, tag in sent:\n",
" dicc_sent[\"tokens\"].append(word)\n",
" dicc_sent[\"ner_tags\"].append(sel_ent[tag])\n",
" p1_annotations.append(dicc_sent)\n",
"len(p1_annotations)"
]
},
{
"cell_type": "code",
"source": [
"p1_annotations"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "rp1aH-fztMQn",
"outputId": "fbb92320-c587-438d-feb1-17b85d78cd42"
},
"execution_count": 74,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[{'tokens': ['self',\n",
" '-',\n",
" 'reported',\n",
" 'healthy',\n",
" 'adults',\n",
" 'between',\n",
" 'the',\n",
" 'ages',\n",
" 'of',\n",
" '18',\n",
" '-',\n",
" '60',\n",
" 'who',\n",
" 'are',\n",
" 'fluent',\n",
" 'in',\n",
" 'English',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Treatment',\n",
" 'with',\n",
" 'any',\n",
" 'investigational',\n",
" 'drug',\n",
" 'within',\n",
" '30',\n",
" 'days',\n",
" 'of',\n",
" 'entry',\n",
" 'to',\n",
" 'this',\n",
" 'protocol'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Current', 'treatment', 'with', 'Telbivudine'],\n",
" 'ner_tags': [0, 0, 0, 5]},\n",
" {'tokens': ['Severe',\n",
" 'hepatitis',\n",
" 'activity',\n",
" 'as',\n",
" 'documented',\n",
" 'by',\n",
" 'ALT>10 x ULN'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['History',\n",
" 'of',\n",
" 'decompensated',\n",
" 'cirrhosis',\n",
" '(',\n",
" 'defined',\n",
" 'as',\n",
" 'jaundice',\n",
" 'in',\n",
" 'the presence',\n",
" 'of',\n",
" 'cirrhosis',\n",
" ',',\n",
" 'ascites',\n",
" ',',\n",
" 'bleeding',\n",
" 'gastric',\n",
" 'or',\n",
" 'esophageal',\n",
" 'varices',\n",
" 'or',\n",
" 'encephalopathy',\n",
" ')'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 1,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Pre',\n",
" '-',\n",
" ' existent',\n",
" 'neutropenia',\n",
" '(',\n",
" 'neutrophils',\n",
" '< 1',\n",
" ',',\n",
" ' 500 / mm3',\n",
" ')',\n",
" 'or',\n",
" 'thrombocytopenia',\n",
" '(',\n",
" 'platelets',\n",
" '< 90',\n",
" ',',\n",
" ' 000 / mm3',\n",
" ')'],\n",
" 'ner_tags': [0, 0, 0, 1, 0, 2, 4, 4, 4, 0, 0, 1, 0, 2, 4, 4, 4, 0]},\n",
" {'tokens': ['Co ',\n",
" '-',\n",
" ' infection',\n",
" 'with',\n",
" 'hepatitis C virus',\n",
" ',',\n",
" 'hepatitis D virus',\n",
" 'or',\n",
" 'human immunodeficiency virus',\n",
" '(',\n",
" ' HIV ',\n",
" ')'],\n",
" 'ner_tags': [5, 6, 6, 0, 6, 0, 6, 0, 6, 6, 6, 0]},\n",
" {'tokens': ['Other',\n",
" 'acquired',\n",
" 'or',\n",
" 'inherited',\n",
" 'causes',\n",
" 'of',\n",
" 'liver',\n",
" 'disease',\n",
" ':',\n",
" 'alcoholic',\n",
" 'liver',\n",
" 'disease',\n",
" ',',\n",
" 'obesity',\n",
" 'induced',\n",
" 'liver',\n",
" 'disease',\n",
" ',',\n",
" 'drug',\n",
" 'related',\n",
" 'liver',\n",
" 'disease',\n",
" ',',\n",
" 'auto ',\n",
" '-',\n",
" ' immune',\n",
" 'hepatitis',\n",
" ',',\n",
" 'hemochromatosis',\n",
" ',',\n",
" \"Wilson's\",\n",
" 'disease',\n",
" 'or',\n",
" 'alpha ',\n",
" '-',\n",
" ' 1',\n",
" 'antitrypsin',\n",
" 'deficiency'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Alpha fetoprotein', '>', '50', 'ng / ml'],\n",
" 'ner_tags': [3, 4, 4, 4]},\n",
" {'tokens': ['Hyper ',\n",
" '-',\n",
" ' or hypothyroidism',\n",
" '(',\n",
" ' subjects requiring medication to maintain TSH levels in the normal range are eligible if all other inclusion / exclusion criteria are met ',\n",
" ')'],\n",
" 'ner_tags': [1, 2, 2, 0, 0, 0]},\n",
" {'tokens': ['Immune',\n",
" 'suppressive',\n",
" 'treatment',\n",
" 'within',\n",
" 'the',\n",
" 'previous',\n",
" 'B',\n",
" '-',\n",
" '6 months I',\n",
" '-',\n",
" '6',\n",
" 'months'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Contra',\n",
" '-',\n",
" 'indications',\n",
" 'for',\n",
" 'alfa',\n",
" '-',\n",
" 'interferon',\n",
" 'therapy',\n",
" 'like',\n",
" 'suspected',\n",
" 'hypersensitivity',\n",
" 'to',\n",
" 'interferon',\n",
" 'or',\n",
" 'Peginterferon',\n",
" 'or',\n",
" 'any',\n",
" 'known',\n",
" 'pre ',\n",
" '-',\n",
" ' existing',\n",
" 'medical',\n",
" 'condition',\n",
" 'that',\n",
" 'could',\n",
" 'interfere',\n",
" 'with',\n",
" 'the',\n",
" \"patient's\",\n",
" 'participation',\n",
" 'in',\n",
" 'and',\n",
" 'completion',\n",
" 'of',\n",
" 'the',\n",
" 'study',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Pregnancy', ',', ' breast ', '-', ' feeding', 'considerations'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0]},\n",
" {'tokens': [], 'ner_tags': []},\n",
" {'tokens': ['Any',\n",
" 'medical',\n",
" 'condition',\n",
" 'requiring',\n",
" ',',\n",
" 'or',\n",
" 'likely',\n",
" 'to',\n",
" 'require',\n",
" 'chronic',\n",
" 'systemic',\n",
" 'administration',\n",
" 'of',\n",
" 'steroids',\n",
" ',',\n",
" 'during',\n",
" 'the',\n",
" 'course',\n",
" 'of',\n",
" 'the',\n",
" 'study'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Substance',\n",
" 'abuse',\n",
" ',',\n",
" 'such as',\n",
" 'alcohol',\n",
" '(',\n",
" ' > 80 g / day ',\n",
" ')',\n",
" ',',\n",
" 'I',\n",
" '.',\n",
" ' V',\n",
" '.',\n",
" 'drugs',\n",
" 'and',\n",
" 'inhaled',\n",
" 'drugs',\n",
" 'in the past 2 years',\n",
" '.'],\n",
" 'ner_tags': [5, 6, 0, 0, 5, 6, 6, 0, 0, 5, 6, 5, 6, 6, 0, 5, 6, 6, 0]},\n",
" {'tokens': ['Any',\n",
" 'other',\n",
" 'condition',\n",
" 'which',\n",
" 'in',\n",
" 'the',\n",
" 'opinion',\n",
" 'of',\n",
" 'the',\n",
" 'investigator',\n",
" 'would',\n",
" 'make',\n",
" 'the',\n",
" 'patient',\n",
" 'unsuitable',\n",
" 'for',\n",
" 'enrollment',\n",
" ',',\n",
" 'or',\n",
" 'could',\n",
" 'interfere',\n",
" 'with',\n",
" 'the',\n",
" 'patient',\n",
" 'participating',\n",
" 'in',\n",
" 'and',\n",
" 'completing',\n",
" 'the',\n",
" 'study'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Patients', 'undergoing', 'urologic', 'surgery'],\n",
" 'ner_tags': [0, 0, 7, 8]},\n",
" {'tokens': ['Pregnancy',\n",
" ',',\n",
" 'coagulopathy',\n",
" ',',\n",
" 'allergy to bupivacaine',\n",
" ',',\n",
" 'renal failure',\n",
" ',',\n",
" 'hepatic insufficiency',\n",
" ',',\n",
" 'and/or',\n",
" 'inappropriate candidate for usual therapy',\n",
" '(',\n",
" 'specifically',\n",
" ',',\n",
" 'if unable to receive the usual preoperative interscalene nerve block',\n",
" ':',\n",
" 'preexisting nerve injury on side of surgery',\n",
" ',',\n",
" 'refusal of nerve block',\n",
" ',',\n",
" 'infection at site of nerve block',\n",
" ')',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Pregnant women',\n",
" 'with',\n",
" 'APS',\n",
" 'diagnosed',\n",
" 'according to',\n",
" 'the revised',\n",
" 'classification',\n",
" 'criteria',\n",
" 'for',\n",
" 'APS',\n",
" 'in',\n",
" 'Sydney',\n",
" ',',\n",
" 'Australia'],\n",
" 'ner_tags': [0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 2, 2]},\n",
" {'tokens': ['Early',\n",
" 'pregnancy',\n",
" 'body',\n",
" 'weight',\n",
" 'is',\n",
" '50 ',\n",
" '-',\n",
" ' 90 Kg'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['On',\n",
" 'chronic',\n",
" 'treatment',\n",
" '(',\n",
" 'i',\n",
" '.',\n",
" ' e',\n",
" '.',\n",
" ',',\n",
" 'two weeks',\n",
" 'or',\n",
" 'more',\n",
" ')',\n",
" 'with',\n",
" 'any',\n",
" 'medication',\n",
" 'severely',\n",
" 'affecting',\n",
" 'oral',\n",
" 'status',\n",
" '(',\n",
" 'e',\n",
" '.',\n",
" ' g',\n",
" '.',\n",
" 'participants',\n",
" 'with',\n",
" 'gingival',\n",
" 'hypertrophy',\n",
" 'caused',\n",
" 'by',\n",
" 'anti ',\n",
" '-',\n",
" ' epileptics',\n",
" ',',\n",
" 'calcium',\n",
" 'antagonists',\n",
" ',',\n",
" 'cyclosporine',\n",
" 'and',\n",
" 'other',\n",
" 'immunosuppressive',\n",
" ')',\n",
" 'or',\n",
" 'bone',\n",
" 'metabolism',\n",
" '(',\n",
" 'e',\n",
" '.',\n",
" ' g',\n",
" '.',\n",
" 'anticoagulant',\n",
" 'medications',\n",
" ',',\n",
" 'long ',\n",
" '-',\n",
" ' standing',\n",
" 'steroid',\n",
" 'medications',\n",
" '-',\n",
" ' i',\n",
" '.',\n",
" ' e',\n",
" '.',\n",
" 'equal',\n",
" 'or',\n",
" 'more',\n",
" '2',\n",
" '.',\n",
" ' 5',\n",
" 'mg',\n",
" 'of',\n",
" 'prednisolone',\n",
" 'a',\n",
" 'day',\n",
" 'taken',\n",
" 'for',\n",
" '> 3',\n",
" 'months',\n",
" '-',\n",
" ',',\n",
" 'anticonvulsants',\n",
" ',',\n",
" 'immunosuppressants',\n",
" ')'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Affected',\n",
" 'by',\n",
" 'systemic',\n",
" 'diseases',\n",
" 'recognized',\n",
" 'to',\n",
" 'severely',\n",
" 'affect',\n",
" 'bone',\n",
" 'metabolism',\n",
" '(',\n",
" 'e',\n",
" '.',\n",
" 'g',\n",
" '.',\n",
" \"Cushing's\",\n",
" 'syndrome',\n",
" ',',\n",
" \"Addison's\",\n",
" 'disease',\n",
" ',',\n",
" 'diabetes',\n",
" 'mellitus',\n",
" 'type 1',\n",
" ',',\n",
" 'leukaemia',\n",
" ',',\n",
" 'pernicious',\n",
" 'anaemia',\n",
" ',',\n",
" 'malabsorption',\n",
" 'syndromes',\n",
" ',',\n",
" 'chronic',\n",
" 'liver',\n",
" 'disease',\n",
" ',',\n",
" 'rheumatoid',\n",
" 'arthritis',\n",
" ')',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Knowingly', 'affected by', 'HIV', 'or', 'Hepatitis', '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['History',\n",
" 'of',\n",
" 'local',\n",
" 'radiation',\n",
" 'therapy',\n",
" 'in',\n",
" 'the',\n",
" 'last',\n",
" 'five',\n",
" 'years',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 5, 5, 6, 0, 11, 11, 11, 12, 0]},\n",
" {'tokens': ['Affected',\n",
" 'by',\n",
" 'limited',\n",
" 'mental',\n",
" 'capacity',\n",
" 'or',\n",
" 'language',\n",
" 'skills',\n",
" 'such that',\n",
" 'study',\n",
" 'information',\n",
" 'can not',\n",
" 'be',\n",
" 'understood',\n",
" ',',\n",
" 'informed',\n",
" 'consent',\n",
" 'can not',\n",
" 'be',\n",
" 'obtained',\n",
" ',',\n",
" 'or',\n",
" 'simple',\n",
" 'instructions',\n",
" 'can not',\n",
" 'be',\n",
" 'followed',\n",
" '.'],\n",
" 'ner_tags': [15,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Presenting',\n",
" 'an',\n",
" 'acute',\n",
" 'endodontic',\n",
" '/',\n",
" 'periodontal',\n",
" 'lesion',\n",
" 'in',\n",
" 'the',\n",
" 'neighboring',\n",
" 'areas',\n",
" 'to',\n",
" 'the',\n",
" 'implant',\n",
" 'site',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Completely', 'edentulous', 'patients'], 'ner_tags': [0, 0, 0]},\n",
" {'tokens': ['With',\n",
" 'evident',\n",
" 'severe',\n",
" 'atrophy',\n",
" 'of',\n",
" 'the',\n",
" 'alveolar',\n",
" 'ridge',\n",
" 'that',\n",
" 'could',\n",
" 'preclude',\n",
" 'an',\n",
" 'implant',\n",
" 'placement',\n",
" '(',\n",
" 'e',\n",
" '.',\n",
" 'g',\n",
" '.',\n",
" 'sharp',\n",
" 'knife',\n",
" 'edge',\n",
" 'ridge',\n",
" ')'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Severe', 'bruxism', 'or', 'clenching', 'habits'],\n",
" 'ner_tags': [0, 0, 0, 0, 0]},\n",
" {'tokens': ['Smokers', 'of', '>', '5', 'cigarettes', 'a day'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['A daily', 'alcohol', 'intake', '>', '2 units', '/ day', '.'],\n",
" 'ner_tags': [5, 5, 6, 10, 10, 10, 0]},\n",
" {'tokens': ['Other',\n",
" 'severe',\n",
" 'acute',\n",
" 'or',\n",
" 'chronic',\n",
" 'medical',\n",
" 'or',\n",
" 'psychiatric',\n",
" 'condition',\n",
" 'or',\n",
" 'laboratory',\n",
" 'abnormality',\n",
" 'which',\n",
" 'may',\n",
" 'increase',\n",
" 'the',\n",
" 'risk',\n",
" 'associated',\n",
" 'with',\n",
" 'trial',\n",
" 'participation',\n",
" 'or',\n",
" 'investigational',\n",
" 'product',\n",
" 'administration',\n",
" 'or',\n",
" 'may',\n",
" 'interfere',\n",
" 'with',\n",
" 'the',\n",
" 'interpretation',\n",
" 'of',\n",
" 'study',\n",
" 'results',\n",
" 'and',\n",
" ',',\n",
" 'in',\n",
" 'the',\n",
" 'judgment',\n",
" 'of',\n",
" 'the',\n",
" 'investigator',\n",
" ',',\n",
" 'would',\n",
" 'make',\n",
" 'the',\n",
" 'participant',\n",
" 'inappropriate',\n",
" 'for',\n",
" 'entry',\n",
" 'into',\n",
" 'this',\n",
" 'trial',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Patients',\n",
" 'unable',\n",
" 'or',\n",
" 'not willing',\n",
" 'to',\n",
" 'return',\n",
" 'for',\n",
" 'follow ',\n",
" '-',\n",
" ' ups',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Patient',\n",
" 'with',\n",
" '\"',\n",
" ' de novo ',\n",
" '\"',\n",
" 'heart',\n",
" 'Failure',\n",
" 'and',\n",
" 'LVEF',\n",
" '< =',\n",
" '40',\n",
" '%',\n",
" 'admitted',\n",
" 'in',\n",
" 'hospital',\n",
" ',',\n",
" 'without',\n",
" 'contraindications',\n",
" 'for',\n",
" 'BB',\n",
" 'prescription',\n",
" 'with',\n",
" 'cardiologist',\n",
" 'up ',\n",
" '-',\n",
" ' titration',\n",
" 'prescription',\n",
" 'and',\n",
" 'without',\n",
" 'having',\n",
" 'achieved',\n",
" 'BB',\n",
" 'target',\n",
" 'dose',\n",
" 'previous',\n",
" 'discharge',\n",
" 'and',\n",
" 'signing',\n",
" 'informed',\n",
" 'consent',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 1,\n",
" 2,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Blood culture',\n",
" '-',\n",
" 'proven',\n",
" 'typhoid fever',\n",
" '(',\n",
" 'S',\n",
" '.',\n",
" ' typhi',\n",
" 'or',\n",
" 'S',\n",
" '.',\n",
" ' paratyphi',\n",
" ')'],\n",
" 'ner_tags': [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Signed',\n",
" 'informed',\n",
" 'consent',\n",
" 'to',\n",
" 'participate',\n",
" 'in',\n",
" 'the',\n",
" 'study',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['uterine', 'size', '< 12 weeks'], 'ner_tags': [0, 0, 0]},\n",
" {'tokens': ['presence',\n",
" 'of',\n",
" 'benign',\n",
" 'cause',\n",
" 'for',\n",
" 'the',\n",
" 'hysterectomy',\n",
" 'e',\n",
" '.',\n",
" 'g',\n",
" '.',\n",
" 'fibroid',\n",
" 'uterus',\n",
" ',',\n",
" 'perimenopausal',\n",
" 'beeding',\n",
" 'not',\n",
" 'responding',\n",
" 'to',\n",
" 'medical',\n",
" 'treatment',\n",
" 'or',\n",
" 'complex',\n",
" 'endometrial',\n",
" 'hyperplasia',\n",
" 'without',\n",
" 'atypia',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Absence',\n",
" 'of',\n",
" 'significant',\n",
" 'scarring',\n",
" 'in',\n",
" 'the',\n",
" 'pelvis',\n",
" 'from',\n",
" 'previous',\n",
" 'surgeries',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Patients', '=', '18 years', 'of age', 'or', 'older'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Subjects',\n",
" 'must',\n",
" 'be',\n",
" 'able',\n",
" 'and',\n",
" 'willing',\n",
" 'to',\n",
" 'give',\n",
" 'written',\n",
" 'informed',\n",
" 'consent',\n",
" 'and',\n",
" 'to',\n",
" 'comply',\n",
" 'with',\n",
" 'the',\n",
" 'requirements',\n",
" 'of',\n",
" 'this',\n",
" 'study',\n",
" 'protocol'],\n",
" 'ner_tags': [15,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15,\n",
" 15]},\n",
" {'tokens': ['Established',\n",
" 'diagnosis',\n",
" 'of',\n",
" 'UC',\n",
" 'and',\n",
" 'moderate ',\n",
" '-',\n",
" ' to ',\n",
" '-',\n",
" ' severe',\n",
" 'disease',\n",
" 'activity',\n",
" ',',\n",
" 'defined',\n",
" 'as',\n",
" 'a',\n",
" 'Mayo',\n",
" 'score',\n",
" 'of',\n",
" '6 ',\n",
" '-',\n",
" ' 12',\n",
" ',',\n",
" 'with',\n",
" 'an',\n",
" 'endoscopic',\n",
" 'subscore',\n",
" '=',\n",
" '2',\n",
" '.'],\n",
" 'ner_tags': [1,\n",
" 0,\n",
" 0,\n",
" 2,\n",
" 0,\n",
" 1,\n",
" 2,\n",
" 1,\n",
" 2,\n",
" 2,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 9,\n",
" 9,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 9,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Patients',\n",
" 'had',\n",
" 'an',\n",
" 'inadequate',\n",
" 'response',\n",
" 'to',\n",
" ',',\n",
" 'or',\n",
" 'had',\n",
" 'failed',\n",
" 'to',\n",
" 'tolerate',\n",
" ',',\n",
" '1',\n",
" 'or',\n",
" 'more',\n",
" 'of',\n",
" 'the',\n",
" 'following',\n",
" 'conventional',\n",
" 'therapies',\n",
" ':',\n",
" 'oral',\n",
" '5 ',\n",
" '-',\n",
" ' aminosalicylates',\n",
" ',',\n",
" 'oral',\n",
" 'corticosteroids',\n",
" ',',\n",
" 'azathioprine ',\n",
" '(',\n",
" ' AZA ',\n",
" ')',\n",
" ',',\n",
" 'and/or',\n",
" '6 ',\n",
" '-',\n",
" ' mercaptopurine ',\n",
" '(',\n",
" ' 6MP ',\n",
" ')',\n",
" ';',\n",
" 'or',\n",
" 'corticosteroid dependent ',\n",
" '(',\n",
" ' ie',\n",
" ',',\n",
" ' an inability to taper corticosteroids without recurrence of UC symptoms ',\n",
" ')',\n",
" '.'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Patients',\n",
" 'concurrently',\n",
" 'treated',\n",
" 'with',\n",
" 'oral',\n",
" '5 ',\n",
" '-',\n",
" ' aminosalicylates',\n",
" 'or',\n",
" 'corticosteroids',\n",
" 'were',\n",
" 'to receive',\n",
" 'a stable',\n",
" 'dose',\n",
" 'for',\n",
" 'at',\n",
" 'least',\n",
" '2 weeks',\n",
" 'before',\n",
" 'baseline',\n",
" ',',\n",
" 'and',\n",
" 'patients',\n",
" 'receiving',\n",
" 'AZA',\n",
" 'and/or',\n",
" '6MP',\n",
" 'were',\n",
" 'to receive',\n",
" 'a stable',\n",
" 'dose',\n",
" 'for',\n",
" 'at',\n",
" 'least',\n",
" '4 weeks',\n",
" 'before',\n",
" 'baseline',\n",
" '.',\n",
" 'Patients',\n",
" 'were',\n",
" 'required',\n",
" 'to maintain',\n",
" 'stable',\n",
" 'doses',\n",
" 'of',\n",
" 'their',\n",
" 'concomitant',\n",
" 'UC',\n",
" 'medications',\n",
" 'during',\n",
" 'the',\n",
" 'study'],\n",
" 'ner_tags': [0,\n",
" 5,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Female',\n",
" 'subjects',\n",
" 'of',\n",
" 'child',\n",
" 'bearing',\n",
" 'potential',\n",
" 'must',\n",
" 'be',\n",
" 'willing',\n",
" 'to',\n",
" 'ensure',\n",
" 'that',\n",
" 'they',\n",
" 'or',\n",
" 'their',\n",
" 'partner',\n",
" 'use',\n",
" 'effective',\n",
" 'contraception',\n",
" 'during',\n",
" 'the',\n",
" 'study',\n",
" 'and',\n",
" 'for',\n",
" 'OR',\n",
" 'be',\n",
" 'surgically',\n",
" 'sterile',\n",
" 'or',\n",
" 'postmenopausal',\n",
" '.'],\n",
" 'ner_tags': [15,\n",
" 0,\n",
" 0,\n",
" 1,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Surgical',\n",
" 'sterilized',\n",
" 'female',\n",
" 'patients',\n",
" 'with',\n",
" 'documentation',\n",
" 'of',\n",
" 'prior',\n",
" 'hysterectomy',\n",
" ',',\n",
" 'tubal',\n",
" 'ligation',\n",
" 'or',\n",
" 'patients',\n",
" 'with',\n",
" 'a',\n",
" 'history',\n",
" 'of',\n",
" 'bilateral',\n",
" 'oophorectomy',\n",
" 'AND',\n",
" 'patients',\n",
" 'with',\n",
" 'a',\n",
" 'history',\n",
" 'of',\n",
" 'bilateral',\n",
" 'oophorectomy',\n",
" 'AND',\n",
" 'hysterectomy'],\n",
" 'ner_tags': [0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0,\n",
" 0]},\n",
" {'tokens': ['Postmenopausal',\n",
" 'women',\n",
" 'with',\n",
" 'postmenopausal',\n",
" 'defined',\n",
" 'as',\n",
" 'permanent',\n",
" 'cessation',\n",
" '>',\n",
" '1',\n",
" 'year',\n",
" 'of',\n",
" 'previously',\n",
" 'occurring',\n",
" 'menses',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]},\n",
" {'tokens': ['Female subjects',\n",
" 'serum pregnancy test performed at the screening visit and',\n",
" 'urine pregnancy test performed at the baseline visit must be negative',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0]},\n",
" {'tokens': ['Subjects',\n",
" 'have',\n",
" 'following',\n",
" 'investigations',\n",
" 'within',\n",
" '1 month',\n",
" 'prior',\n",
" 'to',\n",
" 'enrolment',\n",
" '.'],\n",
" 'ner_tags': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}]"
]
},
"metadata": {},
"execution_count": 74
}
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {
"id": "Sro66gmXWJJ3"
},
"outputs": [],
"source": [
"p1_df = pd.DataFrame(p1_annotations)\n",
"p1_dataset = Dataset.from_pandas(p1_df)"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 49,
"referenced_widgets": [
"c070b80f8b404d7aa1945ce74f04e669",
"efd95411b98444c39eacc1b3ba12cf9e",
"f3b4b928a53444cf9133d950c79be90a",
"8ce9a6d482554cff8218b795a2b7afe5",
"4410cb65ce684026bac9d6bce8204641",
"bbff96b8aab24b1dacce61988d890bde",
"9b46df12fda94d0193f51b1517316468",
"2a1d2c6b26384a14903f1a186de1f32f",
"0458e8b753dd4412bda534234c52e48f",
"0ed9463a4fc74d1daf25e7273d2025da",
"6f26495add4a4869abf3b830919feeb0"
]
},
"id": "y4qfjZXFWJJ3",
"outputId": "dc334ebb-bd42-4f48-dd12-852a9d7b801d"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Map: 0%| | 0/50 [00:00<?, ? examples/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "c070b80f8b404d7aa1945ce74f04e669"
}
},
"metadata": {}
}
],
"source": [
"p1_dataset = p1_dataset.map(tokenize_and_align_labels, batched=True)"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {
"id": "UYmC5TRGWJJ3"
},
"outputs": [],
"source": [
"# keep just sentences with the same length\n",
"sentences_to_evaluate_p1 = []\n",
"sentences_to_evaluate_true = []\n",
"\n",
"for i in range(len(p1_dataset)):\n",
" if len(p1_dataset['labels'][i]) == len(true_ann_dataset['labels'][i]):\n",
" sentences_to_evaluate_p1.append(p1_dataset['labels'][i])\n",
" sentences_to_evaluate_true.append(true_ann_dataset['labels'][i])"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "4iluystIWJJ3",
"outputId": "0d3c4a3a-c7da-4912-9975-3056a4d7f2cb"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"0.72\n"
]
}
],
"source": [
"print(len(sentences_to_evaluate_p1)/len(p1_dataset))"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"id": "QoWw7lVoWJJ3"
},
"outputs": [],
"source": [
"def get_labels(p):\n",
" predictions, labels = p\n",
" # Remove ignored index (special tokens)\n",
" predictions = [\n",
" [entities_list[p] for (p, l) in zip(prediction, label) if l != -100]\n",
" for prediction, label in zip(predictions, labels)\n",
" ]\n",
" labels = [\n",
" [entities_list[l] for (p, l) in zip(prediction, label) if l != -100]\n",
" for prediction, label in zip(predictions, labels)\n",
" ]\n",
"\n",
" return predictions, labels"
]
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {
"id": "yUE1LpxfWJJ3"
},
"outputs": [],
"source": [
"pred_labels, true_labels = get_labels((sentences_to_evaluate_p1, sentences_to_evaluate_true))"
]
},
{
"cell_type": "code",
"execution_count": 83,
"metadata": {
"id": "vZhKtEs0WJJ3"
},
"outputs": [],
"source": [
"from eval_file import *"
]
},
{
"cell_type": "code",
"source": [
"# from eval_file import *\n",
"\n",
"import argparse\n",
"from collections import defaultdict\n",
"from itertools import chain\n",
"from math import pow\n",
"from pathlib import Path\n",
"\n",
"# from common_utils.common_io import load_bio_file_into_sents\n",
"# from common_utils.common_log import create_logger\n",
"# -*- coding: utf-8 -*-\n",
"\n",
"# -*- coding: utf-8 -*-\n",
"\n",
"import json\n",
"import pickle as pkl\n",
"\n",
"\n",
"def read_from_file(ifn):\n",
" with open(ifn, \"r\") as f:\n",
" text = f.read()\n",
" return text\n",
"\n",
"\n",
"def write_to_file(text, ofn):\n",
" with open(ofn, \"w\") as f:\n",
" f.write(text)\n",
" return True\n",
"\n",
"\n",
"def pkl_load(ifn):\n",
" with open(ifn, \"rb\") as f:\n",
" pdata = pkl.load(f)\n",
" return pdata\n",
"\n",
"\n",
"def pkl_dump(pdata, ofn):\n",
" with open(ofn, \"wb\") as f:\n",
" pkl.dump(pdata, f)\n",
" return True\n",
"\n",
"\n",
"def json_load(ifn):\n",
" with open(ifn, \"r\") as f:\n",
" jdata = json.load(f)\n",
" return jdata\n",
"\n",
"\n",
"def json_dump(jdata, ofn):\n",
" with open(ofn, \"w\") as f:\n",
" json.dump(jdata, f)\n",
" return True\n",
"\n",
"\n",
"def load_bio_file_into_sents(bio_file, word_sep=\" \", do_lower=False):\n",
" bio_text = read_from_file(bio_file)\n",
" bio_text = bio_text.strip()\n",
" if do_lower:\n",
" bio_text = bio_text.lower()\n",
"\n",
" new_sents = []\n",
" sents = bio_text.split(\"\\n\\n\")\n",
"\n",
" for sent in sents:\n",
" new_sent = []\n",
" words = sent.split(\"\\n\")\n",
" for word in words:\n",
" new_word = word.split(word_sep)\n",
" new_sent.append(new_word)\n",
" new_sents.append(new_sent)\n",
"\n",
" return new_sents\n",
"\n",
"\n",
"def output_bio(bio_data, output_file, sep=\" \"):\n",
" with open(output_file, \"w\") as f:\n",
" for sent in bio_data:\n",
" for word in sent:\n",
" line = sep.join(word)\n",
" f.write(line)\n",
" f.write(\"\\n\")\n",
" f.write(\"\\n\")\n",
"\n",
"\n",
"class PRF:\n",
" def __init__(self):\n",
" self.true = 0\n",
" self.false = 0\n",
"\n",
" def add_true_case(self):\n",
" self.true += 1\n",
"\n",
" def add_false_case(self):\n",
" self.false += 1\n",
"\n",
" def get_true_false_counts(self):\n",
" return self.true, self.false\n",
"\n",
" def __str__(self):\n",
" return str(self.__dict__)\n",
"\n",
"\n",
"class BioEval:\n",
" def __init__(self):\n",
" self.acc = PRF()\n",
" # prediction\n",
" self.all_strict = PRF()\n",
" self.all_relax = PRF()\n",
" self.cat_strict = defaultdict(PRF)\n",
" self.cat_relax = defaultdict(PRF)\n",
" # gold standard\n",
" self.gs_all = 0\n",
" self.gs_cat = defaultdict(int)\n",
" self.performance = dict()\n",
" self.counts = dict()\n",
" self.beta = 1\n",
" self.label_not_for_eval = {'o'}\n",
"\n",
" def reset(self):\n",
" self.acc = PRF()\n",
" self.all_strict = PRF()\n",
" self.all_relax = PRF()\n",
" self.cat_strict = defaultdict(PRF)\n",
" self.cat_relax = defaultdict(PRF)\n",
" self.gs_all = 0\n",
" self.gs_cat = defaultdict(int)\n",
" self.performance = dict()\n",
" self.counts = dict()\n",
"\n",
" def set_beta_for_f_score(self, beta):\n",
" print(\"Using beta={} for calculating F-score\".format(beta))\n",
" self.beta = beta\n",
"\n",
" # def set_logger(self, logger):\n",
" # self.logger = logger\n",
"\n",
" def add_labels_not_for_eval(self, *labels):\n",
" for each in labels:\n",
" self.label_not_for_eval.add(each.lower())\n",
"\n",
" def __calc_prf(self, tp, fp, tp_tn):\n",
" \"\"\"\n",
" Using this function to calculate F-beta score, beta=1 is f_score-score, set beta=2 favor recall, and set beta=0.5 favor precision.\n",
" Using set_beta_for_f_score function to change beta value.\n",
" \"\"\"\n",
" tp_fp = tp + fp\n",
" pre = 1.0 * tp / tp_fp if tp_fp > 0 else 0.0\n",
" rec = 1.0 * tp / tp_tn if tp_tn > 0 else 0.0\n",
" beta2 = pow(self.beta, 2)\n",
" f_beta = (1 + beta2) * pre * rec / (beta2 * pre + rec) if (pre + rec) > 0 else 0.0\n",
" return pre, rec, f_beta\n",
"\n",
" def __measure_performance(self):\n",
" self.performance['overall'] = dict()\n",
"\n",
" acc_true_num, acc_false_num = self.acc.get_true_false_counts()\n",
" total_acc_num = acc_true_num + acc_false_num\n",
" # calc acc\n",
" overall_acc = round(1.0 * acc_true_num / total_acc_num, 4) if total_acc_num > 0 else 0.0\n",
" self.performance['overall']['acc'] = overall_acc\n",
"\n",
" strict_true_counts, strict_false_counts = self.all_strict.get_true_false_counts()\n",
" strict_pre, strict_rec, strict_f_score = self.__calc_prf(strict_true_counts, strict_false_counts, self.gs_all)\n",
" self.performance['overall']['strict'] = dict()\n",
" self.performance['overall']['strict']['precision'] = strict_pre\n",
" self.performance['overall']['strict']['recall'] = strict_rec\n",
" self.performance['overall']['strict']['f_score'] = strict_f_score\n",
"\n",
" relax_true_counts, relax_false_counts = self.all_relax.get_true_false_counts()\n",
" relax_pre, relax_rec, relax_f_score = self.__calc_prf(relax_true_counts, relax_false_counts, self.gs_all)\n",
" self.performance['overall']['relax'] = dict()\n",
" self.performance['overall']['relax']['precision'] = relax_pre\n",
" self.performance['overall']['relax']['recall'] = relax_rec\n",
" self.performance['overall']['relax']['f_score'] = relax_f_score\n",
"\n",
" self.performance['category'] = dict()\n",
" self.performance['category']['strict'] = dict()\n",
" for k, v in self.cat_strict.items():\n",
" self.performance['category']['strict'][k] = dict()\n",
" stc, sfc = v.get_true_false_counts()\n",
" p, r, f = self.__calc_prf(stc, sfc, self.gs_cat[k])\n",
" self.performance['category']['strict'][k]['precision'] = p\n",
" self.performance['category']['strict'][k]['recall'] = r\n",
" self.performance['category']['strict'][k]['f_score'] = f\n",
"\n",
" self.performance['category']['relax'] = dict()\n",
" for k, v in self.cat_relax.items():\n",
" self.performance['category']['relax'][k] = dict()\n",
" rtc, rfc = v.get_true_false_counts()\n",
" p, r, f = self.__calc_prf(rtc, rfc, self.gs_cat[k])\n",
" self.performance['category']['relax'][k]['precision'] = p\n",
" self.performance['category']['relax'][k]['recall'] = r\n",
" self.performance['category']['relax'][k]['f_score'] = f\n",
"\n",
" def __measure_counts(self):\n",
" # gold standard\n",
" self.counts['expect'] = dict()\n",
" self.counts['expect']['overall'] = self.gs_all\n",
" for k, v in self.gs_cat.items():\n",
" self.counts['expect'][k] = v\n",
" # prediction\n",
" self.counts['prediction'] = {'strict': dict(), 'relax': dict()}\n",
" # strict\n",
" strict_true_counts, strict_false_counts = self.all_strict.get_true_false_counts()\n",
" self.counts['prediction']['strict']['overall'] = dict()\n",
" self.counts['prediction']['strict']['overall']['total'] = strict_true_counts + strict_false_counts\n",
" self.counts['prediction']['strict']['overall']['true'] = strict_true_counts\n",
" self.counts['prediction']['strict']['overall']['false'] = strict_false_counts\n",
" for k, v in self.cat_strict.items():\n",
" t, f = v.get_true_false_counts()\n",
" self.counts['prediction']['strict'][k] = dict()\n",
" self.counts['prediction']['strict'][k]['total'] = t + f\n",
" self.counts['prediction']['strict'][k]['true'] = t\n",
" self.counts['prediction']['strict'][k]['false'] = f\n",
" # relax\n",
" relax_true_counts, relax_false_counts = self.all_relax.get_true_false_counts()\n",
" self.counts['prediction']['relax']['overall'] = dict()\n",
" self.counts['prediction']['relax']['overall']['total'] = relax_true_counts + relax_false_counts\n",
" self.counts['prediction']['relax']['overall']['true'] = relax_true_counts\n",
" self.counts['prediction']['relax']['overall']['false'] = relax_false_counts\n",
" for k, v in self.cat_relax.items():\n",
" t, f = v.get_true_false_counts()\n",
" self.counts['prediction']['relax'][k] = dict()\n",
" self.counts['prediction']['relax'][k]['total'] = t + f\n",
" self.counts['prediction']['relax'][k]['true'] = t\n",
" self.counts['prediction']['relax'][k]['false'] = f\n",
"\n",
" @staticmethod\n",
" def __strict_match(gs, pred, s_idx, e_idx, en_type):\n",
" if e_idx < len(gs) and gs[e_idx] == f\"i-{en_type}\":\n",
" # check token after end in GS is not continued entity token\n",
" return False\n",
" elif gs[s_idx] != f\"b-{en_type}\" or pred[s_idx] != f\"b-{en_type}\":\n",
" # force first token to be B-\n",
" return False\n",
" # check every token in span is the same\n",
" for idx in range(s_idx, e_idx):\n",
" if gs[idx] != pred[idx]:\n",
" return False\n",
" return True\n",
"\n",
" @staticmethod\n",
" def __relax_match(gs, pred, s_idx, e_idx, en_type):\n",
" # we adopt the partial match strategy which is very loose compare to right-left or approximate match\n",
" for idx in range(s_idx, e_idx):\n",
" gs_cate = gs[idx].split(\"-\")[-1]\n",
" pred_bound, pred_cate = pred[idx].split(\"-\")\n",
" if gs_cate == pred_cate == en_type:\n",
" return True\n",
" return False\n",
"\n",
" @staticmethod\n",
" def __check_evaluated_already(gs_dict, cate, start_idx, end_idx):\n",
" for k, v in gs_dict.items():\n",
" c, s, e = k\n",
" if not (e < start_idx or s > end_idx) and c == cate:\n",
" if v == 0:\n",
" return True\n",
" else:\n",
" gs_dict[k] -= 1\n",
" return False\n",
" return False\n",
"\n",
" def __process_bio(self, gs_bio, pred_bio):\n",
" # measure acc\n",
" for w_idx, (gs_word, pred_word) in enumerate(zip(gs_bio, pred_bio)):\n",
" # measure acc\n",
" if gs_word == pred_word:\n",
" self.acc.add_true_case()\n",
" else:\n",
" self.acc.add_false_case()\n",
"\n",
" # process gold standard\n",
" llen = len(gs_bio)\n",
" gs_dict = defaultdict(int)\n",
" cur_idx = 0\n",
" while cur_idx < llen:\n",
" if gs_bio[cur_idx].strip() in self.label_not_for_eval:\n",
" cur_idx += 1\n",
" else:\n",
" start_idx = cur_idx\n",
" end_idx = start_idx + 1\n",
" _, cate = gs_bio[start_idx].strip().split('-')\n",
" while end_idx < llen and gs_bio[end_idx].strip() == f\"i-{cate}\":\n",
" end_idx += 1\n",
" self.gs_all += 1\n",
" self.gs_cat[cate] += 1\n",
" gs_dict[(cate, start_idx, end_idx)] += 1\n",
" cur_idx = end_idx\n",
" # process predictions\n",
" cur_idx = 0\n",
" while cur_idx < llen:\n",
" if pred_bio[cur_idx].strip() in self.label_not_for_eval:\n",
" cur_idx += 1\n",
" else:\n",
" start_idx = cur_idx\n",
" end_idx = start_idx + 1\n",
" _, cate = pred_bio[start_idx].strip().split(\"-\")\n",
" while end_idx < llen and pred_bio[end_idx].strip() == f\"i-{cate}\":\n",
" end_idx += 1\n",
" if self.__strict_match(gs_bio, pred_bio, start_idx, end_idx, cate):\n",
" self.all_strict.add_true_case()\n",
" self.cat_strict[cate].add_true_case()\n",
" self.all_relax.add_true_case()\n",
" self.cat_relax[cate].add_true_case()\n",
" elif self.__relax_match(gs_bio, pred_bio, start_idx, end_idx, cate):\n",
" if self.__check_evaluated_already(gs_dict, cate, start_idx, end_idx):\n",
" cur_idx = end_idx\n",
" continue\n",
" self.all_strict.add_false_case()\n",
" self.cat_strict[cate].add_false_case()\n",
" self.all_relax.add_true_case()\n",
" self.cat_relax[cate].add_true_case()\n",
" else:\n",
" self.all_strict.add_false_case()\n",
" self.cat_strict[cate].add_false_case()\n",
" self.all_relax.add_false_case()\n",
" self.cat_relax[cate].add_false_case()\n",
" cur_idx = end_idx\n",
"\n",
" def eval_file(self, gs_file, pred_file):\n",
" print(\"processing gold standard file: {} and prediciton file: {}\".format(gs_file, pred_file))\n",
" pred_bio_sents = load_bio_file_into_sents(pred_file, do_lower=True)\n",
" gs_bio_sents = load_bio_file_into_sents(gs_file, do_lower=True)\n",
" # process bio data\n",
" # check two data have same amount of sents\n",
" assert len(gs_bio_sents) == len(pred_bio_sents), \\\n",
" \"gold standard and prediction have different dimension: gs: {}; pred: {}\".format(len(gs_bio_sents), len(pred_bio_sents))\n",
" # measure performance\n",
" for s_idx, (gs_sent, pred_sent) in enumerate(zip(gs_bio_sents, pred_bio_sents)):\n",
" # check two sents have same No. of words\n",
" assert len(gs_sent) == len(pred_sent), \\\n",
" \"In {}th sentence, the words counts are different; gs: {}; pred: {}\".format(s_idx, gs_sent, pred_sent)\n",
" gs_sent = list(map(lambda x: x[-1], gs_sent))\n",
" pred_sent = list(map(lambda x: x[-1], pred_sent))\n",
" self.__process_bio(gs_sent, pred_sent)\n",
" # get the evaluation matrix\n",
" self.__measure_performance()\n",
" self.__measure_counts()\n",
"\n",
" def eval_mem(self, gs, pred, do_flat=False):\n",
" # flat sents to sent; we assume input sequences only have 1 dimension (only labels)\n",
" if do_flat:\n",
" print('Sentences have been flatten to 1 dim.')\n",
" gs = list(chain(*gs))\n",
" pred = list(chain(*pred))\n",
" gs = list(map(lambda x: x.lower(), gs))\n",
" pred = list(map(lambda x: x.lower(), pred))\n",
" self.__process_bio(gs, pred)\n",
" else:\n",
" for sidx, (gs_s, pred_s) in enumerate(zip(gs, pred)):\n",
" gs_s = list(map(lambda x: x.lower(), gs_s))\n",
" pred_s = list(map(lambda x: x.lower(), pred_s))\n",
" self.__process_bio(gs_s, pred_s)\n",
"\n",
" self.__measure_performance()\n",
" self.__measure_counts()\n",
"\n",
" def evaluate_annotations(self, gs, pred, do_lower=False):\n",
" for gs_sent, pred_sent in zip(gs, pred):\n",
" if do_lower:\n",
" gs_sent = list(map(lambda x: x.lower(), gs_sent))\n",
" pred_sent = list(map(lambda x: x.lower(), pred_sent))\n",
" self.__process_bio(gs_sent, pred_sent)\n",
"\n",
" self.__measure_performance()\n",
" self.__measure_counts()\n",
"\n",
" def get_performance(self):\n",
" return self.performance\n",
"\n",
" def get_counts(self):\n",
" return self.counts\n",
"\n",
" def save_evaluation(self, file):\n",
" with open(file, \"w\") as f:\n",
" json.dump(self.performance, f)\n",
"\n",
" def show_evaluation(self, digits=4):\n",
" if len(self.performance) == 0:\n",
" raise RuntimeError('call eval_mem() first to get the performance attribute')\n",
"\n",
" cate = self.performance['category']['strict'].keys()\n",
"\n",
" headers = ['precision', 'recall', 'f1']\n",
" width = max(max([len(c) for c in cate]), len('overall'), digits)\n",
" head_fmt = '{:>{width}s} ' + ' {:>9}' * len(headers)\n",
"\n",
" report = head_fmt.format(u'', *headers, width=width)\n",
" report += '\\n\\nstrict\\n'\n",
"\n",
" row_fmt = '{:>{width}s} ' + ' {:>9.{digits}f}' * 3 + '\\n'\n",
" for c in cate:\n",
" precision = self.performance['category']['strict'][c]['precision']\n",
" recall = self.performance['category']['strict'][c]['recall']\n",
" f1 = self.performance['category']['strict'][c]['f_score']\n",
" report += row_fmt.format(c, *[precision, recall, f1], width=width, digits=digits)\n",
"\n",
" report += '\\nrelax\\n'\n",
"\n",
" for c in cate:\n",
" precision = self.performance['category']['relax'][c]['precision']\n",
" recall = self.performance['category']['relax'][c]['recall']\n",
" f1 = self.performance['category']['relax'][c]['f_score']\n",
" report += row_fmt.format(c, *[precision, recall, f1], width=width, digits=digits)\n",
"\n",
" report += '\\n\\noverall\\n'\n",
" report += 'acc: ' + str(self.performance['overall']['acc'])\n",
" report += '\\nstrict\\n'\n",
" report += row_fmt.format('', *[self.performance['overall']['strict']['precision'],\n",
" self.performance['overall']['strict']['recall'],\n",
" self.performance['overall']['strict']['f_score']], width=width, digits=digits)\n",
"\n",
" report += '\\nrelax\\n'\n",
" report += row_fmt.format('', *[self.performance['overall']['relax']['precision'],\n",
" self.performance['overall']['relax']['recall'],\n",
" self.performance['overall']['relax']['f_score']], width=width, digits=digits)\n",
" return report\n"
],
"metadata": {
"id": "wuEpADrGuC8X"
},
"execution_count": 39,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {
"id": "z0TLBcj8WJJ3"
},
"outputs": [],
"source": [
"evaluator = BioEval()"
]
},
{
"cell_type": "code",
"execution_count": 119,
"metadata": {
"id": "ZQUMBCTGWJJ_"
},
"outputs": [],
"source": [
"evaluator.evaluate_annotations(true_labels[:50], pred_labels, do_lower=True)"
]
},
{
"cell_type": "code",
"execution_count": 106,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "BqGc_EEzWJJ_",
"outputId": "49d087c8-72db-4296-a3d6-a696c3585138"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'overall': {'acc': 0.5583,\n",
" 'strict': {'precision': 0.4392764857881137,\n",
" 'recall': 0.5862068965517241,\n",
" 'f_score': 0.5022156573116692},\n",
" 'relax': {'precision': 0.5736434108527132,\n",
" 'recall': 0.7655172413793103,\n",
" 'f_score': 0.6558345642540621}},\n",
" 'category': {'strict': {'condition': {'precision': 0.48424068767908307,\n",
" 'recall': 0.7041666666666667,\n",
" 'f_score': 0.5738539898132428},\n",
" 'drug': {'precision': 0.07142857142857142,\n",
" 'recall': 0.07692307692307693,\n",
" 'f_score': 0.07407407407407408},\n",
" 'value': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'temporal': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'person': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'measurement': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0}},\n",
" 'relax': {'condition': {'precision': 0.6160458452722063,\n",
" 'recall': 0.8958333333333334,\n",
" 'f_score': 0.7300509337860781},\n",
" 'drug': {'precision': 0.07142857142857142,\n",
" 'recall': 0.07692307692307693,\n",
" 'f_score': 0.07407407407407408},\n",
" 'value': {'precision': 1.0, 'recall': 0.3333333333333333, 'f_score': 0.5},\n",
" 'temporal': {'precision': 0.5,\n",
" 'recall': 0.14285714285714285,\n",
" 'f_score': 0.22222222222222224},\n",
" 'person': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'measurement': {'precision': 0.5,\n",
" 'recall': 0.2222222222222222,\n",
" 'f_score': 0.30769230769230765}}}}"
]
},
"metadata": {},
"execution_count": 106
}
],
"source": [
"evaluator.performance"
]
},
{
"cell_type": "code",
"execution_count": 120,
"metadata": {
"id": "O1hEM9uCWJJ_"
},
"outputs": [],
"source": [
"evaluator.save_evaluation('eval_p1.json')"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "GGtVORAWWJJ_"
},
"source": [
"**Evaluating prompt 2**"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {
"id": "XxOxk2dkWJJ_"
},
"outputs": [],
"source": [
"def parse_ann2bio(sentence, pattern, pattern1, pattern2):\n",
" # if sentence[-1] == \"\\n\":\n",
" # sentence = sentence[:-2] # remove the \\n and a final point wrongly added\n",
" # else:\n",
" # sentence = sentence[:-1] # remove the final point wrongly added\n",
"\n",
" # find the entities\n",
" occurrences = re.finditer(pattern, sentence)\n",
" indexes = [(match.start(), match.end()) for match in occurrences]\n",
"\n",
" annotation = []\n",
" i = 0\n",
"\n",
"\n",
" # create the bio list\n",
" for beg, end in indexes:\n",
" if beg > i:\n",
" annotation.extend([(word, \"O\") for word in sentence[i:beg].split()])\n",
" entity = sentence[beg:end]\n",
" entity_name = re.search(pattern1, entity).group(1)\n",
" entity = entity.replace(f'<{entity_name}>', \"\").replace(f'</{entity_name}>', \"\")\n",
" split_entity = entity.split()\n",
" annotation.append((split_entity[0], \"B-\" + entity_name))\n",
" annotation.extend([(word, \"I-\" + entity_name) for word in split_entity[1:]])\n",
" i = end\n",
" annotation.extend([(word, \"O\") for word in sentence[i:].split()])\n",
"\n",
" # check punctuation sign in tokens and put them as individual tokens\n",
" ps = r'(\\.|\\,|\\:|\\;|\\!|\\?|\\-|\\(|\\)|\\[|\\]|\\{|\\}|\\\")'\n",
" new_annotation = []\n",
" for i,(word, tag) in enumerate(annotation):\n",
" if re.search(ps, word):\n",
" # find the ocurrences of the punctuation signs\n",
" occurrences = re.finditer(ps, word)\n",
" indexes = [(match.start(), match.end()) for match in occurrences]\n",
" # create the new tokens\n",
" last = 0\n",
" for j, (beg, end) in enumerate(indexes):\n",
" if beg > last:\n",
" new_annotation.append((word[last:beg], tag))\n",
" if tag != \"O\":\n",
" label = f'I-{tag.split(\"-\")[1]}'\n",
" else:\n",
" label = \"O\"\n",
" if end < len(word) or (i < len(annotation) - 1 and annotation[i+1][1] == label):\n",
" new_annotation.append((word[beg:end], label))\n",
" else:\n",
" new_annotation.append((word[beg:end], 'O'))\n",
" last = end\n",
" if last < len(word):\n",
" new_annotation.append((word[last:], label))\n",
"\n",
" else:\n",
" new_annotation.append((word, tag))\n",
"\n",
"\n",
" return new_annotation"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"id": "Pe0s7piTWJKA"
},
"outputs": [],
"source": [
"pattern1 = r'<(Person|Condition|Value|Drug|Procedure|Measurement|Temporal|Observation|Device)>'\n",
"pattern2 = r'</(Person|Condition|Value|Drug|Procedure|Measurement|Temporal|Observation|Device)>'\n",
"pattern = f'{pattern1}.*?{pattern2}'"
]
},
{
"cell_type": "code",
"source": [
"generated_sentences_p2[2], dataset['test'][2]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "w99p-fMiMN1K",
"outputId": "1ef5368d-f251-48e3-ab93-a02f61d29127"
},
"execution_count": 59,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(' Current treatment with <Drug>Telbivudine</Drug>',\n",
" {'tokens': ['Current', 'treatment', 'with', 'Telbivudine'],\n",
" 'ner_tags': [0, 0, 0, 5],\n",
" 'file': 'NCT01373684_exc.bio.txt',\n",
" 'index': 1,\n",
" 'text': 'Current treatment with Telbivudine'})"
]
},
"metadata": {},
"execution_count": 59
}
]
},
{
"cell_type": "code",
"execution_count": 61,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "HjVitXo0WJKA",
"outputId": "0572b8f5-e724-49d1-abd5-3ee699c7876e"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"50"
]
},
"metadata": {},
"execution_count": 61
}
],
"source": [
"new_p2_annotations = []\n",
"for sent in generated_sentences_p2:\n",
" annotation = parse_ann2bio(sent, pattern, pattern1, pattern2)\n",
" new_p2_annotations.append(annotation)\n",
"len(new_p2_annotations)"
]
},
{
"cell_type": "code",
"source": [
"new_p2_annotations[0]"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "jTVKu9D8K_jI",
"outputId": "86cc58a6-ed81-45e0-fe2a-504ef58d4996"
},
"execution_count": 62,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[('self', 'O'),\n",
" ('-', 'O'),\n",
" ('reported', 'O'),\n",
" ('healthy', 'O'),\n",
" ('adults', 'O'),\n",
" ('between', 'O'),\n",
" ('the', 'O'),\n",
" ('ages', 'O'),\n",
" ('of', 'O'),\n",
" ('18', 'B-Measurement'),\n",
" ('-', 'I-Measurement'),\n",
" ('60', 'I-Measurement'),\n",
" ('who', 'O'),\n",
" ('are', 'O'),\n",
" ('fluent', 'O'),\n",
" ('in', 'O'),\n",
" ('<Language>English</Language>', 'O'),\n",
" ('.', 'O')]"
]
},
"metadata": {},
"execution_count": 62
}
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "gWX_IOuIWJKA",
"outputId": "7faad3c7-ee19-4be3-ee3b-61084403b635"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"50"
]
},
"metadata": {},
"execution_count": 63
}
],
"source": [
"p2_annotations = []\n",
"for sent in new_p2_annotations:\n",
" dicc_sent = {\"tokens\":[], \"ner_tags\":[]}\n",
" for word, tag in sent:\n",
" dicc_sent[\"tokens\"].append(word)\n",
" dicc_sent[\"ner_tags\"].append(sel_ent[tag])\n",
" p2_annotations.append(dicc_sent)\n",
"len(p2_annotations)"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {
"id": "EnakJGL7WJKA"
},
"outputs": [],
"source": [
"p2_df = pd.DataFrame(p2_annotations)\n",
"p2_dataset = Dataset.from_pandas(p2_df)"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 49,
"referenced_widgets": [
"a30bdf5afc2b4e078d8200d34b4760d2",
"7c864990c29f4f598cd3fdd02550d7b5",
"63640367c9494489a91988bb7c22b2b7",
"177e85135bd644c5b6f283237dd09361",
"9b5c5002cf264eb899c48390494d167a",
"d6d2c07d5f46410dbab13d86741f2be7",
"cab0297928774994b780ec733557af07",
"8b4d9c95b13c4c21bdd1c0295fc2be49",
"e246490ae7b14adbaa0e7a45fd177721",
"fced4d6e50b44fee950d1436e5618f82",
"12d7befb6aa644c7acad49e4e1c93167"
]
},
"id": "uxCAUki5WJKA",
"outputId": "e86c7104-1a79-417d-d5bb-4e440c9f0d9b"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Map: 0%| | 0/50 [00:00<?, ? examples/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "a30bdf5afc2b4e078d8200d34b4760d2"
}
},
"metadata": {}
}
],
"source": [
"p2_dataset = p2_dataset.map(tokenize_and_align_labels, batched=True)"
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Kj_cPZ6XWJKA",
"outputId": "0c9d5d1e-ca25-4300-ef4c-88ee0939a5f2"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"0.72\n"
]
}
],
"source": [
"# keep just sentences with the same length\n",
"sentences_to_evaluate_p2 = []\n",
"sentences_to_evaluate_true = []\n",
"\n",
"for i in range(len(p2_dataset)):\n",
" if len(p2_dataset['labels'][i]) == len(true_ann_dataset['labels'][i]):\n",
" sentences_to_evaluate_p2.append(p2_dataset['labels'][i])\n",
" sentences_to_evaluate_true.append(true_ann_dataset['labels'][i])\n",
"\n",
"print(len(sentences_to_evaluate_p2)/len(p2_dataset))"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {
"id": "iFZTUVmlWJKA"
},
"outputs": [],
"source": [
"evaluator = BioEval()"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {
"id": "T-SCSbQSWJKA"
},
"outputs": [],
"source": [
"pred_labels, true_labels = get_labels((sentences_to_evaluate_p2, sentences_to_evaluate_true))"
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {
"id": "zo2c6-fDWJKA"
},
"outputs": [],
"source": [
"evaluator.evaluate_annotations(true_labels, pred_labels, do_lower=True)"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "UrJPzn__WJKB",
"outputId": "1acf6b29-a3b2-4d90-ad1f-895c66429caa"
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'overall': {'acc': 0.6897,\n",
" 'strict': {'precision': 0.628158844765343,\n",
" 'recall': 0.5958904109589042,\n",
" 'f_score': 0.6115992970123024},\n",
" 'relax': {'precision': 0.7075812274368231,\n",
" 'recall': 0.6712328767123288,\n",
" 'f_score': 0.6889279437609842}},\n",
" 'category': {'strict': {'drug': {'precision': 0.15384615384615385,\n",
" 'recall': 0.11764705882352941,\n",
" 'f_score': 0.13333333333333333},\n",
" 'condition': {'precision': 0.7056277056277056,\n",
" 'recall': 0.6965811965811965,\n",
" 'f_score': 0.7010752688172043},\n",
" 'measurement': {'precision': 0.25, 'recall': 0.25, 'f_score': 0.25},\n",
" 'temporal': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'procedure': {'precision': 0.42857142857142855,\n",
" 'recall': 0.5454545454545454,\n",
" 'f_score': 0.4799999999999999},\n",
" 'value': {'precision': 0.5,\n",
" 'recall': 0.14285714285714285,\n",
" 'f_score': 0.22222222222222224},\n",
" 'observation': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'person': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0}},\n",
" 'relax': {'drug': {'precision': 0.3076923076923077,\n",
" 'recall': 0.23529411764705882,\n",
" 'f_score': 0.26666666666666666},\n",
" 'condition': {'precision': 0.7792207792207793,\n",
" 'recall': 0.7692307692307693,\n",
" 'f_score': 0.7741935483870968},\n",
" 'measurement': {'precision': 0.25, 'recall': 0.25, 'f_score': 0.25},\n",
" 'temporal': {'precision': 0.6666666666666666,\n",
" 'recall': 0.18181818181818182,\n",
" 'f_score': 0.28571428571428575},\n",
" 'procedure': {'precision': 0.5,\n",
" 'recall': 0.6363636363636364,\n",
" 'f_score': 0.56},\n",
" 'value': {'precision': 0.5,\n",
" 'recall': 0.14285714285714285,\n",
" 'f_score': 0.22222222222222224},\n",
" 'observation': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0},\n",
" 'person': {'precision': 0.0, 'recall': 0.0, 'f_score': 0.0}}}}"
]
},
"metadata": {},
"execution_count": 72
}
],
"source": [
"evaluator.performance"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {
"id": "l80O9eAfWJKB"
},
"outputs": [],
"source": [
"evaluator.save_evaluation('eval_p2.json')"
]
},
{
"cell_type": "code",
"source": [
"evaluator.get_counts()"
],
"metadata": {
"id": "Le3qW_LTNnaI",
"outputId": "40f54473-23c9-4b3e-dd63-56e17564442f",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": 74,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'expect': {'overall': 292,\n",
" 'drug': 17,\n",
" 'condition': 234,\n",
" 'measurement': 8,\n",
" 'value': 7,\n",
" 'procedure': 11,\n",
" 'temporal': 11,\n",
" 'observation': 3,\n",
" 'person': 1},\n",
" 'prediction': {'strict': {'overall': {'total': 277,\n",
" 'true': 174,\n",
" 'false': 103},\n",
" 'drug': {'total': 13, 'true': 2, 'false': 11},\n",
" 'condition': {'total': 231, 'true': 163, 'false': 68},\n",
" 'measurement': {'total': 8, 'true': 2, 'false': 6},\n",
" 'temporal': {'total': 3, 'true': 0, 'false': 3},\n",
" 'procedure': {'total': 14, 'true': 6, 'false': 8},\n",
" 'value': {'total': 2, 'true': 1, 'false': 1},\n",
" 'observation': {'total': 2, 'true': 0, 'false': 2},\n",
" 'person': {'total': 4, 'true': 0, 'false': 4}},\n",
" 'relax': {'overall': {'total': 277, 'true': 196, 'false': 81},\n",
" 'drug': {'total': 13, 'true': 4, 'false': 9},\n",
" 'condition': {'total': 231, 'true': 180, 'false': 51},\n",
" 'measurement': {'total': 8, 'true': 2, 'false': 6},\n",
" 'temporal': {'total': 3, 'true': 2, 'false': 1},\n",
" 'procedure': {'total': 14, 'true': 7, 'false': 7},\n",
" 'value': {'total': 2, 'true': 1, 'false': 1},\n",
" 'observation': {'total': 2, 'true': 0, 'false': 2},\n",
" 'person': {'total': 4, 'true': 0, 'false': 4}}}}"
]
},
"metadata": {},
"execution_count": 74
}
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
},
"colab": {
"provenance": [],
"gpuType": "T4",
"include_colab_link": true
},
"accelerator": "GPU",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"0f4e594a6aa64dd697fb841d4207d4b7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "VBoxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "VBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "VBoxView",
"box_style": "",
"children": [
"IPY_MODEL_9f151f163b2c4966b9460dd31e184a84",
"IPY_MODEL_67a9e41b56a741baa4a953905d11c263",
"IPY_MODEL_e32ad767760d4bddb2f3a0a38327339b",
"IPY_MODEL_681dac30b90b4b02b38f9e5bb99429c0"
],
"layout": "IPY_MODEL_1fa716b65c7f47989184cc24bd56e5bd"
}
},
"413c1cd08da84e32ba2de36d891bf86a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_494b9dacddb948f7b08b509e7a79f3f1",
"placeholder": "",
"style": "IPY_MODEL_e3e2f93363b74e24bf22abcaf021b3dc",
"value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
}
},
"ba7f75db7de145abb174658862ef50a3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "PasswordModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "PasswordModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "PasswordView",
"continuous_update": true,
"description": "Token:",
"description_tooltip": null,
"disabled": false,
"layout": "IPY_MODEL_b607f0954b3844e18ed2a887372d42c5",
"placeholder": "",
"style": "IPY_MODEL_95176ba773274023b4e3356bb3cb4cc9",
"value": ""
}
},
"d55f2bd66fe044e4816348c1b4b032bf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "CheckboxModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "CheckboxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "CheckboxView",
"description": "Add token as git credential?",
"description_tooltip": null,
"disabled": false,
"indent": true,
"layout": "IPY_MODEL_ac4c65187e864fd09e296fcbbe3ad6d8",
"style": "IPY_MODEL_540f2e543376445d849e1a56ac38e4d4",
"value": true
}
},
"d1fd6600f76a4bf7968b0d13de093148": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ButtonModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ButtonView",
"button_style": "",
"description": "Login",
"disabled": false,
"icon": "",
"layout": "IPY_MODEL_a9d9e19fa5ae41109e7c7cf9a4d8a13c",
"style": "IPY_MODEL_4fd000047a0a402194cb3b99bb59d8f9",
"tooltip": ""
}
},
"b00aef23e75445c785a6b3b8756b9c94": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_9d08585ce6fd40538dc10d1c5d1aee70",
"placeholder": "",
"style": "IPY_MODEL_f4642fc990e94bf99c7d26017d8771ba",
"value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
}
},
"1fa716b65c7f47989184cc24bd56e5bd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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": "center",
"align_self": null,
"border": null,
"bottom": null,
"display": "flex",
"flex": null,
"flex_flow": "column",
"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": "50%"
}
},
"494b9dacddb948f7b08b509e7a79f3f1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"e3e2f93363b74e24bf22abcaf021b3dc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"b607f0954b3844e18ed2a887372d42c5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"95176ba773274023b4e3356bb3cb4cc9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"ac4c65187e864fd09e296fcbbe3ad6d8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"540f2e543376445d849e1a56ac38e4d4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"a9d9e19fa5ae41109e7c7cf9a4d8a13c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"4fd000047a0a402194cb3b99bb59d8f9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ButtonStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ButtonStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"button_color": null,
"font_weight": ""
}
},
"9d08585ce6fd40538dc10d1c5d1aee70": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"f4642fc990e94bf99c7d26017d8771ba": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"9c49b620b2c04b83ae01bf4ab06e7270": {
"model_module": "@jupyter-widgets/controls",
"model_name": "LabelModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "LabelModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "LabelView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_d47d0c2d528c40a38965fac763e450cf",
"placeholder": "",
"style": "IPY_MODEL_374d4f7c917d48c2b81f24cbfcfce062",
"value": "Connecting..."
}
},
"d47d0c2d528c40a38965fac763e450cf": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"374d4f7c917d48c2b81f24cbfcfce062": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"9f151f163b2c4966b9460dd31e184a84": {
"model_module": "@jupyter-widgets/controls",
"model_name": "LabelModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "LabelModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "LabelView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_dd0df631524e42e48299283f1a9555e9",
"placeholder": "",
"style": "IPY_MODEL_609d5b49e085499994a11342e8dd425f",
"value": "Token is valid (permission: write)."
}
},
"67a9e41b56a741baa4a953905d11c263": {
"model_module": "@jupyter-widgets/controls",
"model_name": "LabelModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "LabelModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "LabelView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_3e7792c5d2484e24950f1f83f899ba4a",
"placeholder": "",
"style": "IPY_MODEL_8fae6bd7ebc54636a14b375fa46ec0dc",
"value": "Your token has been saved in your configured git credential helpers (store)."
}
},
"e32ad767760d4bddb2f3a0a38327339b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "LabelModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "LabelModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "LabelView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_7fa56a404f8847239109441a3b043a77",
"placeholder": "",
"style": "IPY_MODEL_d34e4794cb944c1cb8ae88845cad54fb",
"value": "Your token has been saved to /root/.cache/huggingface/token"
}
},
"681dac30b90b4b02b38f9e5bb99429c0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "LabelModel",
"model_module_version": "1.5.0",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "LabelModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "LabelView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_4856843799e242ac8b72cf37ad1a159f",
"placeholder": "",
"style": "IPY_MODEL_c3c6d1e8aeb14e999ea3fadc10539861",
"value": "Login successful"
}
},
"dd0df631524e42e48299283f1a9555e9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"609d5b49e085499994a11342e8dd425f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"3e7792c5d2484e24950f1f83f899ba4a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"8fae6bd7ebc54636a14b375fa46ec0dc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"7fa56a404f8847239109441a3b043a77": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"d34e4794cb944c1cb8ae88845cad54fb": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"4856843799e242ac8b72cf37ad1a159f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"c3c6d1e8aeb14e999ea3fadc10539861": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"e1b0ea4e59bd4bebb31544a4ca43fae6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_bb7c0220e2404676a2a37b5f8e45a560",
"IPY_MODEL_d9a38641722d4d1698c9eb12c9ba2aa2",
"IPY_MODEL_726b3712020e475e8e5734e51ad3255b"
],
"layout": "IPY_MODEL_b834f5ce5d4b4e8eac3688c2119e0e6e"
}
},
"bb7c0220e2404676a2a37b5f8e45a560": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_99fea94eaf344a1687764756225e9a88",
"placeholder": "",
"style": "IPY_MODEL_640023c221074c73a38d147a05cfedaf",
"value": "Loading checkpoint shards: 100%"
}
},
"d9a38641722d4d1698c9eb12c9ba2aa2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_e2a1e70aa375450299d81baa7a007f1f",
"max": 2,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_4f06ce02f7b8452981731c87ac3814bc",
"value": 2
}
},
"726b3712020e475e8e5734e51ad3255b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_ed7294f2acf84015ac0c0c3b78c629cb",
"placeholder": "",
"style": "IPY_MODEL_1cf1101362c545738dcbb5e528f1af33",
"value": " 2/2 [01:23<00:00, 38.53s/it]"
}
},
"b834f5ce5d4b4e8eac3688c2119e0e6e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"99fea94eaf344a1687764756225e9a88": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"640023c221074c73a38d147a05cfedaf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"e2a1e70aa375450299d81baa7a007f1f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"4f06ce02f7b8452981731c87ac3814bc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"ed7294f2acf84015ac0c0c3b78c629cb": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"1cf1101362c545738dcbb5e528f1af33": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"c8846cf2991a4e93a0e91bc1802f1079": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_3b12538b8e254b4ebcc79d694b2b272c",
"IPY_MODEL_205f861cb2ed48209b795217f645e077",
"IPY_MODEL_25605c2b3e93464daedc1fcade1f47b4"
],
"layout": "IPY_MODEL_98919ba0701545fd997e3d71f4eff69e"
}
},
"3b12538b8e254b4ebcc79d694b2b272c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_013efa5f201d460e9332bd047982c449",
"placeholder": "",
"style": "IPY_MODEL_7a0323004bd14c579c27df13bf3f861b",
"value": "tokenizer_config.json: 100%"
}
},
"205f861cb2ed48209b795217f645e077": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_ef49e0a4613f4207b11012c494b4ed15",
"max": 25,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_f88c80704c59405f9224c9a98105303d",
"value": 25
}
},
"25605c2b3e93464daedc1fcade1f47b4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_1a4eab919e9e475ea452687215355489",
"placeholder": "",
"style": "IPY_MODEL_cf5d7616d08944108ae6dcfdb487cd5a",
"value": " 25.0/25.0 [00:00<00:00, 1.87kB/s]"
}
},
"98919ba0701545fd997e3d71f4eff69e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"013efa5f201d460e9332bd047982c449": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"7a0323004bd14c579c27df13bf3f861b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"ef49e0a4613f4207b11012c494b4ed15": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"f88c80704c59405f9224c9a98105303d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"1a4eab919e9e475ea452687215355489": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"cf5d7616d08944108ae6dcfdb487cd5a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"ae392574043b40c8bf461468e8f06f18": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_8af0715bcf2647c390c073430ffbbe5d",
"IPY_MODEL_44e3af9f1124467b94cbb6f90f1669a3",
"IPY_MODEL_804dbc29e4a9404d935b8ab10dc481e9"
],
"layout": "IPY_MODEL_6ed75fda4c3f4fb2ab931ee7e162b3c4"
}
},
"8af0715bcf2647c390c073430ffbbe5d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_d71d92ee94994f93bbbdedb475dc5ba5",
"placeholder": "",
"style": "IPY_MODEL_1780c6cc045a49a6838bc1e43c89dca1",
"value": "config.json: 100%"
}
},
"44e3af9f1124467b94cbb6f90f1669a3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_51b7d216e4144dd0a5ea92eb12e410b7",
"max": 615,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_6e2bf10b566a453d8b342e824ec36fdf",
"value": 615
}
},
"804dbc29e4a9404d935b8ab10dc481e9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_1a7b5758d56d4811902698d1ad696163",
"placeholder": "",
"style": "IPY_MODEL_11047f16bb534e70ad1d6bdde663cfa4",
"value": " 615/615 [00:00<00:00, 24.8kB/s]"
}
},
"6ed75fda4c3f4fb2ab931ee7e162b3c4": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"d71d92ee94994f93bbbdedb475dc5ba5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"1780c6cc045a49a6838bc1e43c89dca1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"51b7d216e4144dd0a5ea92eb12e410b7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"6e2bf10b566a453d8b342e824ec36fdf": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"1a7b5758d56d4811902698d1ad696163": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"11047f16bb534e70ad1d6bdde663cfa4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"3791512b6e92422799da4e950c6dde6d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_161970c8736a46899cd017c5e5906352",
"IPY_MODEL_cfafc68041754603b0916c8e28a90d0b",
"IPY_MODEL_a91cbbefe5ca4c07a46ad81424e2f0a7"
],
"layout": "IPY_MODEL_995f169324d647fbb1c09c7ea3ec22d6"
}
},
"161970c8736a46899cd017c5e5906352": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_c617e79d6b4448f1af28c2d3c46d4ee5",
"placeholder": "",
"style": "IPY_MODEL_1d23076205f3470590110feb368afd52",
"value": "sentencepiece.bpe.model: 100%"
}
},
"cfafc68041754603b0916c8e28a90d0b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_99a5dcb8b54c4e1da8747d16e1d54538",
"max": 5069051,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_a890ce1e992a4f04a524d3c76927d5f6",
"value": 5069051
}
},
"a91cbbefe5ca4c07a46ad81424e2f0a7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_4e12dbb6c203422193cf12d58338f1c3",
"placeholder": "",
"style": "IPY_MODEL_ee8308b8ca9a4dd8b9993824f2df176c",
"value": " 5.07M/5.07M [00:00<00:00, 11.2MB/s]"
}
},
"995f169324d647fbb1c09c7ea3ec22d6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"c617e79d6b4448f1af28c2d3c46d4ee5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"1d23076205f3470590110feb368afd52": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"99a5dcb8b54c4e1da8747d16e1d54538": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"a890ce1e992a4f04a524d3c76927d5f6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"4e12dbb6c203422193cf12d58338f1c3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"ee8308b8ca9a4dd8b9993824f2df176c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"3786b6a492114f58b8c92f904c80b9e2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_d6d29174233e4d1596dd391b9a22eac2",
"IPY_MODEL_fc135f2fe68d4b83ad57ecb3085febe1",
"IPY_MODEL_f539dc11a57e425ea714a681d5027960"
],
"layout": "IPY_MODEL_af7fa5b783c54fe4b62e53cd6641de2b"
}
},
"d6d29174233e4d1596dd391b9a22eac2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_f0e324c229f7477baf1bb26fa4bc85ed",
"placeholder": "",
"style": "IPY_MODEL_205312c7b62b4410a5aa1298deb1fb6f",
"value": "tokenizer.json: 100%"
}
},
"fc135f2fe68d4b83ad57ecb3085febe1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_4847afa0d5044cb0a0d693495ff05c63",
"max": 9096718,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_0a7d5f7c3174491990f4f1018cbafe4f",
"value": 9096718
}
},
"f539dc11a57e425ea714a681d5027960": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_b01bb888c2a646c0af368da52b9b4f2f",
"placeholder": "",
"style": "IPY_MODEL_bf557e4621f04d56a736fda56470d77e",
"value": " 9.10M/9.10M [00:00<00:00, 17.7MB/s]"
}
},
"af7fa5b783c54fe4b62e53cd6641de2b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"f0e324c229f7477baf1bb26fa4bc85ed": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"205312c7b62b4410a5aa1298deb1fb6f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"4847afa0d5044cb0a0d693495ff05c63": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"0a7d5f7c3174491990f4f1018cbafe4f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"b01bb888c2a646c0af368da52b9b4f2f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"bf557e4621f04d56a736fda56470d77e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"cabdca2ad56e43eaa506e4588087c3f2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_116d6d8de1af401a971f3da77cb4b916",
"IPY_MODEL_5644e8831133414dbb54e899f1253e8b",
"IPY_MODEL_75cff91a18654513bc53045df04832f6"
],
"layout": "IPY_MODEL_883ee6d5131443eba2c4598c9fa0223e"
}
},
"116d6d8de1af401a971f3da77cb4b916": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_5454af7e0b964f388ecab1f83f74ecc9",
"placeholder": "",
"style": "IPY_MODEL_9f62543c61b04183b7784826e9178321",
"value": "Map: 100%"
}
},
"5644e8831133414dbb54e899f1253e8b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_dd31f0ed6eee4b6a97d4c9ee6addabe3",
"max": 1307,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_9f072c7c1f7646ef876b49917e1eccff",
"value": 1307
}
},
"75cff91a18654513bc53045df04832f6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_76f09404ea3d447782bb09cd27e9a723",
"placeholder": "",
"style": "IPY_MODEL_f2356694803b4c678de2ca0a11cb11e2",
"value": " 1307/1307 [00:00<00:00, 2282.77 examples/s]"
}
},
"883ee6d5131443eba2c4598c9fa0223e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"5454af7e0b964f388ecab1f83f74ecc9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"9f62543c61b04183b7784826e9178321": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"dd31f0ed6eee4b6a97d4c9ee6addabe3": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"9f072c7c1f7646ef876b49917e1eccff": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"76f09404ea3d447782bb09cd27e9a723": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"f2356694803b4c678de2ca0a11cb11e2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"c070b80f8b404d7aa1945ce74f04e669": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_efd95411b98444c39eacc1b3ba12cf9e",
"IPY_MODEL_f3b4b928a53444cf9133d950c79be90a",
"IPY_MODEL_8ce9a6d482554cff8218b795a2b7afe5"
],
"layout": "IPY_MODEL_4410cb65ce684026bac9d6bce8204641"
}
},
"efd95411b98444c39eacc1b3ba12cf9e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_bbff96b8aab24b1dacce61988d890bde",
"placeholder": "",
"style": "IPY_MODEL_9b46df12fda94d0193f51b1517316468",
"value": "Map: 100%"
}
},
"f3b4b928a53444cf9133d950c79be90a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_2a1d2c6b26384a14903f1a186de1f32f",
"max": 50,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_0458e8b753dd4412bda534234c52e48f",
"value": 50
}
},
"8ce9a6d482554cff8218b795a2b7afe5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_0ed9463a4fc74d1daf25e7273d2025da",
"placeholder": "",
"style": "IPY_MODEL_6f26495add4a4869abf3b830919feeb0",
"value": " 50/50 [00:00<00:00, 944.02 examples/s]"
}
},
"4410cb65ce684026bac9d6bce8204641": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"bbff96b8aab24b1dacce61988d890bde": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"9b46df12fda94d0193f51b1517316468": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"2a1d2c6b26384a14903f1a186de1f32f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"0458e8b753dd4412bda534234c52e48f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"0ed9463a4fc74d1daf25e7273d2025da": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"6f26495add4a4869abf3b830919feeb0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"a30bdf5afc2b4e078d8200d34b4760d2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"model_module_version": "1.5.0",
"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_7c864990c29f4f598cd3fdd02550d7b5",
"IPY_MODEL_63640367c9494489a91988bb7c22b2b7",
"IPY_MODEL_177e85135bd644c5b6f283237dd09361"
],
"layout": "IPY_MODEL_9b5c5002cf264eb899c48390494d167a"
}
},
"7c864990c29f4f598cd3fdd02550d7b5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_d6d2c07d5f46410dbab13d86741f2be7",
"placeholder": "",
"style": "IPY_MODEL_cab0297928774994b780ec733557af07",
"value": "Map: 100%"
}
},
"63640367c9494489a91988bb7c22b2b7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"model_module_version": "1.5.0",
"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_8b4d9c95b13c4c21bdd1c0295fc2be49",
"max": 50,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_e246490ae7b14adbaa0e7a45fd177721",
"value": 50
}
},
"177e85135bd644c5b6f283237dd09361": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"model_module_version": "1.5.0",
"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_fced4d6e50b44fee950d1436e5618f82",
"placeholder": "",
"style": "IPY_MODEL_12d7befb6aa644c7acad49e4e1c93167",
"value": " 50/50 [00:00<00:00, 603.46 examples/s]"
}
},
"9b5c5002cf264eb899c48390494d167a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"d6d2c07d5f46410dbab13d86741f2be7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"cab0297928774994b780ec733557af07": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"8b4d9c95b13c4c21bdd1c0295fc2be49": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"e246490ae7b14adbaa0e7a45fd177721": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
},
"fced4d6e50b44fee950d1436e5618f82": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"model_module_version": "1.2.0",
"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
}
},
"12d7befb6aa644c7acad49e4e1c93167": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"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": ""
}
}
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}