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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": null,
|
6 |
+
"metadata": {
|
7 |
+
"colab": {
|
8 |
+
"base_uri": "https://localhost:8080/"
|
9 |
+
},
|
10 |
+
"id": "Rs8s9i7fVhAB",
|
11 |
+
"outputId": "672c9f33-75eb-4a20-a36d-fa9be2110cc6"
|
12 |
+
},
|
13 |
+
"outputs": [
|
14 |
+
{
|
15 |
+
"output_type": "stream",
|
16 |
+
"name": "stdout",
|
17 |
+
"text": [
|
18 |
+
"Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.35.0)\n",
|
19 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.13.1)\n",
|
20 |
+
"Requirement already satisfied: huggingface-hub<1.0,>=0.16.4 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.17.3)\n",
|
21 |
+
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.23.5)\n",
|
22 |
+
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.2)\n",
|
23 |
+
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0.1)\n",
|
24 |
+
"Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2023.6.3)\n",
|
25 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.31.0)\n",
|
26 |
+
"Requirement already satisfied: tokenizers<0.15,>=0.14 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.14.1)\n",
|
27 |
+
"Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.4.0)\n",
|
28 |
+
"Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers) (4.66.1)\n",
|
29 |
+
"Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.16.4->transformers) (2023.6.0)\n",
|
30 |
+
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.16.4->transformers) (4.5.0)\n",
|
31 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.3.2)\n",
|
32 |
+
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4)\n",
|
33 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2.0.7)\n",
|
34 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2023.7.22)\n"
|
35 |
+
]
|
36 |
+
}
|
37 |
+
],
|
38 |
+
"source": [
|
39 |
+
"!pip install transformers\n"
|
40 |
+
]
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"cell_type": "code",
|
44 |
+
"execution_count": null,
|
45 |
+
"metadata": {
|
46 |
+
"colab": {
|
47 |
+
"base_uri": "https://localhost:8080/"
|
48 |
+
},
|
49 |
+
"id": "r582IJ5IXD2N",
|
50 |
+
"outputId": "daabcaad-305d-4d85-d7ab-52fc0d816f72"
|
51 |
+
},
|
52 |
+
"outputs": [
|
53 |
+
{
|
54 |
+
"output_type": "stream",
|
55 |
+
"name": "stdout",
|
56 |
+
"text": [
|
57 |
+
"Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (0.1.99)\n"
|
58 |
+
]
|
59 |
+
}
|
60 |
+
],
|
61 |
+
"source": [
|
62 |
+
"!pip install sentencepiece\n"
|
63 |
+
]
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"cell_type": "code",
|
67 |
+
"execution_count": null,
|
68 |
+
"metadata": {
|
69 |
+
"colab": {
|
70 |
+
"base_uri": "https://localhost:8080/"
|
71 |
+
},
|
72 |
+
"id": "JnKRfdMEWVGO",
|
73 |
+
"outputId": "575d83ff-4cb3-43a0-c2b5-4b8931b0ba6c"
|
74 |
+
},
|
75 |
+
"outputs": [
|
76 |
+
{
|
77 |
+
"output_type": "stream",
|
78 |
+
"name": "stdout",
|
79 |
+
"text": [
|
80 |
+
"Requirement already satisfied: pytorch_lightning in /usr/local/lib/python3.10/dist-packages (2.1.1)\n",
|
81 |
+
"Requirement already satisfied: numpy>=1.17.2 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (1.23.5)\n",
|
82 |
+
"Requirement already satisfied: torch>=1.12.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (2.1.0+cu118)\n",
|
83 |
+
"Requirement already satisfied: tqdm>=4.57.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (4.66.1)\n",
|
84 |
+
"Requirement already satisfied: PyYAML>=5.4 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (6.0.1)\n",
|
85 |
+
"Requirement already satisfied: fsspec[http]>2021.06.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (2023.6.0)\n",
|
86 |
+
"Requirement already satisfied: torchmetrics>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (1.2.0)\n",
|
87 |
+
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (23.2)\n",
|
88 |
+
"Requirement already satisfied: typing-extensions>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (4.5.0)\n",
|
89 |
+
"Requirement already satisfied: lightning-utilities>=0.8.0 in /usr/local/lib/python3.10/dist-packages (from pytorch_lightning) (0.9.0)\n",
|
90 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from fsspec[http]>2021.06.0->pytorch_lightning) (2.31.0)\n",
|
91 |
+
"Requirement already satisfied: aiohttp!=4.0.0a0,!=4.0.0a1 in /usr/local/lib/python3.10/dist-packages (from fsspec[http]>2021.06.0->pytorch_lightning) (3.8.6)\n",
|
92 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.12.0->pytorch_lightning) (3.13.1)\n",
|
93 |
+
"Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.12.0->pytorch_lightning) (1.12)\n",
|
94 |
+
"Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.12.0->pytorch_lightning) (3.2.1)\n",
|
95 |
+
"Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.12.0->pytorch_lightning) (3.1.2)\n",
|
96 |
+
"Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.12.0->pytorch_lightning) (2.1.0)\n",
|
97 |
+
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (23.1.0)\n",
|
98 |
+
"Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (3.3.2)\n",
|
99 |
+
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (6.0.4)\n",
|
100 |
+
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (4.0.3)\n",
|
101 |
+
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (1.9.2)\n",
|
102 |
+
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (1.4.0)\n",
|
103 |
+
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>2021.06.0->pytorch_lightning) (1.3.1)\n",
|
104 |
+
"Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.12.0->pytorch_lightning) (2.1.3)\n",
|
105 |
+
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->fsspec[http]>2021.06.0->pytorch_lightning) (3.4)\n",
|
106 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->fsspec[http]>2021.06.0->pytorch_lightning) (2.0.7)\n",
|
107 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->fsspec[http]>2021.06.0->pytorch_lightning) (2023.7.22)\n",
|
108 |
+
"Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.12.0->pytorch_lightning) (1.3.0)\n"
|
109 |
+
]
|
110 |
+
}
|
111 |
+
],
|
112 |
+
"source": [
|
113 |
+
"!pip install pytorch_lightning\n"
|
114 |
+
]
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"cell_type": "code",
|
118 |
+
"execution_count": null,
|
119 |
+
"metadata": {
|
120 |
+
"colab": {
|
121 |
+
"base_uri": "https://localhost:8080/"
|
122 |
+
},
|
123 |
+
"id": "AYPbxPPyUmTX",
|
124 |
+
"outputId": "8ab7a0f4-caa4-434b-d52a-0e8606af8ef4"
|
125 |
+
},
|
126 |
+
"outputs": [
|
127 |
+
{
|
128 |
+
"output_type": "stream",
|
129 |
+
"name": "stderr",
|
130 |
+
"text": [
|
131 |
+
"INFO:lightning_fabric.utilities.seed:Seed set to 100\n"
|
132 |
+
]
|
133 |
+
}
|
134 |
+
],
|
135 |
+
"source": [
|
136 |
+
"from sklearn.model_selection import train_test_split\n",
|
137 |
+
"\n",
|
138 |
+
"from transformers import T5Tokenizer, T5ForConditionalGeneration\n",
|
139 |
+
"\n",
|
140 |
+
"from transformers import AdamW\n",
|
141 |
+
"import pandas as pd\n",
|
142 |
+
"import torch\n",
|
143 |
+
"import pytorch_lightning as pl\n",
|
144 |
+
"from pytorch_lightning.callbacks import ModelCheckpoint\n",
|
145 |
+
"from torch.nn.utils.rnn import pad_sequence\n",
|
146 |
+
"# from torch.utils.data import Dataset, DataLoader, random_split, RandomSampler, SequentialSampler\n",
|
147 |
+
"\n",
|
148 |
+
"pl.seed_everything(100)\n",
|
149 |
+
"import warnings\n",
|
150 |
+
"warnings.filterwarnings(\"ignore\")"
|
151 |
+
]
|
152 |
+
},
|
153 |
+
{
|
154 |
+
"cell_type": "code",
|
155 |
+
"execution_count": null,
|
156 |
+
"metadata": {
|
157 |
+
"id": "2KetQ8LzU5Xw"
|
158 |
+
},
|
159 |
+
"outputs": [],
|
160 |
+
"source": [
|
161 |
+
"data = pd.read_csv(\"Conversation.csv\")\n",
|
162 |
+
"data.drop(columns=['Unnamed: 0'],inplace=True)"
|
163 |
+
]
|
164 |
+
},
|
165 |
+
{
|
166 |
+
"cell_type": "code",
|
167 |
+
"execution_count": null,
|
168 |
+
"metadata": {
|
169 |
+
"colab": {
|
170 |
+
"base_uri": "https://localhost:8080/"
|
171 |
+
},
|
172 |
+
"id": "XbgyKcoEWtJu",
|
173 |
+
"outputId": "3b0b2716-7b34-40d9-98a0-bc27d4b4f640"
|
174 |
+
},
|
175 |
+
"outputs": [
|
176 |
+
{
|
177 |
+
"output_type": "stream",
|
178 |
+
"name": "stdout",
|
179 |
+
"text": [
|
180 |
+
"No of rows: 3725\n"
|
181 |
+
]
|
182 |
+
}
|
183 |
+
],
|
184 |
+
"source": [
|
185 |
+
"print(\"No of rows:\" ,data.shape[0])"
|
186 |
+
]
|
187 |
+
},
|
188 |
+
{
|
189 |
+
"cell_type": "code",
|
190 |
+
"execution_count": null,
|
191 |
+
"metadata": {
|
192 |
+
"id": "dRgL6Pp-WxQF"
|
193 |
+
},
|
194 |
+
"outputs": [],
|
195 |
+
"source": [
|
196 |
+
"DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n",
|
197 |
+
"INPUT_MAX_LEN = 128 #input length\n",
|
198 |
+
"OUTPUT_MAX_LEN = 128 # output length\n",
|
199 |
+
"TRAIN_BATCH_SIZE = 8 # batch size of training\n",
|
200 |
+
"VAL_BATCH_SIZE = 2 # batch size for validation\n",
|
201 |
+
"EPOCHS = 5 # number of epoch"
|
202 |
+
]
|
203 |
+
},
|
204 |
+
{
|
205 |
+
"cell_type": "code",
|
206 |
+
"execution_count": null,
|
207 |
+
"metadata": {
|
208 |
+
"colab": {
|
209 |
+
"base_uri": "https://localhost:8080/",
|
210 |
+
"height": 170,
|
211 |
+
"referenced_widgets": [
|
212 |
+
"17d569c96c5c4d5a8495a3a294cd5794",
|
213 |
+
"bf6a0e76a7a547ad9a1ae4ff5d41cde1",
|
214 |
+
"8d5456a15f2f4a1d942ffec17d2bbf3b",
|
215 |
+
"66df9eab44fd46158ce66301d52442ee",
|
216 |
+
"d95d821cdad34aefa6ef9da901b635ae",
|
217 |
+
"b0bfdaace6db44b18a0c1f4678602e44",
|
218 |
+
"2cccb4979aae4088b3b3b5ed6535fa8f",
|
219 |
+
"10da814e6b7b48698d92abecf1a2c8d2",
|
220 |
+
"76d4b0ce92f14f5086e4d2dcb4838bd9",
|
221 |
+
"76db35992a0148fa8f34912b140f32ad",
|
222 |
+
"46b8f2c5ac19472e8d1cab734c60bea6",
|
223 |
+
"a2a4d1c023c840eb8eecc9db984c51cf",
|
224 |
+
"ea89580721f246a38162273eae662afe",
|
225 |
+
"20b43a93655c49558787cceac269707e",
|
226 |
+
"63404a1a221148f19fb6b539107edea2",
|
227 |
+
"97aa2fa33c7e4d8780dc59a6627ec551",
|
228 |
+
"1bca6293972b45e4a7d48704012c794f",
|
229 |
+
"840cbab88ba74a4984208be560586391",
|
230 |
+
"73cf23dc9260414e9395e9283ebb22a0",
|
231 |
+
"c6a6196e392f4b28a47eeb76719a9f5e",
|
232 |
+
"7fa433925c7d4f2085032ef34f1ebea9",
|
233 |
+
"4321e66ed9164b0e8a3619497f19e600",
|
234 |
+
"94b74dee162747e2b74e3d49b8a6eeee",
|
235 |
+
"98471106a9884b92aff88d05b8b59e4b",
|
236 |
+
"db956786289b4934bcd8644ceeeb1629",
|
237 |
+
"af82522ec6c74954a36947729d267bc9",
|
238 |
+
"911e513226c84a289a63e6d76b731b09",
|
239 |
+
"7fd9b2a289ab45089ab77e089af96879",
|
240 |
+
"887214c42410453baeb2e258a1239966",
|
241 |
+
"0f67828b2fdd4ebaa7cb7a4c7b321244",
|
242 |
+
"8aad0bc9ed274cac874e24a3c45d2979",
|
243 |
+
"013396e9dae14f2bbf3e729b69a566a7",
|
244 |
+
"c4d7492e8ce344dc91bcadc7b65b3870"
|
245 |
+
]
|
246 |
+
},
|
247 |
+
"id": "YUHIA3_PW19e",
|
248 |
+
"outputId": "42c5a216-116b-47e9-ee16-bf0210e12e91"
|
249 |
+
},
|
250 |
+
"outputs": [
|
251 |
+
{
|
252 |
+
"output_type": "display_data",
|
253 |
+
"data": {
|
254 |
+
"text/plain": [
|
255 |
+
"Downloading (…)ve/main/spiece.model: 0%| | 0.00/792k [00:00<?, ?B/s]"
|
256 |
+
],
|
257 |
+
"application/vnd.jupyter.widget-view+json": {
|
258 |
+
"version_major": 2,
|
259 |
+
"version_minor": 0,
|
260 |
+
"model_id": "17d569c96c5c4d5a8495a3a294cd5794"
|
261 |
+
}
|
262 |
+
},
|
263 |
+
"metadata": {}
|
264 |
+
},
|
265 |
+
{
|
266 |
+
"output_type": "display_data",
|
267 |
+
"data": {
|
268 |
+
"text/plain": [
|
269 |
+
"Downloading (…)/main/tokenizer.json: 0%| | 0.00/1.39M [00:00<?, ?B/s]"
|
270 |
+
],
|
271 |
+
"application/vnd.jupyter.widget-view+json": {
|
272 |
+
"version_major": 2,
|
273 |
+
"version_minor": 0,
|
274 |
+
"model_id": "a2a4d1c023c840eb8eecc9db984c51cf"
|
275 |
+
}
|
276 |
+
},
|
277 |
+
"metadata": {}
|
278 |
+
},
|
279 |
+
{
|
280 |
+
"output_type": "display_data",
|
281 |
+
"data": {
|
282 |
+
"text/plain": [
|
283 |
+
"Downloading (…)lve/main/config.json: 0%| | 0.00/1.21k [00:00<?, ?B/s]"
|
284 |
+
],
|
285 |
+
"application/vnd.jupyter.widget-view+json": {
|
286 |
+
"version_major": 2,
|
287 |
+
"version_minor": 0,
|
288 |
+
"model_id": "94b74dee162747e2b74e3d49b8a6eeee"
|
289 |
+
}
|
290 |
+
},
|
291 |
+
"metadata": {}
|
292 |
+
},
|
293 |
+
{
|
294 |
+
"output_type": "stream",
|
295 |
+
"name": "stderr",
|
296 |
+
"text": [
|
297 |
+
"You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565\n",
|
298 |
+
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"
|
299 |
+
]
|
300 |
+
}
|
301 |
+
],
|
302 |
+
"source": [
|
303 |
+
"MODEL_NAME = \"t5-base\"\n",
|
304 |
+
"tokenizer = T5Tokenizer.from_pretrained(MODEL_NAME, model_max_length=512)"
|
305 |
+
]
|
306 |
+
},
|
307 |
+
{
|
308 |
+
"cell_type": "code",
|
309 |
+
"execution_count": null,
|
310 |
+
"metadata": {
|
311 |
+
"id": "l7NRrwnOXhv1"
|
312 |
+
},
|
313 |
+
"outputs": [],
|
314 |
+
"source": [
|
315 |
+
"text = \"Hello, how are you today?\" # assume the text that is to be tokenized\n",
|
316 |
+
"\n",
|
317 |
+
"input_tokenize = tokenizer(\n",
|
318 |
+
" text,\n",
|
319 |
+
" add_special_tokens=True, #Add Special tokens like [CLS] and [SEP]\n",
|
320 |
+
" max_length=128,\n",
|
321 |
+
" padding = 'max_length', #for padding to max_length for equal sequence length\n",
|
322 |
+
" truncation = True, #truncate the text if it is greater than max_length\n",
|
323 |
+
" return_attention_mask=True, #will return attention mask\n",
|
324 |
+
" return_tensors=\"pt\" #return tensor formate\n",
|
325 |
+
" )"
|
326 |
+
]
|
327 |
+
},
|
328 |
+
{
|
329 |
+
"cell_type": "code",
|
330 |
+
"execution_count": null,
|
331 |
+
"metadata": {
|
332 |
+
"colab": {
|
333 |
+
"base_uri": "https://localhost:8080/"
|
334 |
+
},
|
335 |
+
"id": "Ibq5SgJ5Xkr1",
|
336 |
+
"outputId": "cbc3b943-3d12-49d1-af59-b72184e759ff"
|
337 |
+
},
|
338 |
+
"outputs": [
|
339 |
+
{
|
340 |
+
"output_type": "stream",
|
341 |
+
"name": "stdout",
|
342 |
+
"text": [
|
343 |
+
"input_ids: tensor([8774, 6, 149, 33, 25, 469, 58, 1, 0, 0, 0, 0,\n",
|
344 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
345 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
346 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
347 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
348 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
349 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
350 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
351 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
352 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
353 |
+
" 0, 0, 0, 0, 0, 0, 0, 0])\n",
|
354 |
+
"-----------------------------------------------------------------------------\n",
|
355 |
+
"Attention Mask: tensor([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
356 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
357 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
358 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
359 |
+
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
|
360 |
+
" 0, 0, 0, 0, 0, 0, 0, 0])\n"
|
361 |
+
]
|
362 |
+
}
|
363 |
+
],
|
364 |
+
"source": [
|
365 |
+
"print(\"input_ids: \", input_tokenize['input_ids'].flatten())\n",
|
366 |
+
"print(\"-----------------------------------------------------------------------------\")\n",
|
367 |
+
"print(\"Attention Mask: \", input_tokenize['attention_mask'].flatten())"
|
368 |
+
]
|
369 |
+
},
|
370 |
+
{
|
371 |
+
"cell_type": "code",
|
372 |
+
"execution_count": null,
|
373 |
+
"metadata": {
|
374 |
+
"id": "aPrWy2YdXpsx"
|
375 |
+
},
|
376 |
+
"outputs": [],
|
377 |
+
"source": [
|
378 |
+
"class T5Dataset:\n",
|
379 |
+
"\n",
|
380 |
+
" def __init__(self,question,answer):\n",
|
381 |
+
"\n",
|
382 |
+
" self.question = question\n",
|
383 |
+
" self.answer = answer\n",
|
384 |
+
" self.tokenizer = tokenizer\n",
|
385 |
+
" self.input_max_len = INPUT_MAX_LEN\n",
|
386 |
+
" self.output_max_len = OUTPUT_MAX_LEN\n",
|
387 |
+
"\n",
|
388 |
+
" def __len__(self): # This method retrives the number of item from the dataset\n",
|
389 |
+
" return len(self.question)\n",
|
390 |
+
"\n",
|
391 |
+
" def __getitem__(self,item): # This method retrieves the item at the specified index item.\n",
|
392 |
+
"\n",
|
393 |
+
" question = str(self.question[item])\n",
|
394 |
+
" question = ''.join(question.split())\n",
|
395 |
+
"\n",
|
396 |
+
" answer = str(self.answer[item])\n",
|
397 |
+
" answer = ''.join(answer.split())\n",
|
398 |
+
"\n",
|
399 |
+
" input_tokenize = self.tokenizer(\n",
|
400 |
+
" question,\n",
|
401 |
+
" add_special_tokens=True,\n",
|
402 |
+
" max_length=self.input_max_len,\n",
|
403 |
+
" padding = 'max_length',\n",
|
404 |
+
" truncation = True,\n",
|
405 |
+
" return_attention_mask=True,\n",
|
406 |
+
" return_tensors=\"pt\"\n",
|
407 |
+
" )\n",
|
408 |
+
" output_tokenize = self.tokenizer(\n",
|
409 |
+
" answer,\n",
|
410 |
+
" add_special_tokens=True,\n",
|
411 |
+
" max_length=self.output_max_len,\n",
|
412 |
+
" padding = 'max_length',\n",
|
413 |
+
" truncation = True,\n",
|
414 |
+
" return_attention_mask=True,\n",
|
415 |
+
" return_tensors=\"pt\"\n",
|
416 |
+
"\n",
|
417 |
+
" )\n",
|
418 |
+
"\n",
|
419 |
+
"\n",
|
420 |
+
" input_ids = input_tokenize[\"input_ids\"].flatten()\n",
|
421 |
+
" attention_mask = input_tokenize[\"attention_mask\"].flatten()\n",
|
422 |
+
" labels = output_tokenize['input_ids'].flatten()\n",
|
423 |
+
"\n",
|
424 |
+
" out = {\n",
|
425 |
+
" 'question':question,\n",
|
426 |
+
" 'answer':answer,\n",
|
427 |
+
" 'input_ids': input_ids,\n",
|
428 |
+
" 'attention_mask':attention_mask,\n",
|
429 |
+
" 'target':labels\n",
|
430 |
+
" }\n",
|
431 |
+
"\n",
|
432 |
+
" return out"
|
433 |
+
]
|
434 |
+
},
|
435 |
+
{
|
436 |
+
"cell_type": "code",
|
437 |
+
"execution_count": null,
|
438 |
+
"metadata": {
|
439 |
+
"id": "KiXUygzPXxDL"
|
440 |
+
},
|
441 |
+
"outputs": [],
|
442 |
+
"source": [
|
443 |
+
"class T5DataLoad(pl.LightningDataModule):\n",
|
444 |
+
"\n",
|
445 |
+
" def __init__(self,df_train,df_test):\n",
|
446 |
+
" super().__init__()\n",
|
447 |
+
" self.df_train = df_train\n",
|
448 |
+
" self.df_test = df_test\n",
|
449 |
+
" self.tokenizer = tokenizer\n",
|
450 |
+
" self.input_max_len = INPUT_MAX_LEN\n",
|
451 |
+
" self.out_max_len = OUTPUT_MAX_LEN\n",
|
452 |
+
"\n",
|
453 |
+
" def setup(self, stage=None):\n",
|
454 |
+
"\n",
|
455 |
+
" self.train_data = T5Dataset(\n",
|
456 |
+
" question = self.df_train.question.values,\n",
|
457 |
+
" answer = self.df_train.answer.values\n",
|
458 |
+
" )\n",
|
459 |
+
"\n",
|
460 |
+
" self.valid_data = T5Dataset(\n",
|
461 |
+
" question = self.df_test.question.values,\n",
|
462 |
+
" answer = self.df_test.answer.values\n",
|
463 |
+
" )\n",
|
464 |
+
" def train_dataloader(self):\n",
|
465 |
+
" return torch.utils.data.DataLoader(\n",
|
466 |
+
" self.train_data,\n",
|
467 |
+
" batch_size= TRAIN_BATCH_SIZE,\n",
|
468 |
+
" shuffle=True,\n",
|
469 |
+
" num_workers=2\n",
|
470 |
+
" )\n",
|
471 |
+
" def val_dataloader(self):\n",
|
472 |
+
" return torch.utils.data.DataLoader(\n",
|
473 |
+
" self.valid_data,\n",
|
474 |
+
" batch_size= VAL_BATCH_SIZE,\n",
|
475 |
+
" num_workers = 2\n",
|
476 |
+
" )"
|
477 |
+
]
|
478 |
+
},
|
479 |
+
{
|
480 |
+
"cell_type": "code",
|
481 |
+
"execution_count": null,
|
482 |
+
"metadata": {
|
483 |
+
"id": "-9nt58JwX3wr"
|
484 |
+
},
|
485 |
+
"outputs": [],
|
486 |
+
"source": [
|
487 |
+
"class T5Model(pl.LightningModule):\n",
|
488 |
+
"\n",
|
489 |
+
" def __init__(self):\n",
|
490 |
+
" super().__init__()\n",
|
491 |
+
" self.model = T5ForConditionalGeneration.from_pretrained(MODEL_NAME, return_dict = True)\n",
|
492 |
+
"\n",
|
493 |
+
"\n",
|
494 |
+
" def forward(self, input_ids, attention_mask, labels=None):\n",
|
495 |
+
"\n",
|
496 |
+
" output = self.model(\n",
|
497 |
+
" input_ids=input_ids,\n",
|
498 |
+
" attention_mask=attention_mask,\n",
|
499 |
+
" labels=labels\n",
|
500 |
+
" )\n",
|
501 |
+
" return output.loss, output.logits\n",
|
502 |
+
"\n",
|
503 |
+
" def training_step(self, batch, batch_idx):\n",
|
504 |
+
"\n",
|
505 |
+
" input_ids = batch[\"input_ids\"]\n",
|
506 |
+
" attention_mask = batch[\"attention_mask\"]\n",
|
507 |
+
" labels= batch[\"target\"]\n",
|
508 |
+
" loss, logits = self(input_ids , attention_mask, labels)\n",
|
509 |
+
"\n",
|
510 |
+
"\n",
|
511 |
+
" self.log(\"train_loss\", loss, prog_bar=True, logger=True)\n",
|
512 |
+
"\n",
|
513 |
+
" return {'loss': loss}\n",
|
514 |
+
"\n",
|
515 |
+
" def validation_step(self, batch, batch_idx):\n",
|
516 |
+
" input_ids = batch[\"input_ids\"]\n",
|
517 |
+
" attention_mask = batch[\"attention_mask\"]\n",
|
518 |
+
" labels= batch[\"target\"]\n",
|
519 |
+
" loss, logits = self(input_ids, attention_mask, labels)\n",
|
520 |
+
"\n",
|
521 |
+
" self.log(\"val_loss\", loss, prog_bar=True, logger=True)\n",
|
522 |
+
"\n",
|
523 |
+
" return {'val_loss': loss}\n",
|
524 |
+
"\n",
|
525 |
+
" def configure_optimizers(self):\n",
|
526 |
+
" return AdamW(self.parameters(), lr=0.0001)"
|
527 |
+
]
|
528 |
+
},
|
529 |
+
{
|
530 |
+
"cell_type": "code",
|
531 |
+
"execution_count": null,
|
532 |
+
"metadata": {
|
533 |
+
"colab": {
|
534 |
+
"base_uri": "https://localhost:8080/",
|
535 |
+
"height": 1000
|
536 |
+
},
|
537 |
+
"id": "-SwnA1q1Z2i8",
|
538 |
+
"outputId": "3db69601-6f3d-438f-e472-59da7e20e944"
|
539 |
+
},
|
540 |
+
"outputs": [
|
541 |
+
{
|
542 |
+
"output_type": "stream",
|
543 |
+
"name": "stdout",
|
544 |
+
"text": [
|
545 |
+
"Looking in links: https://download.pytorch.org/whl/cu102/torch_stable.html\n",
|
546 |
+
"\u001b[31mERROR: Could not find a version that satisfies the requirement torch==1.9.0+cu102 (from versions: 1.11.0, 1.11.0+cu102, 1.12.0, 1.12.0+cu102, 1.12.1, 1.12.1+cu102, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0)\u001b[0m\u001b[31m\n",
|
547 |
+
"\u001b[0m\u001b[31mERROR: No matching distribution found for torch==1.9.0+cu102\u001b[0m\u001b[31m\n",
|
548 |
+
"\u001b[0mCollecting pytorch-lightning==1.4.9\n",
|
549 |
+
" Downloading pytorch_lightning-1.4.9-py3-none-any.whl (925 kB)\n",
|
550 |
+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m925.8/925.8 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
551 |
+
"\u001b[?25hRequirement already satisfied: numpy>=1.17.2 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (1.23.5)\n",
|
552 |
+
"Requirement already satisfied: torch>=1.6 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (2.1.0+cu118)\n",
|
553 |
+
"Requirement already satisfied: future>=0.17.1 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (0.18.3)\n",
|
554 |
+
"Requirement already satisfied: tqdm>=4.41.0 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (4.66.1)\n",
|
555 |
+
"Requirement already satisfied: PyYAML>=5.1 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (6.0.1)\n",
|
556 |
+
"Requirement already satisfied: fsspec[http]!=2021.06.0,>=2021.05.0 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (2023.6.0)\n",
|
557 |
+
"Requirement already satisfied: tensorboard>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (2.14.1)\n",
|
558 |
+
"Requirement already satisfied: torchmetrics>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (1.2.0)\n",
|
559 |
+
"Collecting pyDeprecate==0.3.1 (from pytorch-lightning==1.4.9)\n",
|
560 |
+
" Downloading pyDeprecate-0.3.1-py3-none-any.whl (10 kB)\n",
|
561 |
+
"Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (23.2)\n",
|
562 |
+
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from pytorch-lightning==1.4.9) (4.5.0)\n",
|
563 |
+
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (2.31.0)\n",
|
564 |
+
"Requirement already satisfied: aiohttp!=4.0.0a0,!=4.0.0a1 in /usr/local/lib/python3.10/dist-packages (from fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (3.8.6)\n",
|
565 |
+
"Requirement already satisfied: absl-py>=0.4 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (1.4.0)\n",
|
566 |
+
"Requirement already satisfied: grpcio>=1.48.2 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (1.59.2)\n",
|
567 |
+
"Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (2.17.3)\n",
|
568 |
+
"Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (1.0.0)\n",
|
569 |
+
"Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (3.5.1)\n",
|
570 |
+
"Requirement already satisfied: protobuf>=3.19.6 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (3.20.3)\n",
|
571 |
+
"Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (67.7.2)\n",
|
572 |
+
"Requirement already satisfied: six>1.9 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (1.16.0)\n",
|
573 |
+
"Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (0.7.2)\n",
|
574 |
+
"Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from tensorboard>=2.2.0->pytorch-lightning==1.4.9) (3.0.1)\n",
|
575 |
+
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.6->pytorch-lightning==1.4.9) (3.13.1)\n",
|
576 |
+
"Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.6->pytorch-lightning==1.4.9) (1.12)\n",
|
577 |
+
"Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.6->pytorch-lightning==1.4.9) (3.2.1)\n",
|
578 |
+
"Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6->pytorch-lightning==1.4.9) (3.1.2)\n",
|
579 |
+
"Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6->pytorch-lightning==1.4.9) (2.1.0)\n",
|
580 |
+
"Requirement already satisfied: lightning-utilities>=0.8.0 in /usr/local/lib/python3.10/dist-packages (from torchmetrics>=0.4.0->pytorch-lightning==1.4.9) (0.9.0)\n",
|
581 |
+
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (23.1.0)\n",
|
582 |
+
"Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (3.3.2)\n",
|
583 |
+
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (6.0.4)\n",
|
584 |
+
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (4.0.3)\n",
|
585 |
+
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (1.9.2)\n",
|
586 |
+
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (1.4.0)\n",
|
587 |
+
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (1.3.1)\n",
|
588 |
+
"Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (5.3.2)\n",
|
589 |
+
"Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (0.3.0)\n",
|
590 |
+
"Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (4.9)\n",
|
591 |
+
"Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (1.3.1)\n",
|
592 |
+
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (3.4)\n",
|
593 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (2.0.7)\n",
|
594 |
+
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->fsspec[http]!=2021.06.0,>=2021.05.0->pytorch-lightning==1.4.9) (2023.7.22)\n",
|
595 |
+
"Requirement already satisfied: MarkupSafe>=2.1.1 in /usr/local/lib/python3.10/dist-packages (from werkzeug>=1.0.1->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (2.1.3)\n",
|
596 |
+
"Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.6->pytorch-lightning==1.4.9) (1.3.0)\n",
|
597 |
+
"Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (0.5.0)\n",
|
598 |
+
"Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard>=2.2.0->pytorch-lightning==1.4.9) (3.2.2)\n",
|
599 |
+
"Installing collected packages: pyDeprecate, pytorch-lightning\n",
|
600 |
+
" Attempting uninstall: pytorch-lightning\n",
|
601 |
+
" Found existing installation: pytorch-lightning 2.1.1\n",
|
602 |
+
" Uninstalling pytorch-lightning-2.1.1:\n",
|
603 |
+
" Successfully uninstalled pytorch-lightning-2.1.1\n",
|
604 |
+
"Successfully installed pyDeprecate-0.3.1 pytorch-lightning-1.4.9\n"
|
605 |
+
]
|
606 |
+
},
|
607 |
+
{
|
608 |
+
"output_type": "display_data",
|
609 |
+
"data": {
|
610 |
+
"application/vnd.colab-display-data+json": {
|
611 |
+
"pip_warning": {
|
612 |
+
"packages": [
|
613 |
+
"pytorch_lightning"
|
614 |
+
]
|
615 |
+
}
|
616 |
+
}
|
617 |
+
},
|
618 |
+
"metadata": {}
|
619 |
+
}
|
620 |
+
],
|
621 |
+
"source": [
|
622 |
+
"!pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0+cu102 -f https://download.pytorch.org/whl/cu102/torch_stable.html\n",
|
623 |
+
"!pip install pytorch-lightning==1.4.9\n"
|
624 |
+
]
|
625 |
+
},
|
626 |
+
{
|
627 |
+
"cell_type": "code",
|
628 |
+
"execution_count": null,
|
629 |
+
"metadata": {
|
630 |
+
"colab": {
|
631 |
+
"base_uri": "https://localhost:8080/",
|
632 |
+
"height": 372
|
633 |
+
},
|
634 |
+
"id": "ic3a_2MwX_cE",
|
635 |
+
"outputId": "561cc9ae-5960-4cac-b946-77bde7a7e9de"
|
636 |
+
},
|
637 |
+
"outputs": [
|
638 |
+
{
|
639 |
+
"output_type": "error",
|
640 |
+
"ename": "TypeError",
|
641 |
+
"evalue": "ignored",
|
642 |
+
"traceback": [
|
643 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
644 |
+
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
|
645 |
+
"\u001b[0;32m<ipython-input-21-7142c2beb2c5>\u001b[0m in \u001b[0;36m<cell line: 25>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0mtrainer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfit\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdataload\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 25\u001b[0;31m \u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
646 |
+
"\u001b[0;32m<ipython-input-21-7142c2beb2c5>\u001b[0m in \u001b[0;36mrun\u001b[0;34m()\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0mmode\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"min\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 16\u001b[0m )\n\u001b[0;32m---> 17\u001b[0;31m trainer = pl.Trainer(\n\u001b[0m\u001b[1;32m 18\u001b[0m \u001b[0mcallbacks\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcheckpoint\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;31m# Using a list of callbacks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0mmax_epochs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
647 |
+
"\u001b[0;32m/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/argparse.py\u001b[0m in \u001b[0;36minsert_env_defaults\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[0;31m# We always set to True, regardless of the default value.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 69\u001b[0m \u001b[0;31m# Users must pass False directly, but when passing nothing True is assumed.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 70\u001b[0;31m \u001b[0;31m# i.e. the only way to disable something that defaults to True is to use the long form:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 71\u001b[0m \u001b[0;31m# \"--a_default_true_arg False\" becomes False, while \"--a_default_false_arg\" becomes None,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 72\u001b[0m \u001b[0;31m# which then becomes True here.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
648 |
+
"\u001b[0;31mTypeError\u001b[0m: Trainer.__init__() got an unexpected keyword argument 'gpus'"
|
649 |
+
]
|
650 |
+
}
|
651 |
+
],
|
652 |
+
"source": [
|
653 |
+
"\n",
|
654 |
+
"def run():\n",
|
655 |
+
" df_train, df_test = train_test_split(data, test_size=0.2, random_state=100)\n",
|
656 |
+
" dataload = T5DataLoad(df_train, df_test)\n",
|
657 |
+
" dataload.setup()\n",
|
658 |
+
" device = DEVICE\n",
|
659 |
+
" model = T5Model()\n",
|
660 |
+
" model.to(device)\n",
|
661 |
+
"\n",
|
662 |
+
" checkpoint = ModelCheckpoint(\n",
|
663 |
+
" dirpath=\"/kaggle/working\",\n",
|
664 |
+
" filename='best-model',\n",
|
665 |
+
" save_top_k=2,\n",
|
666 |
+
" verbose=True,\n",
|
667 |
+
" monitor=\"val_loss\",\n",
|
668 |
+
" mode=\"min\"\n",
|
669 |
+
" )\n",
|
670 |
+
" trainer = pl.Trainer(\n",
|
671 |
+
" callbacks=[checkpoint], # Using a list of callbacks\n",
|
672 |
+
" max_epochs=1,\n",
|
673 |
+
" gpus=1,\n",
|
674 |
+
" accelerator=\"gpu\"\n",
|
675 |
+
" )\n",
|
676 |
+
" trainer.fit(model, dataload)\n",
|
677 |
+
"\n",
|
678 |
+
"run()\n"
|
679 |
+
]
|
680 |
+
},
|
681 |
+
{
|
682 |
+
"cell_type": "code",
|
683 |
+
"execution_count": null,
|
684 |
+
"metadata": {
|
685 |
+
"id": "1AvdzfihYJhU"
|
686 |
+
},
|
687 |
+
"outputs": [],
|
688 |
+
"source": [
|
689 |
+
"train_model = T5Model.load_from_checkpoint('/kaggle/working/best-model.ckpt')\n",
|
690 |
+
"train_model.freeze()\n",
|
691 |
+
"\n",
|
692 |
+
"def generate_question(question):\n",
|
693 |
+
"\n",
|
694 |
+
" inputs_encoding = tokenizer(\n",
|
695 |
+
" question,\n",
|
696 |
+
" add_special_tokens=True,\n",
|
697 |
+
" max_length= INPUT_MAX_LEN,\n",
|
698 |
+
" padding = 'max_length',\n",
|
699 |
+
" truncation='only_first',\n",
|
700 |
+
" return_attention_mask=True,\n",
|
701 |
+
" return_tensors=\"pt\"\n",
|
702 |
+
" )\n",
|
703 |
+
"\n",
|
704 |
+
"\n",
|
705 |
+
" generate_ids = train_model.model.generate(\n",
|
706 |
+
" input_ids = inputs_encoding[\"input_ids\"],\n",
|
707 |
+
" attention_mask = inputs_encoding[\"attention_mask\"],\n",
|
708 |
+
" max_length = INPUT_MAX_LEN,\n",
|
709 |
+
" num_beams = 4,\n",
|
710 |
+
" num_return_sequences = 1,\n",
|
711 |
+
" no_repeat_ngram_size=2,\n",
|
712 |
+
" early_stopping=True,\n",
|
713 |
+
" )\n",
|
714 |
+
"\n",
|
715 |
+
" preds = [\n",
|
716 |
+
" tokenizer.decode(gen_id,\n",
|
717 |
+
" skip_special_tokens=True,\n",
|
718 |
+
" clean_up_tokenization_spaces=True)\n",
|
719 |
+
" for gen_id in generate_ids\n",
|
720 |
+
" ]\n",
|
721 |
+
"\n",
|
722 |
+
" return \"\".join(preds)"
|
723 |
+
]
|
724 |
+
},
|
725 |
+
{
|
726 |
+
"cell_type": "code",
|
727 |
+
"execution_count": null,
|
728 |
+
"metadata": {
|
729 |
+
"id": "CJUECi2EaUp5"
|
730 |
+
},
|
731 |
+
"outputs": [],
|
732 |
+
"source": [
|
733 |
+
"ques = \"hi, how are you doing?\"\n",
|
734 |
+
"print(\"Ques: \",ques)\n",
|
735 |
+
"print(\"BOT: \",generate_question(ques))"
|
736 |
+
]
|
737 |
+
},
|
738 |
+
{
|
739 |
+
"cell_type": "code",
|
740 |
+
"execution_count": null,
|
741 |
+
"metadata": {
|
742 |
+
"id": "MUXSpra-rlm5"
|
743 |
+
},
|
744 |
+
"outputs": [],
|
745 |
+
"source": [
|
746 |
+
"ques = \"how's it going?\"\n",
|
747 |
+
"print(\"Ques: \",ques)\n",
|
748 |
+
"print(\"BOT: \",generate_question(ques))"
|
749 |
+
]
|
750 |
+
},
|
751 |
+
{
|
752 |
+
"cell_type": "code",
|
753 |
+
"execution_count": null,
|
754 |
+
"metadata": {
|
755 |
+
"id": "JN6rp0SKrr2g"
|
756 |
+
},
|
757 |
+
"outputs": [],
|
758 |
+
"source": [
|
759 |
+
"ques = \"i heard that it's going to be warm this weekend.\"\n",
|
760 |
+
"print(\"Ques: \",ques)\n",
|
761 |
+
"print(\"BOT: \",generate_question(ques))"
|
762 |
+
]
|
763 |
+
}
|
764 |
+
],
|
765 |
+
"metadata": {
|
766 |
+
"colab": {
|
767 |
+
"provenance": []
|
768 |
+
},
|
769 |
+
"kernelspec": {
|
770 |
+
"display_name": "Python 3",
|
771 |
+
"name": "python3"
|
772 |
+
},
|
773 |
+
"language_info": {
|
774 |
+
"name": "python"
|
775 |
+
},
|
776 |
+
"widgets": {
|
777 |
+
"application/vnd.jupyter.widget-state+json": {
|
778 |
+
"17d569c96c5c4d5a8495a3a294cd5794": {
|
779 |
+
"model_module": "@jupyter-widgets/controls",
|
780 |
+
"model_name": "HBoxModel",
|
781 |
+
"model_module_version": "1.5.0",
|
782 |
+
"state": {
|
783 |
+
"_dom_classes": [],
|
784 |
+
"_model_module": "@jupyter-widgets/controls",
|
785 |
+
"_model_module_version": "1.5.0",
|
786 |
+
"_model_name": "HBoxModel",
|
787 |
+
"_view_count": null,
|
788 |
+
"_view_module": "@jupyter-widgets/controls",
|
789 |
+
"_view_module_version": "1.5.0",
|
790 |
+
"_view_name": "HBoxView",
|
791 |
+
"box_style": "",
|
792 |
+
"children": [
|
793 |
+
"IPY_MODEL_bf6a0e76a7a547ad9a1ae4ff5d41cde1",
|
794 |
+
"IPY_MODEL_8d5456a15f2f4a1d942ffec17d2bbf3b",
|
795 |
+
"IPY_MODEL_66df9eab44fd46158ce66301d52442ee"
|
796 |
+
],
|
797 |
+
"layout": "IPY_MODEL_d95d821cdad34aefa6ef9da901b635ae"
|
798 |
+
}
|
799 |
+
},
|
800 |
+
"bf6a0e76a7a547ad9a1ae4ff5d41cde1": {
|
801 |
+
"model_module": "@jupyter-widgets/controls",
|
802 |
+
"model_name": "HTMLModel",
|
803 |
+
"model_module_version": "1.5.0",
|
804 |
+
"state": {
|
805 |
+
"_dom_classes": [],
|
806 |
+
"_model_module": "@jupyter-widgets/controls",
|
807 |
+
"_model_module_version": "1.5.0",
|
808 |
+
"_model_name": "HTMLModel",
|
809 |
+
"_view_count": null,
|
810 |
+
"_view_module": "@jupyter-widgets/controls",
|
811 |
+
"_view_module_version": "1.5.0",
|
812 |
+
"_view_name": "HTMLView",
|
813 |
+
"description": "",
|
814 |
+
"description_tooltip": null,
|
815 |
+
"layout": "IPY_MODEL_b0bfdaace6db44b18a0c1f4678602e44",
|
816 |
+
"placeholder": "",
|
817 |
+
"style": "IPY_MODEL_2cccb4979aae4088b3b3b5ed6535fa8f",
|
818 |
+
"value": "Downloading (…)ve/main/spiece.model: 100%"
|
819 |
+
}
|
820 |
+
},
|
821 |
+
"8d5456a15f2f4a1d942ffec17d2bbf3b": {
|
822 |
+
"model_module": "@jupyter-widgets/controls",
|
823 |
+
"model_name": "FloatProgressModel",
|
824 |
+
"model_module_version": "1.5.0",
|
825 |
+
"state": {
|
826 |
+
"_dom_classes": [],
|
827 |
+
"_model_module": "@jupyter-widgets/controls",
|
828 |
+
"_model_module_version": "1.5.0",
|
829 |
+
"_model_name": "FloatProgressModel",
|
830 |
+
"_view_count": null,
|
831 |
+
"_view_module": "@jupyter-widgets/controls",
|
832 |
+
"_view_module_version": "1.5.0",
|
833 |
+
"_view_name": "ProgressView",
|
834 |
+
"bar_style": "success",
|
835 |
+
"description": "",
|
836 |
+
"description_tooltip": null,
|
837 |
+
"layout": "IPY_MODEL_10da814e6b7b48698d92abecf1a2c8d2",
|
838 |
+
"max": 791656,
|
839 |
+
"min": 0,
|
840 |
+
"orientation": "horizontal",
|
841 |
+
"style": "IPY_MODEL_76d4b0ce92f14f5086e4d2dcb4838bd9",
|
842 |
+
"value": 791656
|
843 |
+
}
|
844 |
+
},
|
845 |
+
"66df9eab44fd46158ce66301d52442ee": {
|
846 |
+
"model_module": "@jupyter-widgets/controls",
|
847 |
+
"model_name": "HTMLModel",
|
848 |
+
"model_module_version": "1.5.0",
|
849 |
+
"state": {
|
850 |
+
"_dom_classes": [],
|
851 |
+
"_model_module": "@jupyter-widgets/controls",
|
852 |
+
"_model_module_version": "1.5.0",
|
853 |
+
"_model_name": "HTMLModel",
|
854 |
+
"_view_count": null,
|
855 |
+
"_view_module": "@jupyter-widgets/controls",
|
856 |
+
"_view_module_version": "1.5.0",
|
857 |
+
"_view_name": "HTMLView",
|
858 |
+
"description": "",
|
859 |
+
"description_tooltip": null,
|
860 |
+
"layout": "IPY_MODEL_76db35992a0148fa8f34912b140f32ad",
|
861 |
+
"placeholder": "",
|
862 |
+
"style": "IPY_MODEL_46b8f2c5ac19472e8d1cab734c60bea6",
|
863 |
+
"value": " 792k/792k [00:00<00:00, 2.51MB/s]"
|
864 |
+
}
|
865 |
+
},
|
866 |
+
"d95d821cdad34aefa6ef9da901b635ae": {
|
867 |
+
"model_module": "@jupyter-widgets/base",
|
868 |
+
"model_name": "LayoutModel",
|
869 |
+
"model_module_version": "1.2.0",
|
870 |
+
"state": {
|
871 |
+
"_model_module": "@jupyter-widgets/base",
|
872 |
+
"_model_module_version": "1.2.0",
|
873 |
+
"_model_name": "LayoutModel",
|
874 |
+
"_view_count": null,
|
875 |
+
"_view_module": "@jupyter-widgets/base",
|
876 |
+
"_view_module_version": "1.2.0",
|
877 |
+
"_view_name": "LayoutView",
|
878 |
+
"align_content": null,
|
879 |
+
"align_items": null,
|
880 |
+
"align_self": null,
|
881 |
+
"border": null,
|
882 |
+
"bottom": null,
|
883 |
+
"display": null,
|
884 |
+
"flex": null,
|
885 |
+
"flex_flow": null,
|
886 |
+
"grid_area": null,
|
887 |
+
"grid_auto_columns": null,
|
888 |
+
"grid_auto_flow": null,
|
889 |
+
"grid_auto_rows": null,
|
890 |
+
"grid_column": null,
|
891 |
+
"grid_gap": null,
|
892 |
+
"grid_row": null,
|
893 |
+
"grid_template_areas": null,
|
894 |
+
"grid_template_columns": null,
|
895 |
+
"grid_template_rows": null,
|
896 |
+
"height": null,
|
897 |
+
"justify_content": null,
|
898 |
+
"justify_items": null,
|
899 |
+
"left": null,
|
900 |
+
"margin": null,
|
901 |
+
"max_height": null,
|
902 |
+
"max_width": null,
|
903 |
+
"min_height": null,
|
904 |
+
"min_width": null,
|
905 |
+
"object_fit": null,
|
906 |
+
"object_position": null,
|
907 |
+
"order": null,
|
908 |
+
"overflow": null,
|
909 |
+
"overflow_x": null,
|
910 |
+
"overflow_y": null,
|
911 |
+
"padding": null,
|
912 |
+
"right": null,
|
913 |
+
"top": null,
|
914 |
+
"visibility": null,
|
915 |
+
"width": null
|
916 |
+
}
|
917 |
+
},
|
918 |
+
"b0bfdaace6db44b18a0c1f4678602e44": {
|
919 |
+
"model_module": "@jupyter-widgets/base",
|
920 |
+
"model_name": "LayoutModel",
|
921 |
+
"model_module_version": "1.2.0",
|
922 |
+
"state": {
|
923 |
+
"_model_module": "@jupyter-widgets/base",
|
924 |
+
"_model_module_version": "1.2.0",
|
925 |
+
"_model_name": "LayoutModel",
|
926 |
+
"_view_count": null,
|
927 |
+
"_view_module": "@jupyter-widgets/base",
|
928 |
+
"_view_module_version": "1.2.0",
|
929 |
+
"_view_name": "LayoutView",
|
930 |
+
"align_content": null,
|
931 |
+
"align_items": null,
|
932 |
+
"align_self": null,
|
933 |
+
"border": null,
|
934 |
+
"bottom": null,
|
935 |
+
"display": null,
|
936 |
+
"flex": null,
|
937 |
+
"flex_flow": null,
|
938 |
+
"grid_area": null,
|
939 |
+
"grid_auto_columns": null,
|
940 |
+
"grid_auto_flow": null,
|
941 |
+
"grid_auto_rows": null,
|
942 |
+
"grid_column": null,
|
943 |
+
"grid_gap": null,
|
944 |
+
"grid_row": null,
|
945 |
+
"grid_template_areas": null,
|
946 |
+
"grid_template_columns": null,
|
947 |
+
"grid_template_rows": null,
|
948 |
+
"height": null,
|
949 |
+
"justify_content": null,
|
950 |
+
"justify_items": null,
|
951 |
+
"left": null,
|
952 |
+
"margin": null,
|
953 |
+
"max_height": null,
|
954 |
+
"max_width": null,
|
955 |
+
"min_height": null,
|
956 |
+
"min_width": null,
|
957 |
+
"object_fit": null,
|
958 |
+
"object_position": null,
|
959 |
+
"order": null,
|
960 |
+
"overflow": null,
|
961 |
+
"overflow_x": null,
|
962 |
+
"overflow_y": null,
|
963 |
+
"padding": null,
|
964 |
+
"right": null,
|
965 |
+
"top": null,
|
966 |
+
"visibility": null,
|
967 |
+
"width": null
|
968 |
+
}
|
969 |
+
},
|
970 |
+
"2cccb4979aae4088b3b3b5ed6535fa8f": {
|
971 |
+
"model_module": "@jupyter-widgets/controls",
|
972 |
+
"model_name": "DescriptionStyleModel",
|
973 |
+
"model_module_version": "1.5.0",
|
974 |
+
"state": {
|
975 |
+
"_model_module": "@jupyter-widgets/controls",
|
976 |
+
"_model_module_version": "1.5.0",
|
977 |
+
"_model_name": "DescriptionStyleModel",
|
978 |
+
"_view_count": null,
|
979 |
+
"_view_module": "@jupyter-widgets/base",
|
980 |
+
"_view_module_version": "1.2.0",
|
981 |
+
"_view_name": "StyleView",
|
982 |
+
"description_width": ""
|
983 |
+
}
|
984 |
+
},
|
985 |
+
"10da814e6b7b48698d92abecf1a2c8d2": {
|
986 |
+
"model_module": "@jupyter-widgets/base",
|
987 |
+
"model_name": "LayoutModel",
|
988 |
+
"model_module_version": "1.2.0",
|
989 |
+
"state": {
|
990 |
+
"_model_module": "@jupyter-widgets/base",
|
991 |
+
"_model_module_version": "1.2.0",
|
992 |
+
"_model_name": "LayoutModel",
|
993 |
+
"_view_count": null,
|
994 |
+
"_view_module": "@jupyter-widgets/base",
|
995 |
+
"_view_module_version": "1.2.0",
|
996 |
+
"_view_name": "LayoutView",
|
997 |
+
"align_content": null,
|
998 |
+
"align_items": null,
|
999 |
+
"align_self": null,
|
1000 |
+
"border": null,
|
1001 |
+
"bottom": null,
|
1002 |
+
"display": null,
|
1003 |
+
"flex": null,
|
1004 |
+
"flex_flow": null,
|
1005 |
+
"grid_area": null,
|
1006 |
+
"grid_auto_columns": null,
|
1007 |
+
"grid_auto_flow": null,
|
1008 |
+
"grid_auto_rows": null,
|
1009 |
+
"grid_column": null,
|
1010 |
+
"grid_gap": null,
|
1011 |
+
"grid_row": null,
|
1012 |
+
"grid_template_areas": null,
|
1013 |
+
"grid_template_columns": null,
|
1014 |
+
"grid_template_rows": null,
|
1015 |
+
"height": null,
|
1016 |
+
"justify_content": null,
|
1017 |
+
"justify_items": null,
|
1018 |
+
"left": null,
|
1019 |
+
"margin": null,
|
1020 |
+
"max_height": null,
|
1021 |
+
"max_width": null,
|
1022 |
+
"min_height": null,
|
1023 |
+
"min_width": null,
|
1024 |
+
"object_fit": null,
|
1025 |
+
"object_position": null,
|
1026 |
+
"order": null,
|
1027 |
+
"overflow": null,
|
1028 |
+
"overflow_x": null,
|
1029 |
+
"overflow_y": null,
|
1030 |
+
"padding": null,
|
1031 |
+
"right": null,
|
1032 |
+
"top": null,
|
1033 |
+
"visibility": null,
|
1034 |
+
"width": null
|
1035 |
+
}
|
1036 |
+
},
|
1037 |
+
"76d4b0ce92f14f5086e4d2dcb4838bd9": {
|
1038 |
+
"model_module": "@jupyter-widgets/controls",
|
1039 |
+
"model_name": "ProgressStyleModel",
|
1040 |
+
"model_module_version": "1.5.0",
|
1041 |
+
"state": {
|
1042 |
+
"_model_module": "@jupyter-widgets/controls",
|
1043 |
+
"_model_module_version": "1.5.0",
|
1044 |
+
"_model_name": "ProgressStyleModel",
|
1045 |
+
"_view_count": null,
|
1046 |
+
"_view_module": "@jupyter-widgets/base",
|
1047 |
+
"_view_module_version": "1.2.0",
|
1048 |
+
"_view_name": "StyleView",
|
1049 |
+
"bar_color": null,
|
1050 |
+
"description_width": ""
|
1051 |
+
}
|
1052 |
+
},
|
1053 |
+
"76db35992a0148fa8f34912b140f32ad": {
|
1054 |
+
"model_module": "@jupyter-widgets/base",
|
1055 |
+
"model_name": "LayoutModel",
|
1056 |
+
"model_module_version": "1.2.0",
|
1057 |
+
"state": {
|
1058 |
+
"_model_module": "@jupyter-widgets/base",
|
1059 |
+
"_model_module_version": "1.2.0",
|
1060 |
+
"_model_name": "LayoutModel",
|
1061 |
+
"_view_count": null,
|
1062 |
+
"_view_module": "@jupyter-widgets/base",
|
1063 |
+
"_view_module_version": "1.2.0",
|
1064 |
+
"_view_name": "LayoutView",
|
1065 |
+
"align_content": null,
|
1066 |
+
"align_items": null,
|
1067 |
+
"align_self": null,
|
1068 |
+
"border": null,
|
1069 |
+
"bottom": null,
|
1070 |
+
"display": null,
|
1071 |
+
"flex": null,
|
1072 |
+
"flex_flow": null,
|
1073 |
+
"grid_area": null,
|
1074 |
+
"grid_auto_columns": null,
|
1075 |
+
"grid_auto_flow": null,
|
1076 |
+
"grid_auto_rows": null,
|
1077 |
+
"grid_column": null,
|
1078 |
+
"grid_gap": null,
|
1079 |
+
"grid_row": null,
|
1080 |
+
"grid_template_areas": null,
|
1081 |
+
"grid_template_columns": null,
|
1082 |
+
"grid_template_rows": null,
|
1083 |
+
"height": null,
|
1084 |
+
"justify_content": null,
|
1085 |
+
"justify_items": null,
|
1086 |
+
"left": null,
|
1087 |
+
"margin": null,
|
1088 |
+
"max_height": null,
|
1089 |
+
"max_width": null,
|
1090 |
+
"min_height": null,
|
1091 |
+
"min_width": null,
|
1092 |
+
"object_fit": null,
|
1093 |
+
"object_position": null,
|
1094 |
+
"order": null,
|
1095 |
+
"overflow": null,
|
1096 |
+
"overflow_x": null,
|
1097 |
+
"overflow_y": null,
|
1098 |
+
"padding": null,
|
1099 |
+
"right": null,
|
1100 |
+
"top": null,
|
1101 |
+
"visibility": null,
|
1102 |
+
"width": null
|
1103 |
+
}
|
1104 |
+
},
|
1105 |
+
"46b8f2c5ac19472e8d1cab734c60bea6": {
|
1106 |
+
"model_module": "@jupyter-widgets/controls",
|
1107 |
+
"model_name": "DescriptionStyleModel",
|
1108 |
+
"model_module_version": "1.5.0",
|
1109 |
+
"state": {
|
1110 |
+
"_model_module": "@jupyter-widgets/controls",
|
1111 |
+
"_model_module_version": "1.5.0",
|
1112 |
+
"_model_name": "DescriptionStyleModel",
|
1113 |
+
"_view_count": null,
|
1114 |
+
"_view_module": "@jupyter-widgets/base",
|
1115 |
+
"_view_module_version": "1.2.0",
|
1116 |
+
"_view_name": "StyleView",
|
1117 |
+
"description_width": ""
|
1118 |
+
}
|
1119 |
+
},
|
1120 |
+
"a2a4d1c023c840eb8eecc9db984c51cf": {
|
1121 |
+
"model_module": "@jupyter-widgets/controls",
|
1122 |
+
"model_name": "HBoxModel",
|
1123 |
+
"model_module_version": "1.5.0",
|
1124 |
+
"state": {
|
1125 |
+
"_dom_classes": [],
|
1126 |
+
"_model_module": "@jupyter-widgets/controls",
|
1127 |
+
"_model_module_version": "1.5.0",
|
1128 |
+
"_model_name": "HBoxModel",
|
1129 |
+
"_view_count": null,
|
1130 |
+
"_view_module": "@jupyter-widgets/controls",
|
1131 |
+
"_view_module_version": "1.5.0",
|
1132 |
+
"_view_name": "HBoxView",
|
1133 |
+
"box_style": "",
|
1134 |
+
"children": [
|
1135 |
+
"IPY_MODEL_ea89580721f246a38162273eae662afe",
|
1136 |
+
"IPY_MODEL_20b43a93655c49558787cceac269707e",
|
1137 |
+
"IPY_MODEL_63404a1a221148f19fb6b539107edea2"
|
1138 |
+
],
|
1139 |
+
"layout": "IPY_MODEL_97aa2fa33c7e4d8780dc59a6627ec551"
|
1140 |
+
}
|
1141 |
+
},
|
1142 |
+
"ea89580721f246a38162273eae662afe": {
|
1143 |
+
"model_module": "@jupyter-widgets/controls",
|
1144 |
+
"model_name": "HTMLModel",
|
1145 |
+
"model_module_version": "1.5.0",
|
1146 |
+
"state": {
|
1147 |
+
"_dom_classes": [],
|
1148 |
+
"_model_module": "@jupyter-widgets/controls",
|
1149 |
+
"_model_module_version": "1.5.0",
|
1150 |
+
"_model_name": "HTMLModel",
|
1151 |
+
"_view_count": null,
|
1152 |
+
"_view_module": "@jupyter-widgets/controls",
|
1153 |
+
"_view_module_version": "1.5.0",
|
1154 |
+
"_view_name": "HTMLView",
|
1155 |
+
"description": "",
|
1156 |
+
"description_tooltip": null,
|
1157 |
+
"layout": "IPY_MODEL_1bca6293972b45e4a7d48704012c794f",
|
1158 |
+
"placeholder": "",
|
1159 |
+
"style": "IPY_MODEL_840cbab88ba74a4984208be560586391",
|
1160 |
+
"value": "Downloading (…)/main/tokenizer.json: 100%"
|
1161 |
+
}
|
1162 |
+
},
|
1163 |
+
"20b43a93655c49558787cceac269707e": {
|
1164 |
+
"model_module": "@jupyter-widgets/controls",
|
1165 |
+
"model_name": "FloatProgressModel",
|
1166 |
+
"model_module_version": "1.5.0",
|
1167 |
+
"state": {
|
1168 |
+
"_dom_classes": [],
|
1169 |
+
"_model_module": "@jupyter-widgets/controls",
|
1170 |
+
"_model_module_version": "1.5.0",
|
1171 |
+
"_model_name": "FloatProgressModel",
|
1172 |
+
"_view_count": null,
|
1173 |
+
"_view_module": "@jupyter-widgets/controls",
|
1174 |
+
"_view_module_version": "1.5.0",
|
1175 |
+
"_view_name": "ProgressView",
|
1176 |
+
"bar_style": "success",
|
1177 |
+
"description": "",
|
1178 |
+
"description_tooltip": null,
|
1179 |
+
"layout": "IPY_MODEL_73cf23dc9260414e9395e9283ebb22a0",
|
1180 |
+
"max": 1389353,
|
1181 |
+
"min": 0,
|
1182 |
+
"orientation": "horizontal",
|
1183 |
+
"style": "IPY_MODEL_c6a6196e392f4b28a47eeb76719a9f5e",
|
1184 |
+
"value": 1389353
|
1185 |
+
}
|
1186 |
+
},
|
1187 |
+
"63404a1a221148f19fb6b539107edea2": {
|
1188 |
+
"model_module": "@jupyter-widgets/controls",
|
1189 |
+
"model_name": "HTMLModel",
|
1190 |
+
"model_module_version": "1.5.0",
|
1191 |
+
"state": {
|
1192 |
+
"_dom_classes": [],
|
1193 |
+
"_model_module": "@jupyter-widgets/controls",
|
1194 |
+
"_model_module_version": "1.5.0",
|
1195 |
+
"_model_name": "HTMLModel",
|
1196 |
+
"_view_count": null,
|
1197 |
+
"_view_module": "@jupyter-widgets/controls",
|
1198 |
+
"_view_module_version": "1.5.0",
|
1199 |
+
"_view_name": "HTMLView",
|
1200 |
+
"description": "",
|
1201 |
+
"description_tooltip": null,
|
1202 |
+
"layout": "IPY_MODEL_7fa433925c7d4f2085032ef34f1ebea9",
|
1203 |
+
"placeholder": "",
|
1204 |
+
"style": "IPY_MODEL_4321e66ed9164b0e8a3619497f19e600",
|
1205 |
+
"value": " 1.39M/1.39M [00:00<00:00, 4.85MB/s]"
|
1206 |
+
}
|
1207 |
+
},
|
1208 |
+
"97aa2fa33c7e4d8780dc59a6627ec551": {
|
1209 |
+
"model_module": "@jupyter-widgets/base",
|
1210 |
+
"model_name": "LayoutModel",
|
1211 |
+
"model_module_version": "1.2.0",
|
1212 |
+
"state": {
|
1213 |
+
"_model_module": "@jupyter-widgets/base",
|
1214 |
+
"_model_module_version": "1.2.0",
|
1215 |
+
"_model_name": "LayoutModel",
|
1216 |
+
"_view_count": null,
|
1217 |
+
"_view_module": "@jupyter-widgets/base",
|
1218 |
+
"_view_module_version": "1.2.0",
|
1219 |
+
"_view_name": "LayoutView",
|
1220 |
+
"align_content": null,
|
1221 |
+
"align_items": null,
|
1222 |
+
"align_self": null,
|
1223 |
+
"border": null,
|
1224 |
+
"bottom": null,
|
1225 |
+
"display": null,
|
1226 |
+
"flex": null,
|
1227 |
+
"flex_flow": null,
|
1228 |
+
"grid_area": null,
|
1229 |
+
"grid_auto_columns": null,
|
1230 |
+
"grid_auto_flow": null,
|
1231 |
+
"grid_auto_rows": null,
|
1232 |
+
"grid_column": null,
|
1233 |
+
"grid_gap": null,
|
1234 |
+
"grid_row": null,
|
1235 |
+
"grid_template_areas": null,
|
1236 |
+
"grid_template_columns": null,
|
1237 |
+
"grid_template_rows": null,
|
1238 |
+
"height": null,
|
1239 |
+
"justify_content": null,
|
1240 |
+
"justify_items": null,
|
1241 |
+
"left": null,
|
1242 |
+
"margin": null,
|
1243 |
+
"max_height": null,
|
1244 |
+
"max_width": null,
|
1245 |
+
"min_height": null,
|
1246 |
+
"min_width": null,
|
1247 |
+
"object_fit": null,
|
1248 |
+
"object_position": null,
|
1249 |
+
"order": null,
|
1250 |
+
"overflow": null,
|
1251 |
+
"overflow_x": null,
|
1252 |
+
"overflow_y": null,
|
1253 |
+
"padding": null,
|
1254 |
+
"right": null,
|
1255 |
+
"top": null,
|
1256 |
+
"visibility": null,
|
1257 |
+
"width": null
|
1258 |
+
}
|
1259 |
+
},
|
1260 |
+
"1bca6293972b45e4a7d48704012c794f": {
|
1261 |
+
"model_module": "@jupyter-widgets/base",
|
1262 |
+
"model_name": "LayoutModel",
|
1263 |
+
"model_module_version": "1.2.0",
|
1264 |
+
"state": {
|
1265 |
+
"_model_module": "@jupyter-widgets/base",
|
1266 |
+
"_model_module_version": "1.2.0",
|
1267 |
+
"_model_name": "LayoutModel",
|
1268 |
+
"_view_count": null,
|
1269 |
+
"_view_module": "@jupyter-widgets/base",
|
1270 |
+
"_view_module_version": "1.2.0",
|
1271 |
+
"_view_name": "LayoutView",
|
1272 |
+
"align_content": null,
|
1273 |
+
"align_items": null,
|
1274 |
+
"align_self": null,
|
1275 |
+
"border": null,
|
1276 |
+
"bottom": null,
|
1277 |
+
"display": null,
|
1278 |
+
"flex": null,
|
1279 |
+
"flex_flow": null,
|
1280 |
+
"grid_area": null,
|
1281 |
+
"grid_auto_columns": null,
|
1282 |
+
"grid_auto_flow": null,
|
1283 |
+
"grid_auto_rows": null,
|
1284 |
+
"grid_column": null,
|
1285 |
+
"grid_gap": null,
|
1286 |
+
"grid_row": null,
|
1287 |
+
"grid_template_areas": null,
|
1288 |
+
"grid_template_columns": null,
|
1289 |
+
"grid_template_rows": null,
|
1290 |
+
"height": null,
|
1291 |
+
"justify_content": null,
|
1292 |
+
"justify_items": null,
|
1293 |
+
"left": null,
|
1294 |
+
"margin": null,
|
1295 |
+
"max_height": null,
|
1296 |
+
"max_width": null,
|
1297 |
+
"min_height": null,
|
1298 |
+
"min_width": null,
|
1299 |
+
"object_fit": null,
|
1300 |
+
"object_position": null,
|
1301 |
+
"order": null,
|
1302 |
+
"overflow": null,
|
1303 |
+
"overflow_x": null,
|
1304 |
+
"overflow_y": null,
|
1305 |
+
"padding": null,
|
1306 |
+
"right": null,
|
1307 |
+
"top": null,
|
1308 |
+
"visibility": null,
|
1309 |
+
"width": null
|
1310 |
+
}
|
1311 |
+
},
|
1312 |
+
"840cbab88ba74a4984208be560586391": {
|
1313 |
+
"model_module": "@jupyter-widgets/controls",
|
1314 |
+
"model_name": "DescriptionStyleModel",
|
1315 |
+
"model_module_version": "1.5.0",
|
1316 |
+
"state": {
|
1317 |
+
"_model_module": "@jupyter-widgets/controls",
|
1318 |
+
"_model_module_version": "1.5.0",
|
1319 |
+
"_model_name": "DescriptionStyleModel",
|
1320 |
+
"_view_count": null,
|
1321 |
+
"_view_module": "@jupyter-widgets/base",
|
1322 |
+
"_view_module_version": "1.2.0",
|
1323 |
+
"_view_name": "StyleView",
|
1324 |
+
"description_width": ""
|
1325 |
+
}
|
1326 |
+
},
|
1327 |
+
"73cf23dc9260414e9395e9283ebb22a0": {
|
1328 |
+
"model_module": "@jupyter-widgets/base",
|
1329 |
+
"model_name": "LayoutModel",
|
1330 |
+
"model_module_version": "1.2.0",
|
1331 |
+
"state": {
|
1332 |
+
"_model_module": "@jupyter-widgets/base",
|
1333 |
+
"_model_module_version": "1.2.0",
|
1334 |
+
"_model_name": "LayoutModel",
|
1335 |
+
"_view_count": null,
|
1336 |
+
"_view_module": "@jupyter-widgets/base",
|
1337 |
+
"_view_module_version": "1.2.0",
|
1338 |
+
"_view_name": "LayoutView",
|
1339 |
+
"align_content": null,
|
1340 |
+
"align_items": null,
|
1341 |
+
"align_self": null,
|
1342 |
+
"border": null,
|
1343 |
+
"bottom": null,
|
1344 |
+
"display": null,
|
1345 |
+
"flex": null,
|
1346 |
+
"flex_flow": null,
|
1347 |
+
"grid_area": null,
|
1348 |
+
"grid_auto_columns": null,
|
1349 |
+
"grid_auto_flow": null,
|
1350 |
+
"grid_auto_rows": null,
|
1351 |
+
"grid_column": null,
|
1352 |
+
"grid_gap": null,
|
1353 |
+
"grid_row": null,
|
1354 |
+
"grid_template_areas": null,
|
1355 |
+
"grid_template_columns": null,
|
1356 |
+
"grid_template_rows": null,
|
1357 |
+
"height": null,
|
1358 |
+
"justify_content": null,
|
1359 |
+
"justify_items": null,
|
1360 |
+
"left": null,
|
1361 |
+
"margin": null,
|
1362 |
+
"max_height": null,
|
1363 |
+
"max_width": null,
|
1364 |
+
"min_height": null,
|
1365 |
+
"min_width": null,
|
1366 |
+
"object_fit": null,
|
1367 |
+
"object_position": null,
|
1368 |
+
"order": null,
|
1369 |
+
"overflow": null,
|
1370 |
+
"overflow_x": null,
|
1371 |
+
"overflow_y": null,
|
1372 |
+
"padding": null,
|
1373 |
+
"right": null,
|
1374 |
+
"top": null,
|
1375 |
+
"visibility": null,
|
1376 |
+
"width": null
|
1377 |
+
}
|
1378 |
+
},
|
1379 |
+
"c6a6196e392f4b28a47eeb76719a9f5e": {
|
1380 |
+
"model_module": "@jupyter-widgets/controls",
|
1381 |
+
"model_name": "ProgressStyleModel",
|
1382 |
+
"model_module_version": "1.5.0",
|
1383 |
+
"state": {
|
1384 |
+
"_model_module": "@jupyter-widgets/controls",
|
1385 |
+
"_model_module_version": "1.5.0",
|
1386 |
+
"_model_name": "ProgressStyleModel",
|
1387 |
+
"_view_count": null,
|
1388 |
+
"_view_module": "@jupyter-widgets/base",
|
1389 |
+
"_view_module_version": "1.2.0",
|
1390 |
+
"_view_name": "StyleView",
|
1391 |
+
"bar_color": null,
|
1392 |
+
"description_width": ""
|
1393 |
+
}
|
1394 |
+
},
|
1395 |
+
"7fa433925c7d4f2085032ef34f1ebea9": {
|
1396 |
+
"model_module": "@jupyter-widgets/base",
|
1397 |
+
"model_name": "LayoutModel",
|
1398 |
+
"model_module_version": "1.2.0",
|
1399 |
+
"state": {
|
1400 |
+
"_model_module": "@jupyter-widgets/base",
|
1401 |
+
"_model_module_version": "1.2.0",
|
1402 |
+
"_model_name": "LayoutModel",
|
1403 |
+
"_view_count": null,
|
1404 |
+
"_view_module": "@jupyter-widgets/base",
|
1405 |
+
"_view_module_version": "1.2.0",
|
1406 |
+
"_view_name": "LayoutView",
|
1407 |
+
"align_content": null,
|
1408 |
+
"align_items": null,
|
1409 |
+
"align_self": null,
|
1410 |
+
"border": null,
|
1411 |
+
"bottom": null,
|
1412 |
+
"display": null,
|
1413 |
+
"flex": null,
|
1414 |
+
"flex_flow": null,
|
1415 |
+
"grid_area": null,
|
1416 |
+
"grid_auto_columns": null,
|
1417 |
+
"grid_auto_flow": null,
|
1418 |
+
"grid_auto_rows": null,
|
1419 |
+
"grid_column": null,
|
1420 |
+
"grid_gap": null,
|
1421 |
+
"grid_row": null,
|
1422 |
+
"grid_template_areas": null,
|
1423 |
+
"grid_template_columns": null,
|
1424 |
+
"grid_template_rows": null,
|
1425 |
+
"height": null,
|
1426 |
+
"justify_content": null,
|
1427 |
+
"justify_items": null,
|
1428 |
+
"left": null,
|
1429 |
+
"margin": null,
|
1430 |
+
"max_height": null,
|
1431 |
+
"max_width": null,
|
1432 |
+
"min_height": null,
|
1433 |
+
"min_width": null,
|
1434 |
+
"object_fit": null,
|
1435 |
+
"object_position": null,
|
1436 |
+
"order": null,
|
1437 |
+
"overflow": null,
|
1438 |
+
"overflow_x": null,
|
1439 |
+
"overflow_y": null,
|
1440 |
+
"padding": null,
|
1441 |
+
"right": null,
|
1442 |
+
"top": null,
|
1443 |
+
"visibility": null,
|
1444 |
+
"width": null
|
1445 |
+
}
|
1446 |
+
},
|
1447 |
+
"4321e66ed9164b0e8a3619497f19e600": {
|
1448 |
+
"model_module": "@jupyter-widgets/controls",
|
1449 |
+
"model_name": "DescriptionStyleModel",
|
1450 |
+
"model_module_version": "1.5.0",
|
1451 |
+
"state": {
|
1452 |
+
"_model_module": "@jupyter-widgets/controls",
|
1453 |
+
"_model_module_version": "1.5.0",
|
1454 |
+
"_model_name": "DescriptionStyleModel",
|
1455 |
+
"_view_count": null,
|
1456 |
+
"_view_module": "@jupyter-widgets/base",
|
1457 |
+
"_view_module_version": "1.2.0",
|
1458 |
+
"_view_name": "StyleView",
|
1459 |
+
"description_width": ""
|
1460 |
+
}
|
1461 |
+
},
|
1462 |
+
"94b74dee162747e2b74e3d49b8a6eeee": {
|
1463 |
+
"model_module": "@jupyter-widgets/controls",
|
1464 |
+
"model_name": "HBoxModel",
|
1465 |
+
"model_module_version": "1.5.0",
|
1466 |
+
"state": {
|
1467 |
+
"_dom_classes": [],
|
1468 |
+
"_model_module": "@jupyter-widgets/controls",
|
1469 |
+
"_model_module_version": "1.5.0",
|
1470 |
+
"_model_name": "HBoxModel",
|
1471 |
+
"_view_count": null,
|
1472 |
+
"_view_module": "@jupyter-widgets/controls",
|
1473 |
+
"_view_module_version": "1.5.0",
|
1474 |
+
"_view_name": "HBoxView",
|
1475 |
+
"box_style": "",
|
1476 |
+
"children": [
|
1477 |
+
"IPY_MODEL_98471106a9884b92aff88d05b8b59e4b",
|
1478 |
+
"IPY_MODEL_db956786289b4934bcd8644ceeeb1629",
|
1479 |
+
"IPY_MODEL_af82522ec6c74954a36947729d267bc9"
|
1480 |
+
],
|
1481 |
+
"layout": "IPY_MODEL_911e513226c84a289a63e6d76b731b09"
|
1482 |
+
}
|
1483 |
+
},
|
1484 |
+
"98471106a9884b92aff88d05b8b59e4b": {
|
1485 |
+
"model_module": "@jupyter-widgets/controls",
|
1486 |
+
"model_name": "HTMLModel",
|
1487 |
+
"model_module_version": "1.5.0",
|
1488 |
+
"state": {
|
1489 |
+
"_dom_classes": [],
|
1490 |
+
"_model_module": "@jupyter-widgets/controls",
|
1491 |
+
"_model_module_version": "1.5.0",
|
1492 |
+
"_model_name": "HTMLModel",
|
1493 |
+
"_view_count": null,
|
1494 |
+
"_view_module": "@jupyter-widgets/controls",
|
1495 |
+
"_view_module_version": "1.5.0",
|
1496 |
+
"_view_name": "HTMLView",
|
1497 |
+
"description": "",
|
1498 |
+
"description_tooltip": null,
|
1499 |
+
"layout": "IPY_MODEL_7fd9b2a289ab45089ab77e089af96879",
|
1500 |
+
"placeholder": "",
|
1501 |
+
"style": "IPY_MODEL_887214c42410453baeb2e258a1239966",
|
1502 |
+
"value": "Downloading (…)lve/main/config.json: 100%"
|
1503 |
+
}
|
1504 |
+
},
|
1505 |
+
"db956786289b4934bcd8644ceeeb1629": {
|
1506 |
+
"model_module": "@jupyter-widgets/controls",
|
1507 |
+
"model_name": "FloatProgressModel",
|
1508 |
+
"model_module_version": "1.5.0",
|
1509 |
+
"state": {
|
1510 |
+
"_dom_classes": [],
|
1511 |
+
"_model_module": "@jupyter-widgets/controls",
|
1512 |
+
"_model_module_version": "1.5.0",
|
1513 |
+
"_model_name": "FloatProgressModel",
|
1514 |
+
"_view_count": null,
|
1515 |
+
"_view_module": "@jupyter-widgets/controls",
|
1516 |
+
"_view_module_version": "1.5.0",
|
1517 |
+
"_view_name": "ProgressView",
|
1518 |
+
"bar_style": "success",
|
1519 |
+
"description": "",
|
1520 |
+
"description_tooltip": null,
|
1521 |
+
"layout": "IPY_MODEL_0f67828b2fdd4ebaa7cb7a4c7b321244",
|
1522 |
+
"max": 1208,
|
1523 |
+
"min": 0,
|
1524 |
+
"orientation": "horizontal",
|
1525 |
+
"style": "IPY_MODEL_8aad0bc9ed274cac874e24a3c45d2979",
|
1526 |
+
"value": 1208
|
1527 |
+
}
|
1528 |
+
},
|
1529 |
+
"af82522ec6c74954a36947729d267bc9": {
|
1530 |
+
"model_module": "@jupyter-widgets/controls",
|
1531 |
+
"model_name": "HTMLModel",
|
1532 |
+
"model_module_version": "1.5.0",
|
1533 |
+
"state": {
|
1534 |
+
"_dom_classes": [],
|
1535 |
+
"_model_module": "@jupyter-widgets/controls",
|
1536 |
+
"_model_module_version": "1.5.0",
|
1537 |
+
"_model_name": "HTMLModel",
|
1538 |
+
"_view_count": null,
|
1539 |
+
"_view_module": "@jupyter-widgets/controls",
|
1540 |
+
"_view_module_version": "1.5.0",
|
1541 |
+
"_view_name": "HTMLView",
|
1542 |
+
"description": "",
|
1543 |
+
"description_tooltip": null,
|
1544 |
+
"layout": "IPY_MODEL_013396e9dae14f2bbf3e729b69a566a7",
|
1545 |
+
"placeholder": "",
|
1546 |
+
"style": "IPY_MODEL_c4d7492e8ce344dc91bcadc7b65b3870",
|
1547 |
+
"value": " 1.21k/1.21k [00:00<00:00, 33.2kB/s]"
|
1548 |
+
}
|
1549 |
+
},
|
1550 |
+
"911e513226c84a289a63e6d76b731b09": {
|
1551 |
+
"model_module": "@jupyter-widgets/base",
|
1552 |
+
"model_name": "LayoutModel",
|
1553 |
+
"model_module_version": "1.2.0",
|
1554 |
+
"state": {
|
1555 |
+
"_model_module": "@jupyter-widgets/base",
|
1556 |
+
"_model_module_version": "1.2.0",
|
1557 |
+
"_model_name": "LayoutModel",
|
1558 |
+
"_view_count": null,
|
1559 |
+
"_view_module": "@jupyter-widgets/base",
|
1560 |
+
"_view_module_version": "1.2.0",
|
1561 |
+
"_view_name": "LayoutView",
|
1562 |
+
"align_content": null,
|
1563 |
+
"align_items": null,
|
1564 |
+
"align_self": null,
|
1565 |
+
"border": null,
|
1566 |
+
"bottom": null,
|
1567 |
+
"display": null,
|
1568 |
+
"flex": null,
|
1569 |
+
"flex_flow": null,
|
1570 |
+
"grid_area": null,
|
1571 |
+
"grid_auto_columns": null,
|
1572 |
+
"grid_auto_flow": null,
|
1573 |
+
"grid_auto_rows": null,
|
1574 |
+
"grid_column": null,
|
1575 |
+
"grid_gap": null,
|
1576 |
+
"grid_row": null,
|
1577 |
+
"grid_template_areas": null,
|
1578 |
+
"grid_template_columns": null,
|
1579 |
+
"grid_template_rows": null,
|
1580 |
+
"height": null,
|
1581 |
+
"justify_content": null,
|
1582 |
+
"justify_items": null,
|
1583 |
+
"left": null,
|
1584 |
+
"margin": null,
|
1585 |
+
"max_height": null,
|
1586 |
+
"max_width": null,
|
1587 |
+
"min_height": null,
|
1588 |
+
"min_width": null,
|
1589 |
+
"object_fit": null,
|
1590 |
+
"object_position": null,
|
1591 |
+
"order": null,
|
1592 |
+
"overflow": null,
|
1593 |
+
"overflow_x": null,
|
1594 |
+
"overflow_y": null,
|
1595 |
+
"padding": null,
|
1596 |
+
"right": null,
|
1597 |
+
"top": null,
|
1598 |
+
"visibility": null,
|
1599 |
+
"width": null
|
1600 |
+
}
|
1601 |
+
},
|
1602 |
+
"7fd9b2a289ab45089ab77e089af96879": {
|
1603 |
+
"model_module": "@jupyter-widgets/base",
|
1604 |
+
"model_name": "LayoutModel",
|
1605 |
+
"model_module_version": "1.2.0",
|
1606 |
+
"state": {
|
1607 |
+
"_model_module": "@jupyter-widgets/base",
|
1608 |
+
"_model_module_version": "1.2.0",
|
1609 |
+
"_model_name": "LayoutModel",
|
1610 |
+
"_view_count": null,
|
1611 |
+
"_view_module": "@jupyter-widgets/base",
|
1612 |
+
"_view_module_version": "1.2.0",
|
1613 |
+
"_view_name": "LayoutView",
|
1614 |
+
"align_content": null,
|
1615 |
+
"align_items": null,
|
1616 |
+
"align_self": null,
|
1617 |
+
"border": null,
|
1618 |
+
"bottom": null,
|
1619 |
+
"display": null,
|
1620 |
+
"flex": null,
|
1621 |
+
"flex_flow": null,
|
1622 |
+
"grid_area": null,
|
1623 |
+
"grid_auto_columns": null,
|
1624 |
+
"grid_auto_flow": null,
|
1625 |
+
"grid_auto_rows": null,
|
1626 |
+
"grid_column": null,
|
1627 |
+
"grid_gap": null,
|
1628 |
+
"grid_row": null,
|
1629 |
+
"grid_template_areas": null,
|
1630 |
+
"grid_template_columns": null,
|
1631 |
+
"grid_template_rows": null,
|
1632 |
+
"height": null,
|
1633 |
+
"justify_content": null,
|
1634 |
+
"justify_items": null,
|
1635 |
+
"left": null,
|
1636 |
+
"margin": null,
|
1637 |
+
"max_height": null,
|
1638 |
+
"max_width": null,
|
1639 |
+
"min_height": null,
|
1640 |
+
"min_width": null,
|
1641 |
+
"object_fit": null,
|
1642 |
+
"object_position": null,
|
1643 |
+
"order": null,
|
1644 |
+
"overflow": null,
|
1645 |
+
"overflow_x": null,
|
1646 |
+
"overflow_y": null,
|
1647 |
+
"padding": null,
|
1648 |
+
"right": null,
|
1649 |
+
"top": null,
|
1650 |
+
"visibility": null,
|
1651 |
+
"width": null
|
1652 |
+
}
|
1653 |
+
},
|
1654 |
+
"887214c42410453baeb2e258a1239966": {
|
1655 |
+
"model_module": "@jupyter-widgets/controls",
|
1656 |
+
"model_name": "DescriptionStyleModel",
|
1657 |
+
"model_module_version": "1.5.0",
|
1658 |
+
"state": {
|
1659 |
+
"_model_module": "@jupyter-widgets/controls",
|
1660 |
+
"_model_module_version": "1.5.0",
|
1661 |
+
"_model_name": "DescriptionStyleModel",
|
1662 |
+
"_view_count": null,
|
1663 |
+
"_view_module": "@jupyter-widgets/base",
|
1664 |
+
"_view_module_version": "1.2.0",
|
1665 |
+
"_view_name": "StyleView",
|
1666 |
+
"description_width": ""
|
1667 |
+
}
|
1668 |
+
},
|
1669 |
+
"0f67828b2fdd4ebaa7cb7a4c7b321244": {
|
1670 |
+
"model_module": "@jupyter-widgets/base",
|
1671 |
+
"model_name": "LayoutModel",
|
1672 |
+
"model_module_version": "1.2.0",
|
1673 |
+
"state": {
|
1674 |
+
"_model_module": "@jupyter-widgets/base",
|
1675 |
+
"_model_module_version": "1.2.0",
|
1676 |
+
"_model_name": "LayoutModel",
|
1677 |
+
"_view_count": null,
|
1678 |
+
"_view_module": "@jupyter-widgets/base",
|
1679 |
+
"_view_module_version": "1.2.0",
|
1680 |
+
"_view_name": "LayoutView",
|
1681 |
+
"align_content": null,
|
1682 |
+
"align_items": null,
|
1683 |
+
"align_self": null,
|
1684 |
+
"border": null,
|
1685 |
+
"bottom": null,
|
1686 |
+
"display": null,
|
1687 |
+
"flex": null,
|
1688 |
+
"flex_flow": null,
|
1689 |
+
"grid_area": null,
|
1690 |
+
"grid_auto_columns": null,
|
1691 |
+
"grid_auto_flow": null,
|
1692 |
+
"grid_auto_rows": null,
|
1693 |
+
"grid_column": null,
|
1694 |
+
"grid_gap": null,
|
1695 |
+
"grid_row": null,
|
1696 |
+
"grid_template_areas": null,
|
1697 |
+
"grid_template_columns": null,
|
1698 |
+
"grid_template_rows": null,
|
1699 |
+
"height": null,
|
1700 |
+
"justify_content": null,
|
1701 |
+
"justify_items": null,
|
1702 |
+
"left": null,
|
1703 |
+
"margin": null,
|
1704 |
+
"max_height": null,
|
1705 |
+
"max_width": null,
|
1706 |
+
"min_height": null,
|
1707 |
+
"min_width": null,
|
1708 |
+
"object_fit": null,
|
1709 |
+
"object_position": null,
|
1710 |
+
"order": null,
|
1711 |
+
"overflow": null,
|
1712 |
+
"overflow_x": null,
|
1713 |
+
"overflow_y": null,
|
1714 |
+
"padding": null,
|
1715 |
+
"right": null,
|
1716 |
+
"top": null,
|
1717 |
+
"visibility": null,
|
1718 |
+
"width": null
|
1719 |
+
}
|
1720 |
+
},
|
1721 |
+
"8aad0bc9ed274cac874e24a3c45d2979": {
|
1722 |
+
"model_module": "@jupyter-widgets/controls",
|
1723 |
+
"model_name": "ProgressStyleModel",
|
1724 |
+
"model_module_version": "1.5.0",
|
1725 |
+
"state": {
|
1726 |
+
"_model_module": "@jupyter-widgets/controls",
|
1727 |
+
"_model_module_version": "1.5.0",
|
1728 |
+
"_model_name": "ProgressStyleModel",
|
1729 |
+
"_view_count": null,
|
1730 |
+
"_view_module": "@jupyter-widgets/base",
|
1731 |
+
"_view_module_version": "1.2.0",
|
1732 |
+
"_view_name": "StyleView",
|
1733 |
+
"bar_color": null,
|
1734 |
+
"description_width": ""
|
1735 |
+
}
|
1736 |
+
},
|
1737 |
+
"013396e9dae14f2bbf3e729b69a566a7": {
|
1738 |
+
"model_module": "@jupyter-widgets/base",
|
1739 |
+
"model_name": "LayoutModel",
|
1740 |
+
"model_module_version": "1.2.0",
|
1741 |
+
"state": {
|
1742 |
+
"_model_module": "@jupyter-widgets/base",
|
1743 |
+
"_model_module_version": "1.2.0",
|
1744 |
+
"_model_name": "LayoutModel",
|
1745 |
+
"_view_count": null,
|
1746 |
+
"_view_module": "@jupyter-widgets/base",
|
1747 |
+
"_view_module_version": "1.2.0",
|
1748 |
+
"_view_name": "LayoutView",
|
1749 |
+
"align_content": null,
|
1750 |
+
"align_items": null,
|
1751 |
+
"align_self": null,
|
1752 |
+
"border": null,
|
1753 |
+
"bottom": null,
|
1754 |
+
"display": null,
|
1755 |
+
"flex": null,
|
1756 |
+
"flex_flow": null,
|
1757 |
+
"grid_area": null,
|
1758 |
+
"grid_auto_columns": null,
|
1759 |
+
"grid_auto_flow": null,
|
1760 |
+
"grid_auto_rows": null,
|
1761 |
+
"grid_column": null,
|
1762 |
+
"grid_gap": null,
|
1763 |
+
"grid_row": null,
|
1764 |
+
"grid_template_areas": null,
|
1765 |
+
"grid_template_columns": null,
|
1766 |
+
"grid_template_rows": null,
|
1767 |
+
"height": null,
|
1768 |
+
"justify_content": null,
|
1769 |
+
"justify_items": null,
|
1770 |
+
"left": null,
|
1771 |
+
"margin": null,
|
1772 |
+
"max_height": null,
|
1773 |
+
"max_width": null,
|
1774 |
+
"min_height": null,
|
1775 |
+
"min_width": null,
|
1776 |
+
"object_fit": null,
|
1777 |
+
"object_position": null,
|
1778 |
+
"order": null,
|
1779 |
+
"overflow": null,
|
1780 |
+
"overflow_x": null,
|
1781 |
+
"overflow_y": null,
|
1782 |
+
"padding": null,
|
1783 |
+
"right": null,
|
1784 |
+
"top": null,
|
1785 |
+
"visibility": null,
|
1786 |
+
"width": null
|
1787 |
+
}
|
1788 |
+
},
|
1789 |
+
"c4d7492e8ce344dc91bcadc7b65b3870": {
|
1790 |
+
"model_module": "@jupyter-widgets/controls",
|
1791 |
+
"model_name": "DescriptionStyleModel",
|
1792 |
+
"model_module_version": "1.5.0",
|
1793 |
+
"state": {
|
1794 |
+
"_model_module": "@jupyter-widgets/controls",
|
1795 |
+
"_model_module_version": "1.5.0",
|
1796 |
+
"_model_name": "DescriptionStyleModel",
|
1797 |
+
"_view_count": null,
|
1798 |
+
"_view_module": "@jupyter-widgets/base",
|
1799 |
+
"_view_module_version": "1.2.0",
|
1800 |
+
"_view_name": "StyleView",
|
1801 |
+
"description_width": ""
|
1802 |
+
}
|
1803 |
+
}
|
1804 |
+
}
|
1805 |
+
}
|
1806 |
+
},
|
1807 |
+
"nbformat": 4,
|
1808 |
+
"nbformat_minor": 0
|
1809 |
+
}
|