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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"metadata": {
|
| 6 |
+
"id": "BCTUDjwiYn6T"
|
| 7 |
+
},
|
| 8 |
+
"source": [
|
| 9 |
+
"## DINOv3 Fine-tuning for Image Classification"
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": null,
|
| 15 |
+
"metadata": {},
|
| 16 |
+
"outputs": [],
|
| 17 |
+
"source": [
|
| 18 |
+
"!pip install -q trackio git+https://github.com/huggingface/transformers.git"
|
| 19 |
+
]
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"cell_type": "markdown",
|
| 23 |
+
"metadata": {
|
| 24 |
+
"id": "5AJ3YVCE8S9Y"
|
| 25 |
+
},
|
| 26 |
+
"source": [
|
| 27 |
+
"## Dataset"
|
| 28 |
+
]
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"cell_type": "markdown",
|
| 32 |
+
"metadata": {
|
| 33 |
+
"id": "s_Aabbb6VBZt"
|
| 34 |
+
},
|
| 35 |
+
"source": [
|
| 36 |
+
"We will do a very small run on food101 dataset."
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"cell_type": "code",
|
| 41 |
+
"execution_count": 7,
|
| 42 |
+
"metadata": {
|
| 43 |
+
"id": "Cxzbngbq4K31"
|
| 44 |
+
},
|
| 45 |
+
"outputs": [],
|
| 46 |
+
"source": [
|
| 47 |
+
"from datasets import load_dataset\n",
|
| 48 |
+
"\n",
|
| 49 |
+
"ds = load_dataset(\"ethz/food101\")\n",
|
| 50 |
+
"\n",
|
| 51 |
+
"train_ds = ds[\"train\"]\n",
|
| 52 |
+
"train_ds = train_ds.shuffle().train_test_split(test_size=0.9)[\"train\"]\n",
|
| 53 |
+
"val_ds = ds[\"validation\"].shuffle().train_test_split(test_size=0.9)[\"train\"]"
|
| 54 |
+
]
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"cell_type": "code",
|
| 58 |
+
"execution_count": 8,
|
| 59 |
+
"metadata": {
|
| 60 |
+
"colab": {
|
| 61 |
+
"base_uri": "https://localhost:8080/"
|
| 62 |
+
},
|
| 63 |
+
"id": "g1wl86sp8L6C",
|
| 64 |
+
"outputId": "1b42f43f-df62-4eba-f469-54cabd232cf9"
|
| 65 |
+
},
|
| 66 |
+
"outputs": [
|
| 67 |
+
{
|
| 68 |
+
"data": {
|
| 69 |
+
"text/plain": [
|
| 70 |
+
"Dataset({\n",
|
| 71 |
+
" features: ['image', 'label'],\n",
|
| 72 |
+
" num_rows: 7575\n",
|
| 73 |
+
"})"
|
| 74 |
+
]
|
| 75 |
+
},
|
| 76 |
+
"execution_count": 8,
|
| 77 |
+
"metadata": {},
|
| 78 |
+
"output_type": "execute_result"
|
| 79 |
+
}
|
| 80 |
+
],
|
| 81 |
+
"source": [
|
| 82 |
+
"train_ds"
|
| 83 |
+
]
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"cell_type": "code",
|
| 87 |
+
"execution_count": 9,
|
| 88 |
+
"metadata": {
|
| 89 |
+
"colab": {
|
| 90 |
+
"base_uri": "https://localhost:8080/"
|
| 91 |
+
},
|
| 92 |
+
"id": "Tq5OiKxvVj9k",
|
| 93 |
+
"outputId": "391489ba-d95f-498a-b4bb-f959e19686b0"
|
| 94 |
+
},
|
| 95 |
+
"outputs": [
|
| 96 |
+
{
|
| 97 |
+
"data": {
|
| 98 |
+
"text/plain": [
|
| 99 |
+
"Dataset({\n",
|
| 100 |
+
" features: ['image', 'label'],\n",
|
| 101 |
+
" num_rows: 2525\n",
|
| 102 |
+
"})"
|
| 103 |
+
]
|
| 104 |
+
},
|
| 105 |
+
"execution_count": 9,
|
| 106 |
+
"metadata": {},
|
| 107 |
+
"output_type": "execute_result"
|
| 108 |
+
}
|
| 109 |
+
],
|
| 110 |
+
"source": [
|
| 111 |
+
"val_ds"
|
| 112 |
+
]
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"cell_type": "code",
|
| 116 |
+
"execution_count": 10,
|
| 117 |
+
"metadata": {
|
| 118 |
+
"colab": {
|
| 119 |
+
"base_uri": "https://localhost:8080/"
|
| 120 |
+
},
|
| 121 |
+
"id": "1JcvDPFK8Scd",
|
| 122 |
+
"outputId": "5c920e23-e96b-4c62-bf3a-7db183c97f48"
|
| 123 |
+
},
|
| 124 |
+
"outputs": [
|
| 125 |
+
{
|
| 126 |
+
"name": "stdout",
|
| 127 |
+
"output_type": "stream",
|
| 128 |
+
"text": [
|
| 129 |
+
"Classes: 101\n"
|
| 130 |
+
]
|
| 131 |
+
}
|
| 132 |
+
],
|
| 133 |
+
"source": [
|
| 134 |
+
"num_classes = train_ds.features[\"label\"].num_classes\n",
|
| 135 |
+
"id2label = {i: name for i, name in enumerate(train_ds.features[\"label\"].names)}\n",
|
| 136 |
+
"label2id = {v: k for k, v in id2label.items()}\n",
|
| 137 |
+
"print(f\"Classes: {num_classes}\")"
|
| 138 |
+
]
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"cell_type": "markdown",
|
| 142 |
+
"metadata": {
|
| 143 |
+
"id": "_69A3AmO81c8"
|
| 144 |
+
},
|
| 145 |
+
"source": [
|
| 146 |
+
"## Load Model\n",
|
| 147 |
+
"\n",
|
| 148 |
+
"This model doesn't come with a head, so we need to write the headed model class."
|
| 149 |
+
]
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"cell_type": "code",
|
| 153 |
+
"execution_count": 11,
|
| 154 |
+
"metadata": {
|
| 155 |
+
"colab": {
|
| 156 |
+
"base_uri": "https://localhost:8080/",
|
| 157 |
+
"height": 113,
|
| 158 |
+
"referenced_widgets": [
|
| 159 |
+
"32138245d41348928cc5b5834b07cb7e",
|
| 160 |
+
"df6de04fdb204d348767dd0b2d0e88f7",
|
| 161 |
+
"63a3800d62dd41d6b4a3f643a8930d95",
|
| 162 |
+
"49d67bd205184874a5cee04d318d91fe",
|
| 163 |
+
"f00ace964f96471b9eb839cce48ce378",
|
| 164 |
+
"3ad0ac8def244930a3aff41d68a88a65",
|
| 165 |
+
"7464841c193d492685bb929b1c0d230c",
|
| 166 |
+
"5c16553a2ff34a37a2cb62b4a4c42a6f",
|
| 167 |
+
"34be83ddb4bf43e58cadbcbac5a606b7",
|
| 168 |
+
"0ce7bd7e52074f29b446ef2d4dd0921a",
|
| 169 |
+
"7e2178d696c04d5787e736ace9ab57c0",
|
| 170 |
+
"3ff80bc2f64948408757caa8715d0603",
|
| 171 |
+
"12aa8675bca54f05a6deb7ec7a5def7a",
|
| 172 |
+
"31a74feac76f4744a0f34fbc99433831",
|
| 173 |
+
"bd51d97e739a4e78ad28083043f638d8",
|
| 174 |
+
"062d36b5d0c043a597eb9b3ebd35f313",
|
| 175 |
+
"2c2223a6ae3e4ff6be96a5f4e2d2d9b6",
|
| 176 |
+
"f2c7be27f90b49a3abe51b5e3003c17d",
|
| 177 |
+
"76d1f15c857640c3b06d98aef478f234",
|
| 178 |
+
"d43089f8240c44339c6881355ff0aee3",
|
| 179 |
+
"a139b85557a942b9b5d32b9d7def3e50",
|
| 180 |
+
"92043bfce97e4629bf9e4b268aa88c11",
|
| 181 |
+
"f20b3989658642528f4ed91666320097",
|
| 182 |
+
"3ee9921a635d44ec9b248e2155b5b243",
|
| 183 |
+
"caf0790dbf2544378cb04aa8eb3098c3",
|
| 184 |
+
"3ff0fc5ce62a44b9950dd8575d90bd21",
|
| 185 |
+
"77cdafc6dae44107a43a46ae19ed390a",
|
| 186 |
+
"65d8b73e3bdd46fca8a42b67739e27f9",
|
| 187 |
+
"b566321171044b0eb02ea3bd8c0472df",
|
| 188 |
+
"62535e046f794a28b4002c3f34fe7ff7",
|
| 189 |
+
"663aa65fdb4e4349b2815b6bafce4dcd",
|
| 190 |
+
"8410c9d15bca4c9f8b3aab2b7d327211",
|
| 191 |
+
"fb359d0651a74fe790aaace9a5d0e329"
|
| 192 |
+
]
|
| 193 |
+
},
|
| 194 |
+
"id": "_oqXAu_y81H4",
|
| 195 |
+
"outputId": "7c4a4f6f-2301-4a43-eecb-50f1adb004b9"
|
| 196 |
+
},
|
| 197 |
+
"outputs": [
|
| 198 |
+
{
|
| 199 |
+
"data": {
|
| 200 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 201 |
+
"model_id": "32138245d41348928cc5b5834b07cb7e",
|
| 202 |
+
"version_major": 2,
|
| 203 |
+
"version_minor": 0
|
| 204 |
+
},
|
| 205 |
+
"text/plain": [
|
| 206 |
+
"preprocessor_config.json: 0%| | 0.00/585 [00:00<?, ?B/s]"
|
| 207 |
+
]
|
| 208 |
+
},
|
| 209 |
+
"metadata": {},
|
| 210 |
+
"output_type": "display_data"
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"data": {
|
| 214 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 215 |
+
"model_id": "3ff80bc2f64948408757caa8715d0603",
|
| 216 |
+
"version_major": 2,
|
| 217 |
+
"version_minor": 0
|
| 218 |
+
},
|
| 219 |
+
"text/plain": [
|
| 220 |
+
"config.json: 0%| | 0.00/744 [00:00<?, ?B/s]"
|
| 221 |
+
]
|
| 222 |
+
},
|
| 223 |
+
"metadata": {},
|
| 224 |
+
"output_type": "display_data"
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"data": {
|
| 228 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 229 |
+
"model_id": "f20b3989658642528f4ed91666320097",
|
| 230 |
+
"version_major": 2,
|
| 231 |
+
"version_minor": 0
|
| 232 |
+
},
|
| 233 |
+
"text/plain": [
|
| 234 |
+
"model.safetensors: 0%| | 0.00/3.36G [00:00<?, ?B/s]"
|
| 235 |
+
]
|
| 236 |
+
},
|
| 237 |
+
"metadata": {},
|
| 238 |
+
"output_type": "display_data"
|
| 239 |
+
}
|
| 240 |
+
],
|
| 241 |
+
"source": [
|
| 242 |
+
"import torch.nn as nn\n",
|
| 243 |
+
"import torch\n",
|
| 244 |
+
"from transformers import AutoImageProcessor, AutoModel, get_cosine_schedule_with_warmup\n",
|
| 245 |
+
"\n",
|
| 246 |
+
"MODEL_NAME = \"facebook/dinov3-vith16plus-pretrain-lvd1689m\"\n",
|
| 247 |
+
"\n",
|
| 248 |
+
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
|
| 249 |
+
"\n",
|
| 250 |
+
"\n",
|
| 251 |
+
"image_processor = AutoImageProcessor.from_pretrained(MODEL_NAME)\n",
|
| 252 |
+
"backbone = AutoModel.from_pretrained(MODEL_NAME)\n",
|
| 253 |
+
"\n",
|
| 254 |
+
"hidden_size = getattr(backbone.config, \"hidden_size\", None)\n",
|
| 255 |
+
"\n",
|
| 256 |
+
"class DinoV3Linear(nn.Module):\n",
|
| 257 |
+
" def __init__(self, backbone: AutoModel, hidden_size: int, num_classes: int, freeze_backbone: bool = True):\n",
|
| 258 |
+
" super().__init__()\n",
|
| 259 |
+
" self.backbone = backbone\n",
|
| 260 |
+
" if freeze_backbone:\n",
|
| 261 |
+
" for p in self.backbone.parameters():\n",
|
| 262 |
+
" p.requires_grad = False\n",
|
| 263 |
+
" self.backbone.eval()\n",
|
| 264 |
+
"\n",
|
| 265 |
+
" self.head = nn.Linear(hidden_size, num_classes)\n",
|
| 266 |
+
"\n",
|
| 267 |
+
" def forward(self, pixel_values):\n",
|
| 268 |
+
" outputs = self.backbone(pixel_values=pixel_values)\n",
|
| 269 |
+
" last_hidden = outputs.last_hidden_state\n",
|
| 270 |
+
" cls = last_hidden[:, 0]\n",
|
| 271 |
+
" logits = self.head(cls)\n",
|
| 272 |
+
" return logits\n",
|
| 273 |
+
"\n",
|
| 274 |
+
"model = DinoV3Linear(backbone, hidden_size, num_classes, freeze_backbone=True).to(device) # we only train the head"
|
| 275 |
+
]
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"cell_type": "markdown",
|
| 279 |
+
"metadata": {
|
| 280 |
+
"id": "IfC3TFbw9SlZ"
|
| 281 |
+
},
|
| 282 |
+
"source": [
|
| 283 |
+
"Write the data collator to batch inputs and dataloaders for training."
|
| 284 |
+
]
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"cell_type": "code",
|
| 288 |
+
"execution_count": 12,
|
| 289 |
+
"metadata": {
|
| 290 |
+
"id": "Wlo3_8qE9SVR"
|
| 291 |
+
},
|
| 292 |
+
"outputs": [],
|
| 293 |
+
"source": [
|
| 294 |
+
"from dataclasses import dataclass\n",
|
| 295 |
+
"from PIL import Image\n",
|
| 296 |
+
"import numpy as np\n",
|
| 297 |
+
"import torch\n",
|
| 298 |
+
"from transformers import AutoImageProcessor\n",
|
| 299 |
+
"\n",
|
| 300 |
+
"@dataclass\n",
|
| 301 |
+
"class Collator:\n",
|
| 302 |
+
" processor: AutoImageProcessor\n",
|
| 303 |
+
"\n",
|
| 304 |
+
" def __call__(self, batch):\n",
|
| 305 |
+
" raw_images = [x[\"image\"] for x in batch]\n",
|
| 306 |
+
" labels = torch.tensor([x[\"label\"] for x in batch], dtype=torch.long)\n",
|
| 307 |
+
"\n",
|
| 308 |
+
" rgb_images = []\n",
|
| 309 |
+
" # there's grayscale images in the dataset\n",
|
| 310 |
+
" for im in raw_images:\n",
|
| 311 |
+
" if isinstance(im, Image.Image):\n",
|
| 312 |
+
" rgb_images.append(im.convert(\"RGB\"))\n",
|
| 313 |
+
" continue\n",
|
| 314 |
+
"\n",
|
| 315 |
+
" inputs = self.processor(images=rgb_images, return_tensors=\"pt\")\n",
|
| 316 |
+
" return {\"pixel_values\": inputs[\"pixel_values\"], \"labels\": labels}\n",
|
| 317 |
+
"\n",
|
| 318 |
+
"collate_fn = Collator(image_processor)"
|
| 319 |
+
]
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"cell_type": "code",
|
| 323 |
+
"execution_count": 13,
|
| 324 |
+
"metadata": {
|
| 325 |
+
"id": "Nou-Ct_e9zV5"
|
| 326 |
+
},
|
| 327 |
+
"outputs": [],
|
| 328 |
+
"source": [
|
| 329 |
+
"from torch.utils.data import DataLoader\n",
|
| 330 |
+
"import os\n",
|
| 331 |
+
"\n",
|
| 332 |
+
"BATCH_SIZE = 8\n",
|
| 333 |
+
"NUM_WORKERS = min(8, os.cpu_count() or 2)\n",
|
| 334 |
+
"\n",
|
| 335 |
+
"train_loader = DataLoader(\n",
|
| 336 |
+
" train_ds,\n",
|
| 337 |
+
" batch_size=BATCH_SIZE,\n",
|
| 338 |
+
" shuffle=True,\n",
|
| 339 |
+
" num_workers=NUM_WORKERS,\n",
|
| 340 |
+
" pin_memory=True,\n",
|
| 341 |
+
" collate_fn=collate_fn,\n",
|
| 342 |
+
")\n",
|
| 343 |
+
"val_loader = DataLoader(\n",
|
| 344 |
+
" val_ds,\n",
|
| 345 |
+
" batch_size=BATCH_SIZE,\n",
|
| 346 |
+
" shuffle=False,\n",
|
| 347 |
+
" num_workers=NUM_WORKERS,\n",
|
| 348 |
+
" pin_memory=True,\n",
|
| 349 |
+
" collate_fn=collate_fn,\n",
|
| 350 |
+
")"
|
| 351 |
+
]
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"cell_type": "markdown",
|
| 355 |
+
"metadata": {
|
| 356 |
+
"id": "RblgS11W-Wuo"
|
| 357 |
+
},
|
| 358 |
+
"source": [
|
| 359 |
+
"## Training"
|
| 360 |
+
]
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"cell_type": "markdown",
|
| 364 |
+
"metadata": {
|
| 365 |
+
"id": "25sCxjwG_tPo"
|
| 366 |
+
},
|
| 367 |
+
"source": [
|
| 368 |
+
"Find config below."
|
| 369 |
+
]
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"cell_type": "code",
|
| 373 |
+
"execution_count": 14,
|
| 374 |
+
"metadata": {
|
| 375 |
+
"colab": {
|
| 376 |
+
"base_uri": "https://localhost:8080/"
|
| 377 |
+
},
|
| 378 |
+
"id": "WWM8KLQD_sya",
|
| 379 |
+
"outputId": "1672c194-aad2-4af2-a9cf-e61aa0d558b9"
|
| 380 |
+
},
|
| 381 |
+
"outputs": [
|
| 382 |
+
{
|
| 383 |
+
"name": "stderr",
|
| 384 |
+
"output_type": "stream",
|
| 385 |
+
"text": [
|
| 386 |
+
"/tmp/ipython-input-593493728.py:19: FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead.\n",
|
| 387 |
+
" scaler = torch.cuda.amp.GradScaler(enabled=torch.cuda.is_available())\n"
|
| 388 |
+
]
|
| 389 |
+
}
|
| 390 |
+
],
|
| 391 |
+
"source": [
|
| 392 |
+
"import math\n",
|
| 393 |
+
"import random\n",
|
| 394 |
+
"from typing import List, Dict, Any\n",
|
| 395 |
+
"\n",
|
| 396 |
+
"\n",
|
| 397 |
+
"EPOCHS = 5\n",
|
| 398 |
+
"LR = 5e-4\n",
|
| 399 |
+
"WEIGHT_DECAY = 1e-4\n",
|
| 400 |
+
"WARMUP_RATIO = 0.05\n",
|
| 401 |
+
"CHECKPOINT_DIR = \"./checkpoints_dinov3_food101\"\n",
|
| 402 |
+
"EVAL_EVERY_STEPS = 100\n",
|
| 403 |
+
"\n",
|
| 404 |
+
"optimizer = torch.optim.AdamW(filter(lambda p: p.requires_grad, model.parameters()), lr=LR, weight_decay=WEIGHT_DECAY)\n",
|
| 405 |
+
"total_steps = EPOCHS * math.ceil(len(train_loader))\n",
|
| 406 |
+
"warmup_steps = int(WARMUP_RATIO * total_steps)\n",
|
| 407 |
+
"scheduler = get_cosine_schedule_with_warmup(optimizer, num_warmup_steps=warmup_steps, num_training_steps=total_steps)\n",
|
| 408 |
+
"criterion = nn.CrossEntropyLoss()\n",
|
| 409 |
+
"\n",
|
| 410 |
+
"scaler = torch.cuda.amp.GradScaler(enabled=torch.cuda.is_available())"
|
| 411 |
+
]
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"cell_type": "code",
|
| 415 |
+
"execution_count": 15,
|
| 416 |
+
"metadata": {
|
| 417 |
+
"id": "OJPRRz09kxFT"
|
| 418 |
+
},
|
| 419 |
+
"outputs": [],
|
| 420 |
+
"source": [
|
| 421 |
+
"os.makedirs(\"./checkpoints_dinov3_food101\")"
|
| 422 |
+
]
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"cell_type": "markdown",
|
| 426 |
+
"metadata": {
|
| 427 |
+
"id": "FHS5DSu1_22g"
|
| 428 |
+
},
|
| 429 |
+
"source": [
|
| 430 |
+
"We need to evaluate during training."
|
| 431 |
+
]
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"cell_type": "code",
|
| 435 |
+
"execution_count": 16,
|
| 436 |
+
"metadata": {
|
| 437 |
+
"id": "TSD4tzZr_4i3"
|
| 438 |
+
},
|
| 439 |
+
"outputs": [],
|
| 440 |
+
"source": [
|
| 441 |
+
"def evaluate() -> Dict[str, float]:\n",
|
| 442 |
+
" model.eval()\n",
|
| 443 |
+
" correct, total, loss_sum = 0, 0, 0.0\n",
|
| 444 |
+
" with torch.no_grad():\n",
|
| 445 |
+
" for batch in val_loader:\n",
|
| 446 |
+
" pixel_values = batch[\"pixel_values\"].to(device, non_blocking=True)\n",
|
| 447 |
+
" labels = batch[\"labels\"].to(device, non_blocking=True)\n",
|
| 448 |
+
" logits = model(pixel_values)\n",
|
| 449 |
+
" loss = criterion(logits, labels)\n",
|
| 450 |
+
" loss_sum += loss.item() * labels.size(0)\n",
|
| 451 |
+
" preds = logits.argmax(dim=-1)\n",
|
| 452 |
+
" correct += (preds == labels).sum().item()\n",
|
| 453 |
+
" total += labels.size(0)\n",
|
| 454 |
+
" return {\n",
|
| 455 |
+
" \"val_loss\": loss_sum / max(total, 1),\n",
|
| 456 |
+
" \"val_acc\": correct / max(total, 1),\n",
|
| 457 |
+
" }"
|
| 458 |
+
]
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"cell_type": "markdown",
|
| 462 |
+
"metadata": {
|
| 463 |
+
"id": "yakvOUOkAVcR"
|
| 464 |
+
},
|
| 465 |
+
"source": [
|
| 466 |
+
"Let's write the training loop. We'll also use trackio for experiment tracking."
|
| 467 |
+
]
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"cell_type": "code",
|
| 471 |
+
"execution_count": null,
|
| 472 |
+
"metadata": {},
|
| 473 |
+
"outputs": [],
|
| 474 |
+
"source": [
|
| 475 |
+
"import trackio\n",
|
| 476 |
+
"\n",
|
| 477 |
+
"best_acc = 0.0\n",
|
| 478 |
+
"global_step = 0\n",
|
| 479 |
+
"\n",
|
| 480 |
+
"trackio.init(project=\"dinov3\", config={\n",
|
| 481 |
+
" \"epochs\": EPOCHS,\n",
|
| 482 |
+
" \"learning_rate\": LR,\n",
|
| 483 |
+
" \"batch_size\": BATCH_SIZE\n",
|
| 484 |
+
" })\n",
|
| 485 |
+
"\n",
|
| 486 |
+
"for epoch in range(1, EPOCHS + 1):\n",
|
| 487 |
+
" model.train()\n",
|
| 488 |
+
" model.backbone.eval() # comment out if you want to train the whole model\n",
|
| 489 |
+
"\n",
|
| 490 |
+
" running_loss = 0.0\n",
|
| 491 |
+
" for i, batch in enumerate(train_loader, start=1):\n",
|
| 492 |
+
" pixel_values = batch[\"pixel_values\"].to(device, non_blocking=True)\n",
|
| 493 |
+
" labels = batch[\"labels\"].to(device, non_blocking=True)\n",
|
| 494 |
+
"\n",
|
| 495 |
+
" optimizer.zero_grad(set_to_none=True)\n",
|
| 496 |
+
" logits = model(pixel_values)\n",
|
| 497 |
+
" loss = criterion(logits, labels)\n",
|
| 498 |
+
"\n",
|
| 499 |
+
" scaler.scale(loss).backward()\n",
|
| 500 |
+
" scaler.step(optimizer)\n",
|
| 501 |
+
" scaler.update()\n",
|
| 502 |
+
" scheduler.step()\n",
|
| 503 |
+
"\n",
|
| 504 |
+
" running_loss += loss.item()\n",
|
| 505 |
+
" global_step += 1\n",
|
| 506 |
+
"\n",
|
| 507 |
+
" if global_step % EVAL_EVERY_STEPS == 0:\n",
|
| 508 |
+
" metrics = evaluate()\n",
|
| 509 |
+
" print(\n",
|
| 510 |
+
" f\"[epoch {epoch} | step {global_step}] \"\n",
|
| 511 |
+
" f\"train_loss={running_loss / EVAL_EVERY_STEPS:.4f} \"\n",
|
| 512 |
+
" f\"val_loss={metrics['val_loss']:.4f} val_acc={metrics['val_acc']*100:.2f}%\"\n",
|
| 513 |
+
" )\n",
|
| 514 |
+
" running_loss = 0.0\n",
|
| 515 |
+
"\n",
|
| 516 |
+
" trackio.log(\n",
|
| 517 |
+
" {\n",
|
| 518 |
+
" \"epoch\": epoch,\n",
|
| 519 |
+
" \"val_acc\": best_acc,\n",
|
| 520 |
+
" }\n",
|
| 521 |
+
" )\n",
|
| 522 |
+
"\n",
|
| 523 |
+
" if metrics[\"val_acc\"] > best_acc:\n",
|
| 524 |
+
" best_acc = metrics[\"val_acc\"]\n",
|
| 525 |
+
" ckpt_path = os.path.join(CHECKPOINT_DIR, f\"best_acc_{best_acc:.4f}.pt\")\n",
|
| 526 |
+
" torch.save(\n",
|
| 527 |
+
" {\n",
|
| 528 |
+
" \"model_state_dict\": model.state_dict(),\n",
|
| 529 |
+
" \"optimizer_state_dict\": optimizer.state_dict(),\n",
|
| 530 |
+
" \"scheduler_state_dict\": scheduler.state_dict(),\n",
|
| 531 |
+
" \"config\": {\n",
|
| 532 |
+
" \"model_name\": MODEL_NAME,\n",
|
| 533 |
+
" \"num_classes\": num_classes,\n",
|
| 534 |
+
" },\n",
|
| 535 |
+
" \"step\": global_step,\n",
|
| 536 |
+
" \"epoch\": epoch,\n",
|
| 537 |
+
" },\n",
|
| 538 |
+
" ckpt_path,\n",
|
| 539 |
+
" )\n",
|
| 540 |
+
"\n",
|
| 541 |
+
"\n",
|
| 542 |
+
" metrics = evaluate()\n",
|
| 543 |
+
" print(\n",
|
| 544 |
+
" f\"END EPOCH {epoch}: val_loss={metrics['val_loss']:.4f} val_acc={metrics['val_acc']*100:.2f}% \"\n",
|
| 545 |
+
" f\"(best_acc={best_acc*100:.2f}%)\"\n",
|
| 546 |
+
" )\n",
|
| 547 |
+
" trackio.finish()"
|
| 548 |
+
]
|
| 549 |
+
},
|
| 550 |
+
{
|
| 551 |
+
"cell_type": "code",
|
| 552 |
+
"execution_count": null,
|
| 553 |
+
"metadata": {
|
| 554 |
+
"id": "dX0kEHogATQ_"
|
| 555 |
+
},
|
| 556 |
+
"outputs": [],
|
| 557 |
+
"source": [
|
| 558 |
+
"!trackio show"
|
| 559 |
+
]
|
| 560 |
+
},
|
| 561 |
+
{
|
| 562 |
+
"cell_type": "markdown",
|
| 563 |
+
"metadata": {
|
| 564 |
+
"id": "VKpGJ4L7bb2E"
|
| 565 |
+
},
|
| 566 |
+
"source": [
|
| 567 |
+
"Let's infer with the model, I have a few in the wild images."
|
| 568 |
+
]
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"cell_type": "code",
|
| 572 |
+
"execution_count": 19,
|
| 573 |
+
"metadata": {
|
| 574 |
+
"id": "RGZntYQEaVbA"
|
| 575 |
+
},
|
| 576 |
+
"outputs": [],
|
| 577 |
+
"source": [
|
| 578 |
+
"import torch\n",
|
| 579 |
+
"from PIL import Image\n",
|
| 580 |
+
"from typing import List, Dict\n",
|
| 581 |
+
"\n",
|
| 582 |
+
"\n",
|
| 583 |
+
"model.eval()\n",
|
| 584 |
+
"\n",
|
| 585 |
+
"images = [\"/content/pizza.jpg\", \"/content/spaghetti.JPG\"]\n",
|
| 586 |
+
"\n",
|
| 587 |
+
"pil_images = [Image.open(p).convert(\"RGB\") for p in images]\n",
|
| 588 |
+
"inputs = image_processor(images=pil_images, return_tensors=\"pt\").to(device)\n",
|
| 589 |
+
"\n",
|
| 590 |
+
"with torch.no_grad():\n",
|
| 591 |
+
" logits = model(inputs[\"pixel_values\"])\n",
|
| 592 |
+
"\n",
|
| 593 |
+
"# take top 2 classes\n",
|
| 594 |
+
"probs = logits.softmax(dim=-1)\n",
|
| 595 |
+
"scores, indices = probs.topk(2, dim=-1)\n",
|
| 596 |
+
"\n",
|
| 597 |
+
"results = []\n",
|
| 598 |
+
"for path, idxs, scs in zip(images, indices, scores):\n",
|
| 599 |
+
" preds = [\n",
|
| 600 |
+
" {\"label_id\": int(i.item()),\n",
|
| 601 |
+
" \"label\": id2label.get(int(i.item()), f\"class_{int(i)}\"),\n",
|
| 602 |
+
" \"score\": float(s.item())}\n",
|
| 603 |
+
" for i, s in zip(idxs, scs)\n",
|
| 604 |
+
" ]\n",
|
| 605 |
+
" results.append({\"image\": path, \"topk\": preds})\n"
|
| 606 |
+
]
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"cell_type": "markdown",
|
| 610 |
+
"metadata": {
|
| 611 |
+
"id": "bFoB-1Ebcab1"
|
| 612 |
+
},
|
| 613 |
+
"source": [
|
| 614 |
+
"The model predicts correctly, which is expected given we only trained head with the great backbone frozen, it learned very fast. Feel free to try with more challenging use cases."
|
| 615 |
+
]
|
| 616 |
+
},
|
| 617 |
+
{
|
| 618 |
+
"cell_type": "code",
|
| 619 |
+
"execution_count": 20,
|
| 620 |
+
"metadata": {
|
| 621 |
+
"colab": {
|
| 622 |
+
"base_uri": "https://localhost:8080/"
|
| 623 |
+
},
|
| 624 |
+
"id": "NrgtO2D1cXzj",
|
| 625 |
+
"outputId": "c972e7d0-ee78-45d3-e91f-7c68521d6a0b"
|
| 626 |
+
},
|
| 627 |
+
"outputs": [
|
| 628 |
+
{
|
| 629 |
+
"data": {
|
| 630 |
+
"text/plain": [
|
| 631 |
+
"[{'image': '/content/pizza.jpg',\n",
|
| 632 |
+
" 'topk': [{'label_id': 76, 'label': 'pizza', 'score': 0.7595003843307495},\n",
|
| 633 |
+
" {'label_id': 35, 'label': 'escargots', 'score': 0.013227012008428574}]},\n",
|
| 634 |
+
" {'image': '/content/spaghetti.JPG',\n",
|
| 635 |
+
" 'topk': [{'label_id': 91,\n",
|
| 636 |
+
" 'label': 'spaghetti_carbonara',\n",
|
| 637 |
+
" 'score': 0.6622196435928345},\n",
|
| 638 |
+
" {'label_id': 90,\n",
|
| 639 |
+
" 'label': 'spaghetti_bolognese',\n",
|
| 640 |
+
" 'score': 0.18182380497455597}]}]"
|
| 641 |
+
]
|
| 642 |
+
},
|
| 643 |
+
"execution_count": 20,
|
| 644 |
+
"metadata": {},
|
| 645 |
+
"output_type": "execute_result"
|
| 646 |
+
}
|
| 647 |
+
],
|
| 648 |
+
"source": [
|
| 649 |
+
"results"
|
| 650 |
+
]
|
| 651 |
+
}
|
| 652 |
+
],
|
| 653 |
+
"metadata": {
|
| 654 |
+
"accelerator": "GPU",
|
| 655 |
+
"colab": {
|
| 656 |
+
"gpuType": "L4",
|
| 657 |
+
"machine_shape": "hm",
|
| 658 |
+
"provenance": []
|
| 659 |
+
},
|
| 660 |
+
"kernelspec": {
|
| 661 |
+
"display_name": "Python 3",
|
| 662 |
+
"name": "python3"
|
| 663 |
+
},
|
| 664 |
+
"language_info": {
|
| 665 |
+
"name": "python"
|
| 666 |
+
},
|
| 667 |
+
"widgets": {
|
| 668 |
+
"application/vnd.jupyter.widget-state+json": {
|
| 669 |
+
"062d36b5d0c043a597eb9b3ebd35f313": {
|
| 670 |
+
"model_module": "@jupyter-widgets/base",
|
| 671 |
+
"model_module_version": "1.2.0",
|
| 672 |
+
"model_name": "LayoutModel",
|
| 673 |
+
"state": {
|
| 674 |
+
"_model_module": "@jupyter-widgets/base",
|
| 675 |
+
"_model_module_version": "1.2.0",
|
| 676 |
+
"_model_name": "LayoutModel",
|
| 677 |
+
"_view_count": null,
|
| 678 |
+
"_view_module": "@jupyter-widgets/base",
|
| 679 |
+
"_view_module_version": "1.2.0",
|
| 680 |
+
"_view_name": "LayoutView",
|
| 681 |
+
"align_content": null,
|
| 682 |
+
"align_items": null,
|
| 683 |
+
"align_self": null,
|
| 684 |
+
"border": null,
|
| 685 |
+
"bottom": null,
|
| 686 |
+
"display": null,
|
| 687 |
+
"flex": null,
|
| 688 |
+
"flex_flow": null,
|
| 689 |
+
"grid_area": null,
|
| 690 |
+
"grid_auto_columns": null,
|
| 691 |
+
"grid_auto_flow": null,
|
| 692 |
+
"grid_auto_rows": null,
|
| 693 |
+
"grid_column": null,
|
| 694 |
+
"grid_gap": null,
|
| 695 |
+
"grid_row": null,
|
| 696 |
+
"grid_template_areas": null,
|
| 697 |
+
"grid_template_columns": null,
|
| 698 |
+
"grid_template_rows": null,
|
| 699 |
+
"height": null,
|
| 700 |
+
"justify_content": null,
|
| 701 |
+
"justify_items": null,
|
| 702 |
+
"left": null,
|
| 703 |
+
"margin": null,
|
| 704 |
+
"max_height": null,
|
| 705 |
+
"max_width": null,
|
| 706 |
+
"min_height": null,
|
| 707 |
+
"min_width": null,
|
| 708 |
+
"object_fit": null,
|
| 709 |
+
"object_position": null,
|
| 710 |
+
"order": null,
|
| 711 |
+
"overflow": null,
|
| 712 |
+
"overflow_x": null,
|
| 713 |
+
"overflow_y": null,
|
| 714 |
+
"padding": null,
|
| 715 |
+
"right": null,
|
| 716 |
+
"top": null,
|
| 717 |
+
"visibility": null,
|
| 718 |
+
"width": null
|
| 719 |
+
}
|
| 720 |
+
},
|
| 721 |
+
"0ce7bd7e52074f29b446ef2d4dd0921a": {
|
| 722 |
+
"model_module": "@jupyter-widgets/base",
|
| 723 |
+
"model_module_version": "1.2.0",
|
| 724 |
+
"model_name": "LayoutModel",
|
| 725 |
+
"state": {
|
| 726 |
+
"_model_module": "@jupyter-widgets/base",
|
| 727 |
+
"_model_module_version": "1.2.0",
|
| 728 |
+
"_model_name": "LayoutModel",
|
| 729 |
+
"_view_count": null,
|
| 730 |
+
"_view_module": "@jupyter-widgets/base",
|
| 731 |
+
"_view_module_version": "1.2.0",
|
| 732 |
+
"_view_name": "LayoutView",
|
| 733 |
+
"align_content": null,
|
| 734 |
+
"align_items": null,
|
| 735 |
+
"align_self": null,
|
| 736 |
+
"border": null,
|
| 737 |
+
"bottom": null,
|
| 738 |
+
"display": null,
|
| 739 |
+
"flex": null,
|
| 740 |
+
"flex_flow": null,
|
| 741 |
+
"grid_area": null,
|
| 742 |
+
"grid_auto_columns": null,
|
| 743 |
+
"grid_auto_flow": null,
|
| 744 |
+
"grid_auto_rows": null,
|
| 745 |
+
"grid_column": null,
|
| 746 |
+
"grid_gap": null,
|
| 747 |
+
"grid_row": null,
|
| 748 |
+
"grid_template_areas": null,
|
| 749 |
+
"grid_template_columns": null,
|
| 750 |
+
"grid_template_rows": null,
|
| 751 |
+
"height": null,
|
| 752 |
+
"justify_content": null,
|
| 753 |
+
"justify_items": null,
|
| 754 |
+
"left": null,
|
| 755 |
+
"margin": null,
|
| 756 |
+
"max_height": null,
|
| 757 |
+
"max_width": null,
|
| 758 |
+
"min_height": null,
|
| 759 |
+
"min_width": null,
|
| 760 |
+
"object_fit": null,
|
| 761 |
+
"object_position": null,
|
| 762 |
+
"order": null,
|
| 763 |
+
"overflow": null,
|
| 764 |
+
"overflow_x": null,
|
| 765 |
+
"overflow_y": null,
|
| 766 |
+
"padding": null,
|
| 767 |
+
"right": null,
|
| 768 |
+
"top": null,
|
| 769 |
+
"visibility": null,
|
| 770 |
+
"width": null
|
| 771 |
+
}
|
| 772 |
+
},
|
| 773 |
+
"12aa8675bca54f05a6deb7ec7a5def7a": {
|
| 774 |
+
"model_module": "@jupyter-widgets/controls",
|
| 775 |
+
"model_module_version": "1.5.0",
|
| 776 |
+
"model_name": "HTMLModel",
|
| 777 |
+
"state": {
|
| 778 |
+
"_dom_classes": [],
|
| 779 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 780 |
+
"_model_module_version": "1.5.0",
|
| 781 |
+
"_model_name": "HTMLModel",
|
| 782 |
+
"_view_count": null,
|
| 783 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 784 |
+
"_view_module_version": "1.5.0",
|
| 785 |
+
"_view_name": "HTMLView",
|
| 786 |
+
"description": "",
|
| 787 |
+
"description_tooltip": null,
|
| 788 |
+
"layout": "IPY_MODEL_2c2223a6ae3e4ff6be96a5f4e2d2d9b6",
|
| 789 |
+
"placeholder": "​",
|
| 790 |
+
"style": "IPY_MODEL_f2c7be27f90b49a3abe51b5e3003c17d",
|
| 791 |
+
"value": "config.json: 100%"
|
| 792 |
+
}
|
| 793 |
+
},
|
| 794 |
+
"2c2223a6ae3e4ff6be96a5f4e2d2d9b6": {
|
| 795 |
+
"model_module": "@jupyter-widgets/base",
|
| 796 |
+
"model_module_version": "1.2.0",
|
| 797 |
+
"model_name": "LayoutModel",
|
| 798 |
+
"state": {
|
| 799 |
+
"_model_module": "@jupyter-widgets/base",
|
| 800 |
+
"_model_module_version": "1.2.0",
|
| 801 |
+
"_model_name": "LayoutModel",
|
| 802 |
+
"_view_count": null,
|
| 803 |
+
"_view_module": "@jupyter-widgets/base",
|
| 804 |
+
"_view_module_version": "1.2.0",
|
| 805 |
+
"_view_name": "LayoutView",
|
| 806 |
+
"align_content": null,
|
| 807 |
+
"align_items": null,
|
| 808 |
+
"align_self": null,
|
| 809 |
+
"border": null,
|
| 810 |
+
"bottom": null,
|
| 811 |
+
"display": null,
|
| 812 |
+
"flex": null,
|
| 813 |
+
"flex_flow": null,
|
| 814 |
+
"grid_area": null,
|
| 815 |
+
"grid_auto_columns": null,
|
| 816 |
+
"grid_auto_flow": null,
|
| 817 |
+
"grid_auto_rows": null,
|
| 818 |
+
"grid_column": null,
|
| 819 |
+
"grid_gap": null,
|
| 820 |
+
"grid_row": null,
|
| 821 |
+
"grid_template_areas": null,
|
| 822 |
+
"grid_template_columns": null,
|
| 823 |
+
"grid_template_rows": null,
|
| 824 |
+
"height": null,
|
| 825 |
+
"justify_content": null,
|
| 826 |
+
"justify_items": null,
|
| 827 |
+
"left": null,
|
| 828 |
+
"margin": null,
|
| 829 |
+
"max_height": null,
|
| 830 |
+
"max_width": null,
|
| 831 |
+
"min_height": null,
|
| 832 |
+
"min_width": null,
|
| 833 |
+
"object_fit": null,
|
| 834 |
+
"object_position": null,
|
| 835 |
+
"order": null,
|
| 836 |
+
"overflow": null,
|
| 837 |
+
"overflow_x": null,
|
| 838 |
+
"overflow_y": null,
|
| 839 |
+
"padding": null,
|
| 840 |
+
"right": null,
|
| 841 |
+
"top": null,
|
| 842 |
+
"visibility": null,
|
| 843 |
+
"width": null
|
| 844 |
+
}
|
| 845 |
+
},
|
| 846 |
+
"31a74feac76f4744a0f34fbc99433831": {
|
| 847 |
+
"model_module": "@jupyter-widgets/controls",
|
| 848 |
+
"model_module_version": "1.5.0",
|
| 849 |
+
"model_name": "FloatProgressModel",
|
| 850 |
+
"state": {
|
| 851 |
+
"_dom_classes": [],
|
| 852 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 853 |
+
"_model_module_version": "1.5.0",
|
| 854 |
+
"_model_name": "FloatProgressModel",
|
| 855 |
+
"_view_count": null,
|
| 856 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 857 |
+
"_view_module_version": "1.5.0",
|
| 858 |
+
"_view_name": "ProgressView",
|
| 859 |
+
"bar_style": "success",
|
| 860 |
+
"description": "",
|
| 861 |
+
"description_tooltip": null,
|
| 862 |
+
"layout": "IPY_MODEL_76d1f15c857640c3b06d98aef478f234",
|
| 863 |
+
"max": 744,
|
| 864 |
+
"min": 0,
|
| 865 |
+
"orientation": "horizontal",
|
| 866 |
+
"style": "IPY_MODEL_d43089f8240c44339c6881355ff0aee3",
|
| 867 |
+
"value": 744
|
| 868 |
+
}
|
| 869 |
+
},
|
| 870 |
+
"32138245d41348928cc5b5834b07cb7e": {
|
| 871 |
+
"model_module": "@jupyter-widgets/controls",
|
| 872 |
+
"model_module_version": "1.5.0",
|
| 873 |
+
"model_name": "HBoxModel",
|
| 874 |
+
"state": {
|
| 875 |
+
"_dom_classes": [],
|
| 876 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 877 |
+
"_model_module_version": "1.5.0",
|
| 878 |
+
"_model_name": "HBoxModel",
|
| 879 |
+
"_view_count": null,
|
| 880 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 881 |
+
"_view_module_version": "1.5.0",
|
| 882 |
+
"_view_name": "HBoxView",
|
| 883 |
+
"box_style": "",
|
| 884 |
+
"children": [
|
| 885 |
+
"IPY_MODEL_df6de04fdb204d348767dd0b2d0e88f7",
|
| 886 |
+
"IPY_MODEL_63a3800d62dd41d6b4a3f643a8930d95",
|
| 887 |
+
"IPY_MODEL_49d67bd205184874a5cee04d318d91fe"
|
| 888 |
+
],
|
| 889 |
+
"layout": "IPY_MODEL_f00ace964f96471b9eb839cce48ce378"
|
| 890 |
+
}
|
| 891 |
+
},
|
| 892 |
+
"34be83ddb4bf43e58cadbcbac5a606b7": {
|
| 893 |
+
"model_module": "@jupyter-widgets/controls",
|
| 894 |
+
"model_module_version": "1.5.0",
|
| 895 |
+
"model_name": "ProgressStyleModel",
|
| 896 |
+
"state": {
|
| 897 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 898 |
+
"_model_module_version": "1.5.0",
|
| 899 |
+
"_model_name": "ProgressStyleModel",
|
| 900 |
+
"_view_count": null,
|
| 901 |
+
"_view_module": "@jupyter-widgets/base",
|
| 902 |
+
"_view_module_version": "1.2.0",
|
| 903 |
+
"_view_name": "StyleView",
|
| 904 |
+
"bar_color": null,
|
| 905 |
+
"description_width": ""
|
| 906 |
+
}
|
| 907 |
+
},
|
| 908 |
+
"3ad0ac8def244930a3aff41d68a88a65": {
|
| 909 |
+
"model_module": "@jupyter-widgets/base",
|
| 910 |
+
"model_module_version": "1.2.0",
|
| 911 |
+
"model_name": "LayoutModel",
|
| 912 |
+
"state": {
|
| 913 |
+
"_model_module": "@jupyter-widgets/base",
|
| 914 |
+
"_model_module_version": "1.2.0",
|
| 915 |
+
"_model_name": "LayoutModel",
|
| 916 |
+
"_view_count": null,
|
| 917 |
+
"_view_module": "@jupyter-widgets/base",
|
| 918 |
+
"_view_module_version": "1.2.0",
|
| 919 |
+
"_view_name": "LayoutView",
|
| 920 |
+
"align_content": null,
|
| 921 |
+
"align_items": null,
|
| 922 |
+
"align_self": null,
|
| 923 |
+
"border": null,
|
| 924 |
+
"bottom": null,
|
| 925 |
+
"display": null,
|
| 926 |
+
"flex": null,
|
| 927 |
+
"flex_flow": null,
|
| 928 |
+
"grid_area": null,
|
| 929 |
+
"grid_auto_columns": null,
|
| 930 |
+
"grid_auto_flow": null,
|
| 931 |
+
"grid_auto_rows": null,
|
| 932 |
+
"grid_column": null,
|
| 933 |
+
"grid_gap": null,
|
| 934 |
+
"grid_row": null,
|
| 935 |
+
"grid_template_areas": null,
|
| 936 |
+
"grid_template_columns": null,
|
| 937 |
+
"grid_template_rows": null,
|
| 938 |
+
"height": null,
|
| 939 |
+
"justify_content": null,
|
| 940 |
+
"justify_items": null,
|
| 941 |
+
"left": null,
|
| 942 |
+
"margin": null,
|
| 943 |
+
"max_height": null,
|
| 944 |
+
"max_width": null,
|
| 945 |
+
"min_height": null,
|
| 946 |
+
"min_width": null,
|
| 947 |
+
"object_fit": null,
|
| 948 |
+
"object_position": null,
|
| 949 |
+
"order": null,
|
| 950 |
+
"overflow": null,
|
| 951 |
+
"overflow_x": null,
|
| 952 |
+
"overflow_y": null,
|
| 953 |
+
"padding": null,
|
| 954 |
+
"right": null,
|
| 955 |
+
"top": null,
|
| 956 |
+
"visibility": null,
|
| 957 |
+
"width": null
|
| 958 |
+
}
|
| 959 |
+
},
|
| 960 |
+
"3ee9921a635d44ec9b248e2155b5b243": {
|
| 961 |
+
"model_module": "@jupyter-widgets/controls",
|
| 962 |
+
"model_module_version": "1.5.0",
|
| 963 |
+
"model_name": "HTMLModel",
|
| 964 |
+
"state": {
|
| 965 |
+
"_dom_classes": [],
|
| 966 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 967 |
+
"_model_module_version": "1.5.0",
|
| 968 |
+
"_model_name": "HTMLModel",
|
| 969 |
+
"_view_count": null,
|
| 970 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 971 |
+
"_view_module_version": "1.5.0",
|
| 972 |
+
"_view_name": "HTMLView",
|
| 973 |
+
"description": "",
|
| 974 |
+
"description_tooltip": null,
|
| 975 |
+
"layout": "IPY_MODEL_65d8b73e3bdd46fca8a42b67739e27f9",
|
| 976 |
+
"placeholder": "​",
|
| 977 |
+
"style": "IPY_MODEL_b566321171044b0eb02ea3bd8c0472df",
|
| 978 |
+
"value": "model.safetensors: 100%"
|
| 979 |
+
}
|
| 980 |
+
},
|
| 981 |
+
"3ff0fc5ce62a44b9950dd8575d90bd21": {
|
| 982 |
+
"model_module": "@jupyter-widgets/controls",
|
| 983 |
+
"model_module_version": "1.5.0",
|
| 984 |
+
"model_name": "HTMLModel",
|
| 985 |
+
"state": {
|
| 986 |
+
"_dom_classes": [],
|
| 987 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 988 |
+
"_model_module_version": "1.5.0",
|
| 989 |
+
"_model_name": "HTMLModel",
|
| 990 |
+
"_view_count": null,
|
| 991 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 992 |
+
"_view_module_version": "1.5.0",
|
| 993 |
+
"_view_name": "HTMLView",
|
| 994 |
+
"description": "",
|
| 995 |
+
"description_tooltip": null,
|
| 996 |
+
"layout": "IPY_MODEL_8410c9d15bca4c9f8b3aab2b7d327211",
|
| 997 |
+
"placeholder": "​",
|
| 998 |
+
"style": "IPY_MODEL_fb359d0651a74fe790aaace9a5d0e329",
|
| 999 |
+
"value": " 3.36G/3.36G [00:18<00:00, 296MB/s]"
|
| 1000 |
+
}
|
| 1001 |
+
},
|
| 1002 |
+
"3ff80bc2f64948408757caa8715d0603": {
|
| 1003 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1004 |
+
"model_module_version": "1.5.0",
|
| 1005 |
+
"model_name": "HBoxModel",
|
| 1006 |
+
"state": {
|
| 1007 |
+
"_dom_classes": [],
|
| 1008 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1009 |
+
"_model_module_version": "1.5.0",
|
| 1010 |
+
"_model_name": "HBoxModel",
|
| 1011 |
+
"_view_count": null,
|
| 1012 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1013 |
+
"_view_module_version": "1.5.0",
|
| 1014 |
+
"_view_name": "HBoxView",
|
| 1015 |
+
"box_style": "",
|
| 1016 |
+
"children": [
|
| 1017 |
+
"IPY_MODEL_12aa8675bca54f05a6deb7ec7a5def7a",
|
| 1018 |
+
"IPY_MODEL_31a74feac76f4744a0f34fbc99433831",
|
| 1019 |
+
"IPY_MODEL_bd51d97e739a4e78ad28083043f638d8"
|
| 1020 |
+
],
|
| 1021 |
+
"layout": "IPY_MODEL_062d36b5d0c043a597eb9b3ebd35f313"
|
| 1022 |
+
}
|
| 1023 |
+
},
|
| 1024 |
+
"49d67bd205184874a5cee04d318d91fe": {
|
| 1025 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1026 |
+
"model_module_version": "1.5.0",
|
| 1027 |
+
"model_name": "HTMLModel",
|
| 1028 |
+
"state": {
|
| 1029 |
+
"_dom_classes": [],
|
| 1030 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1031 |
+
"_model_module_version": "1.5.0",
|
| 1032 |
+
"_model_name": "HTMLModel",
|
| 1033 |
+
"_view_count": null,
|
| 1034 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1035 |
+
"_view_module_version": "1.5.0",
|
| 1036 |
+
"_view_name": "HTMLView",
|
| 1037 |
+
"description": "",
|
| 1038 |
+
"description_tooltip": null,
|
| 1039 |
+
"layout": "IPY_MODEL_0ce7bd7e52074f29b446ef2d4dd0921a",
|
| 1040 |
+
"placeholder": "​",
|
| 1041 |
+
"style": "IPY_MODEL_7e2178d696c04d5787e736ace9ab57c0",
|
| 1042 |
+
"value": " 585/585 [00:00<00:00, 65.6kB/s]"
|
| 1043 |
+
}
|
| 1044 |
+
},
|
| 1045 |
+
"5c16553a2ff34a37a2cb62b4a4c42a6f": {
|
| 1046 |
+
"model_module": "@jupyter-widgets/base",
|
| 1047 |
+
"model_module_version": "1.2.0",
|
| 1048 |
+
"model_name": "LayoutModel",
|
| 1049 |
+
"state": {
|
| 1050 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1051 |
+
"_model_module_version": "1.2.0",
|
| 1052 |
+
"_model_name": "LayoutModel",
|
| 1053 |
+
"_view_count": null,
|
| 1054 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1055 |
+
"_view_module_version": "1.2.0",
|
| 1056 |
+
"_view_name": "LayoutView",
|
| 1057 |
+
"align_content": null,
|
| 1058 |
+
"align_items": null,
|
| 1059 |
+
"align_self": null,
|
| 1060 |
+
"border": null,
|
| 1061 |
+
"bottom": null,
|
| 1062 |
+
"display": null,
|
| 1063 |
+
"flex": null,
|
| 1064 |
+
"flex_flow": null,
|
| 1065 |
+
"grid_area": null,
|
| 1066 |
+
"grid_auto_columns": null,
|
| 1067 |
+
"grid_auto_flow": null,
|
| 1068 |
+
"grid_auto_rows": null,
|
| 1069 |
+
"grid_column": null,
|
| 1070 |
+
"grid_gap": null,
|
| 1071 |
+
"grid_row": null,
|
| 1072 |
+
"grid_template_areas": null,
|
| 1073 |
+
"grid_template_columns": null,
|
| 1074 |
+
"grid_template_rows": null,
|
| 1075 |
+
"height": null,
|
| 1076 |
+
"justify_content": null,
|
| 1077 |
+
"justify_items": null,
|
| 1078 |
+
"left": null,
|
| 1079 |
+
"margin": null,
|
| 1080 |
+
"max_height": null,
|
| 1081 |
+
"max_width": null,
|
| 1082 |
+
"min_height": null,
|
| 1083 |
+
"min_width": null,
|
| 1084 |
+
"object_fit": null,
|
| 1085 |
+
"object_position": null,
|
| 1086 |
+
"order": null,
|
| 1087 |
+
"overflow": null,
|
| 1088 |
+
"overflow_x": null,
|
| 1089 |
+
"overflow_y": null,
|
| 1090 |
+
"padding": null,
|
| 1091 |
+
"right": null,
|
| 1092 |
+
"top": null,
|
| 1093 |
+
"visibility": null,
|
| 1094 |
+
"width": null
|
| 1095 |
+
}
|
| 1096 |
+
},
|
| 1097 |
+
"62535e046f794a28b4002c3f34fe7ff7": {
|
| 1098 |
+
"model_module": "@jupyter-widgets/base",
|
| 1099 |
+
"model_module_version": "1.2.0",
|
| 1100 |
+
"model_name": "LayoutModel",
|
| 1101 |
+
"state": {
|
| 1102 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1103 |
+
"_model_module_version": "1.2.0",
|
| 1104 |
+
"_model_name": "LayoutModel",
|
| 1105 |
+
"_view_count": null,
|
| 1106 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1107 |
+
"_view_module_version": "1.2.0",
|
| 1108 |
+
"_view_name": "LayoutView",
|
| 1109 |
+
"align_content": null,
|
| 1110 |
+
"align_items": null,
|
| 1111 |
+
"align_self": null,
|
| 1112 |
+
"border": null,
|
| 1113 |
+
"bottom": null,
|
| 1114 |
+
"display": null,
|
| 1115 |
+
"flex": null,
|
| 1116 |
+
"flex_flow": null,
|
| 1117 |
+
"grid_area": null,
|
| 1118 |
+
"grid_auto_columns": null,
|
| 1119 |
+
"grid_auto_flow": null,
|
| 1120 |
+
"grid_auto_rows": null,
|
| 1121 |
+
"grid_column": null,
|
| 1122 |
+
"grid_gap": null,
|
| 1123 |
+
"grid_row": null,
|
| 1124 |
+
"grid_template_areas": null,
|
| 1125 |
+
"grid_template_columns": null,
|
| 1126 |
+
"grid_template_rows": null,
|
| 1127 |
+
"height": null,
|
| 1128 |
+
"justify_content": null,
|
| 1129 |
+
"justify_items": null,
|
| 1130 |
+
"left": null,
|
| 1131 |
+
"margin": null,
|
| 1132 |
+
"max_height": null,
|
| 1133 |
+
"max_width": null,
|
| 1134 |
+
"min_height": null,
|
| 1135 |
+
"min_width": null,
|
| 1136 |
+
"object_fit": null,
|
| 1137 |
+
"object_position": null,
|
| 1138 |
+
"order": null,
|
| 1139 |
+
"overflow": null,
|
| 1140 |
+
"overflow_x": null,
|
| 1141 |
+
"overflow_y": null,
|
| 1142 |
+
"padding": null,
|
| 1143 |
+
"right": null,
|
| 1144 |
+
"top": null,
|
| 1145 |
+
"visibility": null,
|
| 1146 |
+
"width": null
|
| 1147 |
+
}
|
| 1148 |
+
},
|
| 1149 |
+
"63a3800d62dd41d6b4a3f643a8930d95": {
|
| 1150 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1151 |
+
"model_module_version": "1.5.0",
|
| 1152 |
+
"model_name": "FloatProgressModel",
|
| 1153 |
+
"state": {
|
| 1154 |
+
"_dom_classes": [],
|
| 1155 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1156 |
+
"_model_module_version": "1.5.0",
|
| 1157 |
+
"_model_name": "FloatProgressModel",
|
| 1158 |
+
"_view_count": null,
|
| 1159 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1160 |
+
"_view_module_version": "1.5.0",
|
| 1161 |
+
"_view_name": "ProgressView",
|
| 1162 |
+
"bar_style": "success",
|
| 1163 |
+
"description": "",
|
| 1164 |
+
"description_tooltip": null,
|
| 1165 |
+
"layout": "IPY_MODEL_5c16553a2ff34a37a2cb62b4a4c42a6f",
|
| 1166 |
+
"max": 585,
|
| 1167 |
+
"min": 0,
|
| 1168 |
+
"orientation": "horizontal",
|
| 1169 |
+
"style": "IPY_MODEL_34be83ddb4bf43e58cadbcbac5a606b7",
|
| 1170 |
+
"value": 585
|
| 1171 |
+
}
|
| 1172 |
+
},
|
| 1173 |
+
"65d8b73e3bdd46fca8a42b67739e27f9": {
|
| 1174 |
+
"model_module": "@jupyter-widgets/base",
|
| 1175 |
+
"model_module_version": "1.2.0",
|
| 1176 |
+
"model_name": "LayoutModel",
|
| 1177 |
+
"state": {
|
| 1178 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1179 |
+
"_model_module_version": "1.2.0",
|
| 1180 |
+
"_model_name": "LayoutModel",
|
| 1181 |
+
"_view_count": null,
|
| 1182 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1183 |
+
"_view_module_version": "1.2.0",
|
| 1184 |
+
"_view_name": "LayoutView",
|
| 1185 |
+
"align_content": null,
|
| 1186 |
+
"align_items": null,
|
| 1187 |
+
"align_self": null,
|
| 1188 |
+
"border": null,
|
| 1189 |
+
"bottom": null,
|
| 1190 |
+
"display": null,
|
| 1191 |
+
"flex": null,
|
| 1192 |
+
"flex_flow": null,
|
| 1193 |
+
"grid_area": null,
|
| 1194 |
+
"grid_auto_columns": null,
|
| 1195 |
+
"grid_auto_flow": null,
|
| 1196 |
+
"grid_auto_rows": null,
|
| 1197 |
+
"grid_column": null,
|
| 1198 |
+
"grid_gap": null,
|
| 1199 |
+
"grid_row": null,
|
| 1200 |
+
"grid_template_areas": null,
|
| 1201 |
+
"grid_template_columns": null,
|
| 1202 |
+
"grid_template_rows": null,
|
| 1203 |
+
"height": null,
|
| 1204 |
+
"justify_content": null,
|
| 1205 |
+
"justify_items": null,
|
| 1206 |
+
"left": null,
|
| 1207 |
+
"margin": null,
|
| 1208 |
+
"max_height": null,
|
| 1209 |
+
"max_width": null,
|
| 1210 |
+
"min_height": null,
|
| 1211 |
+
"min_width": null,
|
| 1212 |
+
"object_fit": null,
|
| 1213 |
+
"object_position": null,
|
| 1214 |
+
"order": null,
|
| 1215 |
+
"overflow": null,
|
| 1216 |
+
"overflow_x": null,
|
| 1217 |
+
"overflow_y": null,
|
| 1218 |
+
"padding": null,
|
| 1219 |
+
"right": null,
|
| 1220 |
+
"top": null,
|
| 1221 |
+
"visibility": null,
|
| 1222 |
+
"width": null
|
| 1223 |
+
}
|
| 1224 |
+
},
|
| 1225 |
+
"663aa65fdb4e4349b2815b6bafce4dcd": {
|
| 1226 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1227 |
+
"model_module_version": "1.5.0",
|
| 1228 |
+
"model_name": "ProgressStyleModel",
|
| 1229 |
+
"state": {
|
| 1230 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1231 |
+
"_model_module_version": "1.5.0",
|
| 1232 |
+
"_model_name": "ProgressStyleModel",
|
| 1233 |
+
"_view_count": null,
|
| 1234 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1235 |
+
"_view_module_version": "1.2.0",
|
| 1236 |
+
"_view_name": "StyleView",
|
| 1237 |
+
"bar_color": null,
|
| 1238 |
+
"description_width": ""
|
| 1239 |
+
}
|
| 1240 |
+
},
|
| 1241 |
+
"7464841c193d492685bb929b1c0d230c": {
|
| 1242 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1243 |
+
"model_module_version": "1.5.0",
|
| 1244 |
+
"model_name": "DescriptionStyleModel",
|
| 1245 |
+
"state": {
|
| 1246 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1247 |
+
"_model_module_version": "1.5.0",
|
| 1248 |
+
"_model_name": "DescriptionStyleModel",
|
| 1249 |
+
"_view_count": null,
|
| 1250 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1251 |
+
"_view_module_version": "1.2.0",
|
| 1252 |
+
"_view_name": "StyleView",
|
| 1253 |
+
"description_width": ""
|
| 1254 |
+
}
|
| 1255 |
+
},
|
| 1256 |
+
"76d1f15c857640c3b06d98aef478f234": {
|
| 1257 |
+
"model_module": "@jupyter-widgets/base",
|
| 1258 |
+
"model_module_version": "1.2.0",
|
| 1259 |
+
"model_name": "LayoutModel",
|
| 1260 |
+
"state": {
|
| 1261 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1262 |
+
"_model_module_version": "1.2.0",
|
| 1263 |
+
"_model_name": "LayoutModel",
|
| 1264 |
+
"_view_count": null,
|
| 1265 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1266 |
+
"_view_module_version": "1.2.0",
|
| 1267 |
+
"_view_name": "LayoutView",
|
| 1268 |
+
"align_content": null,
|
| 1269 |
+
"align_items": null,
|
| 1270 |
+
"align_self": null,
|
| 1271 |
+
"border": null,
|
| 1272 |
+
"bottom": null,
|
| 1273 |
+
"display": null,
|
| 1274 |
+
"flex": null,
|
| 1275 |
+
"flex_flow": null,
|
| 1276 |
+
"grid_area": null,
|
| 1277 |
+
"grid_auto_columns": null,
|
| 1278 |
+
"grid_auto_flow": null,
|
| 1279 |
+
"grid_auto_rows": null,
|
| 1280 |
+
"grid_column": null,
|
| 1281 |
+
"grid_gap": null,
|
| 1282 |
+
"grid_row": null,
|
| 1283 |
+
"grid_template_areas": null,
|
| 1284 |
+
"grid_template_columns": null,
|
| 1285 |
+
"grid_template_rows": null,
|
| 1286 |
+
"height": null,
|
| 1287 |
+
"justify_content": null,
|
| 1288 |
+
"justify_items": null,
|
| 1289 |
+
"left": null,
|
| 1290 |
+
"margin": null,
|
| 1291 |
+
"max_height": null,
|
| 1292 |
+
"max_width": null,
|
| 1293 |
+
"min_height": null,
|
| 1294 |
+
"min_width": null,
|
| 1295 |
+
"object_fit": null,
|
| 1296 |
+
"object_position": null,
|
| 1297 |
+
"order": null,
|
| 1298 |
+
"overflow": null,
|
| 1299 |
+
"overflow_x": null,
|
| 1300 |
+
"overflow_y": null,
|
| 1301 |
+
"padding": null,
|
| 1302 |
+
"right": null,
|
| 1303 |
+
"top": null,
|
| 1304 |
+
"visibility": null,
|
| 1305 |
+
"width": null
|
| 1306 |
+
}
|
| 1307 |
+
},
|
| 1308 |
+
"77cdafc6dae44107a43a46ae19ed390a": {
|
| 1309 |
+
"model_module": "@jupyter-widgets/base",
|
| 1310 |
+
"model_module_version": "1.2.0",
|
| 1311 |
+
"model_name": "LayoutModel",
|
| 1312 |
+
"state": {
|
| 1313 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1314 |
+
"_model_module_version": "1.2.0",
|
| 1315 |
+
"_model_name": "LayoutModel",
|
| 1316 |
+
"_view_count": null,
|
| 1317 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1318 |
+
"_view_module_version": "1.2.0",
|
| 1319 |
+
"_view_name": "LayoutView",
|
| 1320 |
+
"align_content": null,
|
| 1321 |
+
"align_items": null,
|
| 1322 |
+
"align_self": null,
|
| 1323 |
+
"border": null,
|
| 1324 |
+
"bottom": null,
|
| 1325 |
+
"display": null,
|
| 1326 |
+
"flex": null,
|
| 1327 |
+
"flex_flow": null,
|
| 1328 |
+
"grid_area": null,
|
| 1329 |
+
"grid_auto_columns": null,
|
| 1330 |
+
"grid_auto_flow": null,
|
| 1331 |
+
"grid_auto_rows": null,
|
| 1332 |
+
"grid_column": null,
|
| 1333 |
+
"grid_gap": null,
|
| 1334 |
+
"grid_row": null,
|
| 1335 |
+
"grid_template_areas": null,
|
| 1336 |
+
"grid_template_columns": null,
|
| 1337 |
+
"grid_template_rows": null,
|
| 1338 |
+
"height": null,
|
| 1339 |
+
"justify_content": null,
|
| 1340 |
+
"justify_items": null,
|
| 1341 |
+
"left": null,
|
| 1342 |
+
"margin": null,
|
| 1343 |
+
"max_height": null,
|
| 1344 |
+
"max_width": null,
|
| 1345 |
+
"min_height": null,
|
| 1346 |
+
"min_width": null,
|
| 1347 |
+
"object_fit": null,
|
| 1348 |
+
"object_position": null,
|
| 1349 |
+
"order": null,
|
| 1350 |
+
"overflow": null,
|
| 1351 |
+
"overflow_x": null,
|
| 1352 |
+
"overflow_y": null,
|
| 1353 |
+
"padding": null,
|
| 1354 |
+
"right": null,
|
| 1355 |
+
"top": null,
|
| 1356 |
+
"visibility": null,
|
| 1357 |
+
"width": null
|
| 1358 |
+
}
|
| 1359 |
+
},
|
| 1360 |
+
"7e2178d696c04d5787e736ace9ab57c0": {
|
| 1361 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1362 |
+
"model_module_version": "1.5.0",
|
| 1363 |
+
"model_name": "DescriptionStyleModel",
|
| 1364 |
+
"state": {
|
| 1365 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1366 |
+
"_model_module_version": "1.5.0",
|
| 1367 |
+
"_model_name": "DescriptionStyleModel",
|
| 1368 |
+
"_view_count": null,
|
| 1369 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1370 |
+
"_view_module_version": "1.2.0",
|
| 1371 |
+
"_view_name": "StyleView",
|
| 1372 |
+
"description_width": ""
|
| 1373 |
+
}
|
| 1374 |
+
},
|
| 1375 |
+
"8410c9d15bca4c9f8b3aab2b7d327211": {
|
| 1376 |
+
"model_module": "@jupyter-widgets/base",
|
| 1377 |
+
"model_module_version": "1.2.0",
|
| 1378 |
+
"model_name": "LayoutModel",
|
| 1379 |
+
"state": {
|
| 1380 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1381 |
+
"_model_module_version": "1.2.0",
|
| 1382 |
+
"_model_name": "LayoutModel",
|
| 1383 |
+
"_view_count": null,
|
| 1384 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1385 |
+
"_view_module_version": "1.2.0",
|
| 1386 |
+
"_view_name": "LayoutView",
|
| 1387 |
+
"align_content": null,
|
| 1388 |
+
"align_items": null,
|
| 1389 |
+
"align_self": null,
|
| 1390 |
+
"border": null,
|
| 1391 |
+
"bottom": null,
|
| 1392 |
+
"display": null,
|
| 1393 |
+
"flex": null,
|
| 1394 |
+
"flex_flow": null,
|
| 1395 |
+
"grid_area": null,
|
| 1396 |
+
"grid_auto_columns": null,
|
| 1397 |
+
"grid_auto_flow": null,
|
| 1398 |
+
"grid_auto_rows": null,
|
| 1399 |
+
"grid_column": null,
|
| 1400 |
+
"grid_gap": null,
|
| 1401 |
+
"grid_row": null,
|
| 1402 |
+
"grid_template_areas": null,
|
| 1403 |
+
"grid_template_columns": null,
|
| 1404 |
+
"grid_template_rows": null,
|
| 1405 |
+
"height": null,
|
| 1406 |
+
"justify_content": null,
|
| 1407 |
+
"justify_items": null,
|
| 1408 |
+
"left": null,
|
| 1409 |
+
"margin": null,
|
| 1410 |
+
"max_height": null,
|
| 1411 |
+
"max_width": null,
|
| 1412 |
+
"min_height": null,
|
| 1413 |
+
"min_width": null,
|
| 1414 |
+
"object_fit": null,
|
| 1415 |
+
"object_position": null,
|
| 1416 |
+
"order": null,
|
| 1417 |
+
"overflow": null,
|
| 1418 |
+
"overflow_x": null,
|
| 1419 |
+
"overflow_y": null,
|
| 1420 |
+
"padding": null,
|
| 1421 |
+
"right": null,
|
| 1422 |
+
"top": null,
|
| 1423 |
+
"visibility": null,
|
| 1424 |
+
"width": null
|
| 1425 |
+
}
|
| 1426 |
+
},
|
| 1427 |
+
"92043bfce97e4629bf9e4b268aa88c11": {
|
| 1428 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1429 |
+
"model_module_version": "1.5.0",
|
| 1430 |
+
"model_name": "DescriptionStyleModel",
|
| 1431 |
+
"state": {
|
| 1432 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1433 |
+
"_model_module_version": "1.5.0",
|
| 1434 |
+
"_model_name": "DescriptionStyleModel",
|
| 1435 |
+
"_view_count": null,
|
| 1436 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1437 |
+
"_view_module_version": "1.2.0",
|
| 1438 |
+
"_view_name": "StyleView",
|
| 1439 |
+
"description_width": ""
|
| 1440 |
+
}
|
| 1441 |
+
},
|
| 1442 |
+
"a139b85557a942b9b5d32b9d7def3e50": {
|
| 1443 |
+
"model_module": "@jupyter-widgets/base",
|
| 1444 |
+
"model_module_version": "1.2.0",
|
| 1445 |
+
"model_name": "LayoutModel",
|
| 1446 |
+
"state": {
|
| 1447 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1448 |
+
"_model_module_version": "1.2.0",
|
| 1449 |
+
"_model_name": "LayoutModel",
|
| 1450 |
+
"_view_count": null,
|
| 1451 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1452 |
+
"_view_module_version": "1.2.0",
|
| 1453 |
+
"_view_name": "LayoutView",
|
| 1454 |
+
"align_content": null,
|
| 1455 |
+
"align_items": null,
|
| 1456 |
+
"align_self": null,
|
| 1457 |
+
"border": null,
|
| 1458 |
+
"bottom": null,
|
| 1459 |
+
"display": null,
|
| 1460 |
+
"flex": null,
|
| 1461 |
+
"flex_flow": null,
|
| 1462 |
+
"grid_area": null,
|
| 1463 |
+
"grid_auto_columns": null,
|
| 1464 |
+
"grid_auto_flow": null,
|
| 1465 |
+
"grid_auto_rows": null,
|
| 1466 |
+
"grid_column": null,
|
| 1467 |
+
"grid_gap": null,
|
| 1468 |
+
"grid_row": null,
|
| 1469 |
+
"grid_template_areas": null,
|
| 1470 |
+
"grid_template_columns": null,
|
| 1471 |
+
"grid_template_rows": null,
|
| 1472 |
+
"height": null,
|
| 1473 |
+
"justify_content": null,
|
| 1474 |
+
"justify_items": null,
|
| 1475 |
+
"left": null,
|
| 1476 |
+
"margin": null,
|
| 1477 |
+
"max_height": null,
|
| 1478 |
+
"max_width": null,
|
| 1479 |
+
"min_height": null,
|
| 1480 |
+
"min_width": null,
|
| 1481 |
+
"object_fit": null,
|
| 1482 |
+
"object_position": null,
|
| 1483 |
+
"order": null,
|
| 1484 |
+
"overflow": null,
|
| 1485 |
+
"overflow_x": null,
|
| 1486 |
+
"overflow_y": null,
|
| 1487 |
+
"padding": null,
|
| 1488 |
+
"right": null,
|
| 1489 |
+
"top": null,
|
| 1490 |
+
"visibility": null,
|
| 1491 |
+
"width": null
|
| 1492 |
+
}
|
| 1493 |
+
},
|
| 1494 |
+
"b566321171044b0eb02ea3bd8c0472df": {
|
| 1495 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1496 |
+
"model_module_version": "1.5.0",
|
| 1497 |
+
"model_name": "DescriptionStyleModel",
|
| 1498 |
+
"state": {
|
| 1499 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1500 |
+
"_model_module_version": "1.5.0",
|
| 1501 |
+
"_model_name": "DescriptionStyleModel",
|
| 1502 |
+
"_view_count": null,
|
| 1503 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1504 |
+
"_view_module_version": "1.2.0",
|
| 1505 |
+
"_view_name": "StyleView",
|
| 1506 |
+
"description_width": ""
|
| 1507 |
+
}
|
| 1508 |
+
},
|
| 1509 |
+
"bd51d97e739a4e78ad28083043f638d8": {
|
| 1510 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1511 |
+
"model_module_version": "1.5.0",
|
| 1512 |
+
"model_name": "HTMLModel",
|
| 1513 |
+
"state": {
|
| 1514 |
+
"_dom_classes": [],
|
| 1515 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1516 |
+
"_model_module_version": "1.5.0",
|
| 1517 |
+
"_model_name": "HTMLModel",
|
| 1518 |
+
"_view_count": null,
|
| 1519 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1520 |
+
"_view_module_version": "1.5.0",
|
| 1521 |
+
"_view_name": "HTMLView",
|
| 1522 |
+
"description": "",
|
| 1523 |
+
"description_tooltip": null,
|
| 1524 |
+
"layout": "IPY_MODEL_a139b85557a942b9b5d32b9d7def3e50",
|
| 1525 |
+
"placeholder": "​",
|
| 1526 |
+
"style": "IPY_MODEL_92043bfce97e4629bf9e4b268aa88c11",
|
| 1527 |
+
"value": " 744/744 [00:00<00:00, 93.7kB/s]"
|
| 1528 |
+
}
|
| 1529 |
+
},
|
| 1530 |
+
"caf0790dbf2544378cb04aa8eb3098c3": {
|
| 1531 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1532 |
+
"model_module_version": "1.5.0",
|
| 1533 |
+
"model_name": "FloatProgressModel",
|
| 1534 |
+
"state": {
|
| 1535 |
+
"_dom_classes": [],
|
| 1536 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1537 |
+
"_model_module_version": "1.5.0",
|
| 1538 |
+
"_model_name": "FloatProgressModel",
|
| 1539 |
+
"_view_count": null,
|
| 1540 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1541 |
+
"_view_module_version": "1.5.0",
|
| 1542 |
+
"_view_name": "ProgressView",
|
| 1543 |
+
"bar_style": "success",
|
| 1544 |
+
"description": "",
|
| 1545 |
+
"description_tooltip": null,
|
| 1546 |
+
"layout": "IPY_MODEL_62535e046f794a28b4002c3f34fe7ff7",
|
| 1547 |
+
"max": 3362432800,
|
| 1548 |
+
"min": 0,
|
| 1549 |
+
"orientation": "horizontal",
|
| 1550 |
+
"style": "IPY_MODEL_663aa65fdb4e4349b2815b6bafce4dcd",
|
| 1551 |
+
"value": 3362432800
|
| 1552 |
+
}
|
| 1553 |
+
},
|
| 1554 |
+
"d43089f8240c44339c6881355ff0aee3": {
|
| 1555 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1556 |
+
"model_module_version": "1.5.0",
|
| 1557 |
+
"model_name": "ProgressStyleModel",
|
| 1558 |
+
"state": {
|
| 1559 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1560 |
+
"_model_module_version": "1.5.0",
|
| 1561 |
+
"_model_name": "ProgressStyleModel",
|
| 1562 |
+
"_view_count": null,
|
| 1563 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1564 |
+
"_view_module_version": "1.2.0",
|
| 1565 |
+
"_view_name": "StyleView",
|
| 1566 |
+
"bar_color": null,
|
| 1567 |
+
"description_width": ""
|
| 1568 |
+
}
|
| 1569 |
+
},
|
| 1570 |
+
"df6de04fdb204d348767dd0b2d0e88f7": {
|
| 1571 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1572 |
+
"model_module_version": "1.5.0",
|
| 1573 |
+
"model_name": "HTMLModel",
|
| 1574 |
+
"state": {
|
| 1575 |
+
"_dom_classes": [],
|
| 1576 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1577 |
+
"_model_module_version": "1.5.0",
|
| 1578 |
+
"_model_name": "HTMLModel",
|
| 1579 |
+
"_view_count": null,
|
| 1580 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1581 |
+
"_view_module_version": "1.5.0",
|
| 1582 |
+
"_view_name": "HTMLView",
|
| 1583 |
+
"description": "",
|
| 1584 |
+
"description_tooltip": null,
|
| 1585 |
+
"layout": "IPY_MODEL_3ad0ac8def244930a3aff41d68a88a65",
|
| 1586 |
+
"placeholder": "​",
|
| 1587 |
+
"style": "IPY_MODEL_7464841c193d492685bb929b1c0d230c",
|
| 1588 |
+
"value": "preprocessor_config.json: 100%"
|
| 1589 |
+
}
|
| 1590 |
+
},
|
| 1591 |
+
"f00ace964f96471b9eb839cce48ce378": {
|
| 1592 |
+
"model_module": "@jupyter-widgets/base",
|
| 1593 |
+
"model_module_version": "1.2.0",
|
| 1594 |
+
"model_name": "LayoutModel",
|
| 1595 |
+
"state": {
|
| 1596 |
+
"_model_module": "@jupyter-widgets/base",
|
| 1597 |
+
"_model_module_version": "1.2.0",
|
| 1598 |
+
"_model_name": "LayoutModel",
|
| 1599 |
+
"_view_count": null,
|
| 1600 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1601 |
+
"_view_module_version": "1.2.0",
|
| 1602 |
+
"_view_name": "LayoutView",
|
| 1603 |
+
"align_content": null,
|
| 1604 |
+
"align_items": null,
|
| 1605 |
+
"align_self": null,
|
| 1606 |
+
"border": null,
|
| 1607 |
+
"bottom": null,
|
| 1608 |
+
"display": null,
|
| 1609 |
+
"flex": null,
|
| 1610 |
+
"flex_flow": null,
|
| 1611 |
+
"grid_area": null,
|
| 1612 |
+
"grid_auto_columns": null,
|
| 1613 |
+
"grid_auto_flow": null,
|
| 1614 |
+
"grid_auto_rows": null,
|
| 1615 |
+
"grid_column": null,
|
| 1616 |
+
"grid_gap": null,
|
| 1617 |
+
"grid_row": null,
|
| 1618 |
+
"grid_template_areas": null,
|
| 1619 |
+
"grid_template_columns": null,
|
| 1620 |
+
"grid_template_rows": null,
|
| 1621 |
+
"height": null,
|
| 1622 |
+
"justify_content": null,
|
| 1623 |
+
"justify_items": null,
|
| 1624 |
+
"left": null,
|
| 1625 |
+
"margin": null,
|
| 1626 |
+
"max_height": null,
|
| 1627 |
+
"max_width": null,
|
| 1628 |
+
"min_height": null,
|
| 1629 |
+
"min_width": null,
|
| 1630 |
+
"object_fit": null,
|
| 1631 |
+
"object_position": null,
|
| 1632 |
+
"order": null,
|
| 1633 |
+
"overflow": null,
|
| 1634 |
+
"overflow_x": null,
|
| 1635 |
+
"overflow_y": null,
|
| 1636 |
+
"padding": null,
|
| 1637 |
+
"right": null,
|
| 1638 |
+
"top": null,
|
| 1639 |
+
"visibility": null,
|
| 1640 |
+
"width": null
|
| 1641 |
+
}
|
| 1642 |
+
},
|
| 1643 |
+
"f20b3989658642528f4ed91666320097": {
|
| 1644 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1645 |
+
"model_module_version": "1.5.0",
|
| 1646 |
+
"model_name": "HBoxModel",
|
| 1647 |
+
"state": {
|
| 1648 |
+
"_dom_classes": [],
|
| 1649 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1650 |
+
"_model_module_version": "1.5.0",
|
| 1651 |
+
"_model_name": "HBoxModel",
|
| 1652 |
+
"_view_count": null,
|
| 1653 |
+
"_view_module": "@jupyter-widgets/controls",
|
| 1654 |
+
"_view_module_version": "1.5.0",
|
| 1655 |
+
"_view_name": "HBoxView",
|
| 1656 |
+
"box_style": "",
|
| 1657 |
+
"children": [
|
| 1658 |
+
"IPY_MODEL_3ee9921a635d44ec9b248e2155b5b243",
|
| 1659 |
+
"IPY_MODEL_caf0790dbf2544378cb04aa8eb3098c3",
|
| 1660 |
+
"IPY_MODEL_3ff0fc5ce62a44b9950dd8575d90bd21"
|
| 1661 |
+
],
|
| 1662 |
+
"layout": "IPY_MODEL_77cdafc6dae44107a43a46ae19ed390a"
|
| 1663 |
+
}
|
| 1664 |
+
},
|
| 1665 |
+
"f2c7be27f90b49a3abe51b5e3003c17d": {
|
| 1666 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1667 |
+
"model_module_version": "1.5.0",
|
| 1668 |
+
"model_name": "DescriptionStyleModel",
|
| 1669 |
+
"state": {
|
| 1670 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1671 |
+
"_model_module_version": "1.5.0",
|
| 1672 |
+
"_model_name": "DescriptionStyleModel",
|
| 1673 |
+
"_view_count": null,
|
| 1674 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1675 |
+
"_view_module_version": "1.2.0",
|
| 1676 |
+
"_view_name": "StyleView",
|
| 1677 |
+
"description_width": ""
|
| 1678 |
+
}
|
| 1679 |
+
},
|
| 1680 |
+
"fb359d0651a74fe790aaace9a5d0e329": {
|
| 1681 |
+
"model_module": "@jupyter-widgets/controls",
|
| 1682 |
+
"model_module_version": "1.5.0",
|
| 1683 |
+
"model_name": "DescriptionStyleModel",
|
| 1684 |
+
"state": {
|
| 1685 |
+
"_model_module": "@jupyter-widgets/controls",
|
| 1686 |
+
"_model_module_version": "1.5.0",
|
| 1687 |
+
"_model_name": "DescriptionStyleModel",
|
| 1688 |
+
"_view_count": null,
|
| 1689 |
+
"_view_module": "@jupyter-widgets/base",
|
| 1690 |
+
"_view_module_version": "1.2.0",
|
| 1691 |
+
"_view_name": "StyleView",
|
| 1692 |
+
"description_width": ""
|
| 1693 |
+
}
|
| 1694 |
+
}
|
| 1695 |
+
}
|
| 1696 |
+
}
|
| 1697 |
+
},
|
| 1698 |
+
"nbformat": 4,
|
| 1699 |
+
"nbformat_minor": 0
|
| 1700 |
+
}
|