{ "cells": [ { "cell_type": "code", "source": [ "!pip install transformers\n", "!pip install datasets" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "v6Hl9dT9xI3h", "outputId": "99c0c9dc-432d-43b4-ce25-828e9e467326" }, "execution_count": 1, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Requirement already satisfied: transformers in /usr/local/lib/python3.7/dist-packages (4.19.2)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (1.21.6)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers) (3.7.0)\n", "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (2019.12.20)\n", "Requirement already satisfied: tokenizers!=0.11.3,<0.13,>=0.11.1 in /usr/local/lib/python3.7/dist-packages (from transformers) (0.12.1)\n", "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (21.3)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from transformers) (6.0)\n", "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from transformers) (4.11.4)\n", "Requirement already satisfied: huggingface-hub<1.0,>=0.1.0 in /usr/local/lib/python3.7/dist-packages (from transformers) (0.7.0)\n", "Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers) (2.23.0)\n", "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers) (4.64.0)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0,>=0.1.0->transformers) (4.2.0)\n", "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->transformers) (3.0.9)\n", "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->transformers) (3.8.0)\n", "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (3.0.4)\n", "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2.10)\n", "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (1.25.11)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2022.5.18.1)\n", "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", "Requirement already satisfied: datasets in /usr/local/lib/python3.7/dist-packages (2.2.2)\n", "Requirement already satisfied: pyarrow>=6.0.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (6.0.1)\n", "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.7/dist-packages (from datasets) (4.64.0)\n", "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (2.23.0)\n", "Requirement already satisfied: huggingface-hub<1.0.0,>=0.1.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (0.7.0)\n", "Requirement already satisfied: dill<0.3.5 in /usr/local/lib/python3.7/dist-packages (from datasets) (0.3.4)\n", "Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.7/dist-packages (from datasets) (0.18.0)\n", "Requirement already satisfied: multiprocess in /usr/local/lib/python3.7/dist-packages (from datasets) (0.70.12.2)\n", "Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from datasets) (1.3.5)\n", "Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from datasets) (21.3)\n", "Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages (from datasets) (4.11.4)\n", "Requirement already satisfied: fsspec[http]>=2021.05.0 in /usr/local/lib/python3.7/dist-packages (from datasets) (2022.5.0)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.7/dist-packages (from datasets) (1.21.6)\n", "Requirement already satisfied: aiohttp in /usr/local/lib/python3.7/dist-packages (from datasets) (3.8.1)\n", "Requirement already satisfied: xxhash in /usr/local/lib/python3.7/dist-packages (from datasets) (3.0.0)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0.0,>=0.1.0->datasets) (6.0)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0.0,>=0.1.0->datasets) (4.2.0)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from huggingface-hub<1.0.0,>=0.1.0->datasets) (3.7.0)\n", "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->datasets) (3.0.9)\n", "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (2.10)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (2022.5.18.1)\n", "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (3.0.4)\n", "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.19.0->datasets) (1.25.11)\n", "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (4.0.2)\n", "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.3.0)\n", "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (21.4.0)\n", "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (6.0.2)\n", "Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (0.13.0)\n", "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.2.0)\n", "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (1.7.2)\n", "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->datasets) (2.0.12)\n", "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata->datasets) (3.8.0)\n", "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets) (2022.1)\n", "Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas->datasets) (2.8.2)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.7.3->pandas->datasets) (1.15.0)\n" ] } ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "id": "i-B5sPHELBBj" }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import seaborn as sns" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "id": "uxhFjfeHLBBr" }, "outputs": [], "source": [ "# Read the pokedex we scraped in web_scrape.ipynb into a DataFrame\n", "pkmn = pd.read_csv(\"pokemon.csv\")\n", "pkmn.rename(columns={\"Unnamed: 0\": \"wiki_index\"}, inplace=True)\n", "pkmn = pkmn[pkmn.primary_type != \"Bird\"] # MissingNo is special, but not special enough to break the rules." ] }, { "cell_type": "code", "source": [ "# Fixing Inference.\n", "\n", "lil = pkmn[['primary_type', 'Notes']].copy()" ], "metadata": { "id": "y_n4NNSOxzXL" }, "execution_count": 4, "outputs": [] }, { "cell_type": "code", "source": [ "from datasets.dataset_dict import DatasetDict\n", "from datasets import Dataset\n", "import datasets" ], "metadata": { "id": "F_HSR6Kk2M0H" }, "execution_count": 5, "outputs": [] }, { "cell_type": "code", "source": [ "lil['primary_type'] = lil['primary_type'].astype('category') \n", "lil['label'] = lil['primary_type'].cat.codes\n", "df = lil[['label', 'Notes']].copy()\n", "df = df.rename(columns={'Notes': 'text'})" ], "metadata": { "id": "Dt-gNH3D4P9Y" }, "execution_count": 6, "outputs": [] }, { "cell_type": "code", "source": [ "id2label = {k: v for k, v in enumerate(lil['primary_type'].cat.categories)}\n", "label2id = {v: k for k, v in enumerate(lil['primary_type'].cat.categories)}" ], "metadata": { "id": "3eJghd1m4TSC" }, "execution_count": 7, "outputs": [] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "VyS7Nc_Iv7ys", "outputId": "4558a505-5e59-4c41-f6e5-33e637891a49" }, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "Some weights of the model checkpoint at distilbert-base-uncased were not used when initializing DistilBertForSequenceClassification: ['vocab_projector.bias', 'vocab_layer_norm.bias', 'vocab_layer_norm.weight', 'vocab_transform.weight', 'vocab_projector.weight', 'vocab_transform.bias']\n", "- This IS expected if you are initializing DistilBertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n", "- This IS NOT expected if you are initializing DistilBertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n", "Some weights of DistilBertForSequenceClassification were not initialized from the model checkpoint at distilbert-base-uncased and are newly initialized: ['pre_classifier.weight', 'classifier.weight', 'pre_classifier.bias', 'classifier.bias']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n" ] } ], "source": [ "from transformers import AutoModelForSequenceClassification, AutoTokenizer\n", "\n", "tokenizer = AutoTokenizer.from_pretrained(\"distilbert-base-uncased\")\n", "model = AutoModelForSequenceClassification.from_pretrained(\n", " \"distilbert-base-uncased\", num_labels=18, id2label=id2label, label2id=label2id\n", ")" ] }, { "cell_type": "code", "source": [ "train_df = df.sample(frac=0.7)\n", "test_df = df.drop(train_df.index, inplace=False)\n", "\n", "train_dataset = Dataset.from_dict(train_df)\n", "test_dataset = Dataset.from_dict(test_df)\n", "my_dataset_dict = DatasetDict({\"train\":train_dataset,\"test\":test_dataset})\n", "\n", "my_dataset_dict" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "GhlYrzASzDUS", "outputId": "5c41102d-0c54-498f-f24e-0dae59a0ed56" }, "execution_count": 10, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "DatasetDict({\n", " train: Dataset({\n", " features: ['label', 'text'],\n", " num_rows: 654\n", " })\n", " test: Dataset({\n", " features: ['label', 'text'],\n", " num_rows: 281\n", " })\n", "})" ] }, "metadata": {}, "execution_count": 10 } ] }, { "cell_type": "code", "source": [ "def tokenize_function(examples):\n", " return tokenizer(examples[\"text\"], padding=\"max_length\", truncation=True)\n", "\n", "dataset = my_dataset_dict\n", "tokenized_datasets = dataset.map(tokenize_function, batched=True)" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 81, "referenced_widgets": [ "e397276a3494413a8537fa5ba48f7015", "3681f628eb844524bd4a121dd313d2ef", "4699b0136d4d449ca4accf9bc90fc45a", "0435b641146f45488248e042ff0d4f31", "8233bb294c7549b6a8ae5e140e8ca5b6", "608d0d01fe4d4a14877920e51b10233a", "246696956b774368ad7572db606a2414", "cd1d0bd35b464f74aff7c7421de03fc9", "eac0a76ba4cf4b61ae82e9aa2f770dce", "68e198c9120f4451bd9b9f033a9d4bae", "bd8b8f2e781e4de1a477c8af4c450d1f", "b2eba59325544c0790fea0b5a08916b1", "deeb1a85968d4619a7928712c09168d2", "39d408f797bf46aa8a9617a68c8ba913", "e643c45c934d414d9b46abdc64eccbbc", "f7972177ace147fbb45918eebe106915", "aa8e9ad5e1ce4b84b49c194c61f90820", "93c35117cea74e5b9de2b871168b7095", "09542f17885d4ce1b6fb5e8682beb6de", "e1fce70e1a67446982a09c9d4948b48d", "7712b1987ee143fe9ceb6ef13bded85d", "51f19ba89e5f4d208564f03ff6f2b0da" ] }, "id": "HB1hGkNLy9rG", "outputId": "365046b5-635d-402d-9c81-3fec9d05ac64" }, "execution_count": 11, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ " 0%| | 0/1 [00:00" ], "text/html": [ "\n", "
\n", " \n", " \n", " [246/246 01:46, Epoch 3/3]\n", "
\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
EpochTraining LossValidation LossAccuracy
1No log2.4715770.274021
2No log2.1918890.437722
3No log2.0779480.473310

" ] }, "metadata": {} }, { "output_type": "stream", "name": "stderr", "text": [ "The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: text. If text are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 281\n", " Batch size = 8\n", "The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: text. If text are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 281\n", " Batch size = 8\n", "The following columns in the evaluation set don't have a corresponding argument in `DistilBertForSequenceClassification.forward` and have been ignored: text. If text are not expected by `DistilBertForSequenceClassification.forward`, you can safely ignore this message.\n", "***** Running Evaluation *****\n", " Num examples = 281\n", " Batch size = 8\n", "\n", "\n", "Training completed. Do not forget to share your model on huggingface.co/models =)\n", "\n", "\n" ] }, { "output_type": "execute_result", "data": { "text/plain": [ "TrainOutput(global_step=246, training_loss=2.312268264894563, metrics={'train_runtime': 106.6333, 'train_samples_per_second': 18.4, 'train_steps_per_second': 2.307, 'total_flos': 259975195619328.0, 'train_loss': 2.312268264894563, 'epoch': 3.0})" ] }, "metadata": {}, "execution_count": 19 } ] }, { "cell_type": "code", "source": [ "model.save_pretrained(\"./model\")" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "svA3ZvuKW6LA", "outputId": "ca4674d4-92c2-4c9a-a151-1d093ddbf954" }, "execution_count": 20, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "Configuration saved in ./config.json\n", "Model weights saved in ./pytorch_model.bin\n" ] } ] }, { "cell_type": "code", "source": [ "model2 = AutoModelForSequenceClassification.from_pretrained('./model')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "rHGVDBRc3eqe", "outputId": "29d1d861-c58a-41a0-8179-19abc44efac1" }, "execution_count": 21, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "loading configuration file ./config.json\n", "Model config DistilBertConfig {\n", " \"_name_or_path\": \".\",\n", " \"activation\": \"gelu\",\n", " \"architectures\": [\n", " \"DistilBertForSequenceClassification\"\n", " ],\n", " \"attention_dropout\": 0.1,\n", " \"dim\": 768,\n", " \"dropout\": 0.1,\n", " \"hidden_dim\": 3072,\n", " \"id2label\": {\n", " \"0\": \"Bug\",\n", " \"1\": \"Dark\",\n", " \"2\": \"Dragon\",\n", " \"3\": \"Electric\",\n", " \"4\": \"Fairy\",\n", " \"5\": \"Fighting\",\n", " \"6\": \"Fire\",\n", " \"7\": \"Flying\",\n", " \"8\": \"Ghost\",\n", " \"9\": \"Grass\",\n", " \"10\": \"Ground\",\n", " \"11\": \"Ice\",\n", " \"12\": \"Normal\",\n", " \"13\": \"Poison\",\n", " \"14\": \"Psychic\",\n", " \"15\": \"Rock\",\n", " \"16\": \"Steel\",\n", " \"17\": \"Water\"\n", " },\n", " \"initializer_range\": 0.02,\n", " \"label2id\": {\n", " \"Bug\": 0,\n", " \"Dark\": 1,\n", " \"Dragon\": 2,\n", " \"Electric\": 3,\n", " \"Fairy\": 4,\n", " \"Fighting\": 5,\n", " \"Fire\": 6,\n", " \"Flying\": 7,\n", " \"Ghost\": 8,\n", " \"Grass\": 9,\n", " \"Ground\": 10,\n", " \"Ice\": 11,\n", " \"Normal\": 12,\n", " \"Poison\": 13,\n", " \"Psychic\": 14,\n", " \"Rock\": 15,\n", " \"Steel\": 16,\n", " \"Water\": 17\n", " },\n", " \"max_position_embeddings\": 512,\n", " \"model_type\": \"distilbert\",\n", " \"n_heads\": 12,\n", " \"n_layers\": 6,\n", " \"pad_token_id\": 0,\n", " \"problem_type\": \"single_label_classification\",\n", " \"qa_dropout\": 0.1,\n", " \"seq_classif_dropout\": 0.2,\n", " \"sinusoidal_pos_embds\": false,\n", " \"tie_weights_\": true,\n", " \"torch_dtype\": \"float32\",\n", " \"transformers_version\": \"4.19.2\",\n", " \"vocab_size\": 30522\n", "}\n", "\n", "loading weights file ./pytorch_model.bin\n", "All model checkpoint weights were used when initializing DistilBertForSequenceClassification.\n", "\n", "All the weights of DistilBertForSequenceClassification were initialized from the model checkpoint at ..\n", "If your task is similar to the task the model of the checkpoint was trained on, you can already use DistilBertForSequenceClassification for predictions without further training.\n" ] } ] }, { "cell_type": "code", "source": [ "from transformers import pipeline\n", "\n", "classifier = pipeline(task=\"text-classification\", tokenizer=tokenizer, model=model2.to('cpu'))" ], "metadata": { "id": "yP--Matd4WCe" }, "execution_count": 22, "outputs": [] }, { "cell_type": "code", "source": [ "classifier('This pokemon climbs buildings at night.')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "qVAlioYj6jBO", "outputId": "c820c497-da3e-4e1e-c1d0-ef2494bffb03" }, "execution_count": 41, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "[{'label': 'Bug', 'score': 0.17771221697330475}]" ] }, "metadata": {}, "execution_count": 41 } ] }, { "cell_type": "code", "source": [ "classifier('This pokemon climbs buildings at night. They frequent midnight pool parties')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "3AJcXRR54Yk4", "outputId": "5bd7cdd1-fd34-483f-d30c-560d54a28493" }, "execution_count": 36, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "[{'label': 'Water', 'score': 0.4050225019454956}]" ] }, "metadata": {}, "execution_count": 36 } ] }, { "cell_type": "code", "source": [ "classifier('This pokemon climbs buildings at night. They frequent midnight garden parties')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "kJ54PeHz4pbO", "outputId": "3e1571bd-6a0c-4800-ab4d-60835cb4f3a5" }, "execution_count": 37, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "[{'label': 'Grass', 'score': 0.38808730244636536}]" ] }, "metadata": {}, "execution_count": 37 } ] }, { "cell_type": "code", "source": [ "classifier('This pokemon climbs buildings at night. They frequent midnight flame-throwing parties')" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "GXVKzk-N8_So", "outputId": "61e50b07-f3a5-4ff9-c152-1ea2d846dcfe" }, "execution_count": 38, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "[{'label': 'Fire', 'score': 0.22531799972057343}]" ] }, "metadata": {}, "execution_count": 38 } ] }, { "cell_type": "code", "source": [ "" ], "metadata": { "id": "idRtKyjM9KIE" }, "execution_count": null, "outputs": [] } ], "metadata": { "colab": { "name": "nlp.ipynb", "provenance": [] }, "interpreter": { "hash": "45e1260056979d5382785f386f12ee00f44622d9a136ee7663e9a61a67ca2a68" }, "kernelspec": { "display_name": "Python 3.10.0 ('projects-vBrzsZbN-py3.10')", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.0" }, "orig_nbformat": 4, "accelerator": "GPU", "widgets": { "application/vnd.jupyter.widget-state+json": { "e397276a3494413a8537fa5ba48f7015": { "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_3681f628eb844524bd4a121dd313d2ef", "IPY_MODEL_4699b0136d4d449ca4accf9bc90fc45a", "IPY_MODEL_0435b641146f45488248e042ff0d4f31" ], "layout": "IPY_MODEL_8233bb294c7549b6a8ae5e140e8ca5b6" } }, "3681f628eb844524bd4a121dd313d2ef": { "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_608d0d01fe4d4a14877920e51b10233a", "placeholder": "​", "style": "IPY_MODEL_246696956b774368ad7572db606a2414", "value": "100%" } }, "4699b0136d4d449ca4accf9bc90fc45a": { "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_cd1d0bd35b464f74aff7c7421de03fc9", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_eac0a76ba4cf4b61ae82e9aa2f770dce", "value": 1 } }, "0435b641146f45488248e042ff0d4f31": { "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_68e198c9120f4451bd9b9f033a9d4bae", "placeholder": "​", "style": "IPY_MODEL_bd8b8f2e781e4de1a477c8af4c450d1f", "value": " 1/1 [00:00<00:00, 2.22ba/s]" } }, "8233bb294c7549b6a8ae5e140e8ca5b6": { "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 } }, "608d0d01fe4d4a14877920e51b10233a": { "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 } }, "246696956b774368ad7572db606a2414": { "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": "" } }, "cd1d0bd35b464f74aff7c7421de03fc9": { "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 } }, "eac0a76ba4cf4b61ae82e9aa2f770dce": { "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": "" } }, "68e198c9120f4451bd9b9f033a9d4bae": { "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 } }, "bd8b8f2e781e4de1a477c8af4c450d1f": { "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": "" } }, "b2eba59325544c0790fea0b5a08916b1": { "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_deeb1a85968d4619a7928712c09168d2", "IPY_MODEL_39d408f797bf46aa8a9617a68c8ba913", "IPY_MODEL_e643c45c934d414d9b46abdc64eccbbc" ], "layout": "IPY_MODEL_f7972177ace147fbb45918eebe106915" } }, "deeb1a85968d4619a7928712c09168d2": { "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_aa8e9ad5e1ce4b84b49c194c61f90820", "placeholder": "​", "style": "IPY_MODEL_93c35117cea74e5b9de2b871168b7095", "value": "100%" } }, "39d408f797bf46aa8a9617a68c8ba913": { "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_09542f17885d4ce1b6fb5e8682beb6de", "max": 1, "min": 0, "orientation": "horizontal", "style": "IPY_MODEL_e1fce70e1a67446982a09c9d4948b48d", "value": 1 } }, "e643c45c934d414d9b46abdc64eccbbc": { "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_7712b1987ee143fe9ceb6ef13bded85d", "placeholder": "​", "style": "IPY_MODEL_51f19ba89e5f4d208564f03ff6f2b0da", "value": " 1/1 [00:00<00:00, 3.74ba/s]" } }, "f7972177ace147fbb45918eebe106915": { "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 } }, "aa8e9ad5e1ce4b84b49c194c61f90820": { "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 } }, "93c35117cea74e5b9de2b871168b7095": { "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": "" } }, "09542f17885d4ce1b6fb5e8682beb6de": { "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 } }, "e1fce70e1a67446982a09c9d4948b48d": { "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": "" } }, "7712b1987ee143fe9ceb6ef13bded85d": { "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 } }, "51f19ba89e5f4d208564f03ff6f2b0da": { "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 }