{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Install" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: uv in /Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages (0.1.42)\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "%pip install uv" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!uv pip install dagshub setuptools accelerate toml torch torchvision transformers mlflow datasets ipywidgets python-dotenv evaluate" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Setup" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Initialized MLflow to track repo \"amaye15/CanineNet\"\n",
"
\n"
],
"text/plain": [
"Initialized MLflow to track repo \u001b[32m\"amaye15/CanineNet\"\u001b[0m\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"Repository amaye15/CanineNet initialized!\n", "\n" ], "text/plain": [ "Repository amaye15/CanineNet initialized!\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import os\n", "import toml\n", "import torch\n", "import mlflow\n", "import dagshub\n", "import datasets\n", "import evaluate\n", "from dotenv import load_dotenv\n", "from torchvision.transforms import v2\n", "from transformers import AutoImageProcessor, AutoModelForImageClassification, TrainingArguments, Trainer\n", "\n", "ENV_PATH = \"/Users/andrewmayes/Openclassroom/CanineNet/.env\"\n", "CONFIG_PATH = \"/Users/andrewmayes/Openclassroom/CanineNet/code/config.toml\"\n", "CONFIG = toml.load(CONFIG_PATH)\n", "\n", "load_dotenv(ENV_PATH)\n", "\n", "dagshub.init(repo_name=os.environ['MLFLOW_TRACKING_PROJECTNAME'], repo_owner=os.environ['MLFLOW_TRACKING_USERNAME'], mlflow=True, dvc=True)\n", "\n", "os.environ['MLFLOW_TRACKING_USERNAME'] = \"amaye15\"\n", "\n", "mlflow.set_tracking_uri(f'https://dagshub.com/' + os.environ['MLFLOW_TRACKING_USERNAME']\n", " + '/' + os.environ['MLFLOW_TRACKING_PROJECTNAME'] + '.mlflow')\n", "\n", "CREATE_DATASET = True\n", "ORIGINAL_DATASET = \"Alanox/stanford-dogs\"\n", "MODIFIED_DATASET = \"amaye15/stanford-dogs\"\n", "REMOVE_COLUMNS = [\"name\", \"annotations\"]\n", "RENAME_COLUMNS = {\"image\":\"pixel_values\", \"target\":\"label\"}\n", "SPLIT = 0.2\n", "\n", "METRICS = [\"accuracy\", \"f1\", \"precision\", \"recall\"]\n", "# MODELS = 'google/vit-base-patch16-224'\n", "# MODELS = \"google/siglip-base-patch16-224\"\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Dataset" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Affenpinscher: 0\n", "Afghan Hound: 1\n", "African Hunting Dog: 2\n", "Airedale: 3\n", "American Staffordshire Terrier: 4\n", "Appenzeller: 5\n", "Australian Terrier: 6\n", "Basenji: 7\n", "Basset: 8\n", "Beagle: 9\n", "Bedlington Terrier: 10\n", "Bernese Mountain Dog: 11\n", "Black And Tan Coonhound: 12\n", "Blenheim Spaniel: 13\n", "Bloodhound: 14\n", "Bluetick: 15\n", "Border Collie: 16\n", "Border Terrier: 17\n", "Borzoi: 18\n", "Boston Bull: 19\n", "Bouvier Des Flandres: 20\n", "Boxer: 21\n", "Brabancon Griffon: 22\n", "Briard: 23\n", "Brittany Spaniel: 24\n", "Bull Mastiff: 25\n", "Cairn: 26\n", "Cardigan: 27\n", "Chesapeake Bay Retriever: 28\n", "Chihuahua: 29\n", "Chow: 30\n", "Clumber: 31\n", "Cocker Spaniel: 32\n", "Collie: 33\n", "Curly Coated Retriever: 34\n", "Dandie Dinmont: 35\n", "Dhole: 36\n", "Dingo: 37\n", "Doberman: 38\n", "English Foxhound: 39\n", "English Setter: 40\n", "English Springer: 41\n", "Entlebucher: 42\n", "Eskimo Dog: 43\n", "Flat Coated Retriever: 44\n", "French Bulldog: 45\n", "German Shepherd: 46\n", "German Short Haired Pointer: 47\n", "Giant Schnauzer: 48\n", "Golden Retriever: 49\n", "Gordon Setter: 50\n", "Great Dane: 51\n", "Great Pyrenees: 52\n", "Greater Swiss Mountain Dog: 53\n", "Groenendael: 54\n", "Ibizan Hound: 55\n", "Irish Setter: 56\n", "Irish Terrier: 57\n", "Irish Water Spaniel: 58\n", "Irish Wolfhound: 59\n", "Italian Greyhound: 60\n", "Japanese Spaniel: 61\n", "Keeshond: 62\n", "Kelpie: 63\n", "Kerry Blue Terrier: 64\n", "Komondor: 65\n", "Kuvasz: 66\n", "Labrador Retriever: 67\n", "Lakeland Terrier: 68\n", "Leonberg: 69\n", "Lhasa: 70\n", "Malamute: 71\n", "Malinois: 72\n", "Maltese Dog: 73\n", "Mexican Hairless: 74\n", "Miniature Pinscher: 75\n", "Miniature Poodle: 76\n", "Miniature Schnauzer: 77\n", "Newfoundland: 78\n", "Norfolk Terrier: 79\n", "Norwegian Elkhound: 80\n", "Norwich Terrier: 81\n", "Old English Sheepdog: 82\n", "Otterhound: 83\n", "Papillon: 84\n", "Pekinese: 85\n", "Pembroke: 86\n", "Pomeranian: 87\n", "Pug: 88\n", "Redbone: 89\n", "Rhodesian Ridgeback: 90\n", "Rottweiler: 91\n", "Saint Bernard: 92\n", "Saluki: 93\n", "Samoyed: 94\n", "Schipperke: 95\n", "Scotch Terrier: 96\n", "Scottish Deerhound: 97\n", "Sealyham Terrier: 98\n", "Shetland Sheepdog: 99\n", "Shih Tzu: 100\n", "Siberian Husky: 101\n", "Silky Terrier: 102\n", "Soft Coated Wheaten Terrier: 103\n", "Staffordshire Bullterrier: 104\n", "Standard Poodle: 105\n", "Standard Schnauzer: 106\n", "Sussex Spaniel: 107\n", "Tibetan Mastiff: 108\n", "Tibetan Terrier: 109\n", "Toy Poodle: 110\n", "Toy Terrier: 111\n", "Vizsla: 112\n", "Walker Hound: 113\n", "Weimaraner: 114\n", "Welsh Springer Spaniel: 115\n", "West Highland White Terrier: 116\n", "Whippet: 117\n", "Wire Haired Fox Terrier: 118\n", "Yorkshire Terrier: 119\n" ] } ], "source": [ "if CREATE_DATASET:\n", " ds = datasets.load_dataset(ORIGINAL_DATASET, token=os.getenv(\"HF_TOKEN\"), split=\"full\", trust_remote_code=True)\n", " ds = ds.remove_columns(REMOVE_COLUMNS).rename_columns(RENAME_COLUMNS)\n", "\n", " labels = ds.select_columns(\"label\").to_pandas().sort_values(\"label\").get(\"label\").unique().tolist()\n", " numbers = range(len(labels))\n", " label2int = dict(zip(labels, numbers))\n", " int2label = dict(zip(numbers, labels))\n", "\n", " for key, val in label2int.items():\n", " print(f\"{key}: {val}\")\n", "\n", " ds = ds.class_encode_column(\"label\")\n", " ds = ds.align_labels_with_mapping(label2int, \"label\")\n", "\n", " ds = ds.train_test_split(test_size=SPLIT, stratify_by_column = \"label\")\n", " #ds.push_to_hub(MODIFIED_DATASET, token=os.getenv(\"HF_TOKEN\"))\n", "\n", " CONFIG[\"label2int\"] = str(label2int)\n", " CONFIG[\"int2label\"] = str(int2label)\n", "\n", " # with open(\"output.toml\", \"w\") as toml_file:\n", " # toml.dump(toml.dumps(CONFIG), toml_file)\n", "\n", " #ds = datasets.load_dataset(MODIFIED_DATASET, token=os.getenv(\"HF_TOKEN\"), trust_remote_code=True, streaming=True)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n", " warnings.warn(\n", "Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration. Please open a PR/issue to update `preprocessor_config.json` to use `image_processor_type` instead of `feature_extractor_type`. This warning will be removed in v4.40.\n", "Some weights of Swinv2ForImageClassification were not initialized from the model checkpoint at microsoft/swinv2-base-patch4-window16-256 and are newly initialized because the shapes did not match:\n", "- classifier.weight: found shape torch.Size([1000, 1024]) in the checkpoint and torch.Size([120, 1024]) in the model instantiated\n", "- classifier.bias: found shape torch.Size([1000]) in the checkpoint and torch.Size([120]) in the model instantiated\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n", "max_steps is given, it will override any value given in num_train_epochs\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6b6d7e2cfe13400eb1a322641a85ed43", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/1000 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 4.7437, 'grad_norm': 8.186464309692383, 'learning_rate': 4.9500000000000004e-05, 'epoch': 0.08}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ad82246f17374c5fb08dd6f51939fe70", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 4.639501571655273, 'eval_accuracy': 0.08624878522837706, 'eval_f1': 0.051894579266187575, 'eval_precision': 0.04990099748056842, 'eval_recall': 0.08214141201738977, 'eval_runtime': 116.6899, 'eval_samples_per_second': 35.273, 'eval_steps_per_second': 1.105, 'epoch': 0.08}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 4.5551, 'grad_norm': 17.450260162353516, 'learning_rate': 4.9e-05, 'epoch': 0.16}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9c1b753d450c4ce2853cadb363a11336", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 4.369565010070801, 'eval_accuracy': 0.17128279883381925, 'eval_f1': 0.11616985765681904, 'eval_precision': 0.16078253243051674, 'eval_recall': 0.15728975546662927, 'eval_runtime': 115.8515, 'eval_samples_per_second': 35.528, 'eval_steps_per_second': 1.113, 'epoch': 0.16}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 4.2151, 'grad_norm': 22.02376937866211, 'learning_rate': 4.85e-05, 'epoch': 0.23}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "941f058c0df84f18bd8eac805c755fb4", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 3.825162172317505, 'eval_accuracy': 0.31875607385811466, 'eval_f1': 0.268092985285616, 'eval_precision': 0.4133283189939135, 'eval_recall': 0.30212034601560833, 'eval_runtime': 117.1776, 'eval_samples_per_second': 35.126, 'eval_steps_per_second': 1.101, 'epoch': 0.23}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 3.5619, 'grad_norm': 35.59294891357422, 'learning_rate': 4.8e-05, 'epoch': 0.31}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a692311469fb43a1a33c9f5e2a91957f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 2.892880916595459, 'eval_accuracy': 0.6367832847424684, 'eval_f1': 0.5785118042438927, 'eval_precision': 0.6551961008463373, 'eval_recall': 0.6210803928375704, 'eval_runtime': 115.4631, 'eval_samples_per_second': 35.648, 'eval_steps_per_second': 1.117, 'epoch': 0.31}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 2.6253, 'grad_norm': 21.420825958251953, 'learning_rate': 4.75e-05, 'epoch': 0.39}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e6f97de5b53742f69a338d04bb70122f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 1.8693499565124512, 'eval_accuracy': 0.7849854227405247, 'eval_f1': 0.7537564248347458, 'eval_precision': 0.7905906998709678, 'eval_recall': 0.7732537169375034, 'eval_runtime': 116.8844, 'eval_samples_per_second': 35.214, 'eval_steps_per_second': 1.104, 'epoch': 0.39}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 1.8818, 'grad_norm': 31.175920486450195, 'learning_rate': 4.7e-05, 'epoch': 0.47}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0a251f8ca21144c9a9103548886edcc0", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 1.1203440427780151, 'eval_accuracy': 0.8542274052478134, 'eval_f1': 0.8406311097120182, 'eval_precision': 0.8666954593398207, 'eval_recall': 0.8467501053498392, 'eval_runtime': 117.7379, 'eval_samples_per_second': 34.959, 'eval_steps_per_second': 1.096, 'epoch': 0.47}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 1.3652, 'grad_norm': 28.826078414916992, 'learning_rate': 4.6500000000000005e-05, 'epoch': 0.54}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "535b161d64004f129ded936eacdebed1", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.7329973578453064, 'eval_accuracy': 0.8879980563654033, 'eval_f1': 0.8780486410043442, 'eval_precision': 0.9038955431870404, 'eval_recall': 0.8849654798246107, 'eval_runtime': 115.3955, 'eval_samples_per_second': 35.669, 'eval_steps_per_second': 1.118, 'epoch': 0.54}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 1.0456, 'grad_norm': 34.166786193847656, 'learning_rate': 4.600000000000001e-05, 'epoch': 0.62}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "1fee7d9bc94f4c229631d097c2d934e5", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/sklearn/metrics/_classification.py:1509: UndefinedMetricWarning: Precision is ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n", " _warn_prf(average, modifier, f\"{metric.capitalize()} is\", len(result))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.526861846446991, 'eval_accuracy': 0.9084062196307094, 'eval_f1': 0.90146328935365, 'eval_precision': 0.9100687001851375, 'eval_recall': 0.9050085721891321, 'eval_runtime': 116.4599, 'eval_samples_per_second': 35.343, 'eval_steps_per_second': 1.108, 'epoch': 0.62}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.9039, 'grad_norm': 24.860803604125977, 'learning_rate': 4.55e-05, 'epoch': 0.7}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "46536bdfe008432e8b4114f7b2d55558", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.41385915875434875, 'eval_accuracy': 0.9181243926141885, 'eval_f1': 0.9093305163024775, 'eval_precision': 0.9212863876501044, 'eval_recall': 0.9150453785432504, 'eval_runtime': 116.0051, 'eval_samples_per_second': 35.481, 'eval_steps_per_second': 1.112, 'epoch': 0.7}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.7965, 'grad_norm': 32.873992919921875, 'learning_rate': 4.5e-05, 'epoch': 0.78}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f319279e5b004494afb0a071180fd295", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.3441310524940491, 'eval_accuracy': 0.9249271137026239, 'eval_f1': 0.9181025402811452, 'eval_precision': 0.9314991923364492, 'eval_recall': 0.9221359816838711, 'eval_runtime': 115.7295, 'eval_samples_per_second': 35.566, 'eval_steps_per_second': 1.115, 'epoch': 0.78}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.7053, 'grad_norm': 28.322216033935547, 'learning_rate': 4.4500000000000004e-05, 'epoch': 0.85}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "27d2109e9b0344efa41260768b82a17f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.3183894455432892, 'eval_accuracy': 0.9224975704567542, 'eval_f1': 0.9163137117491443, 'eval_precision': 0.9320340518695107, 'eval_recall': 0.920757048478844, 'eval_runtime': 116.054, 'eval_samples_per_second': 35.466, 'eval_steps_per_second': 1.112, 'epoch': 0.85}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.6907, 'grad_norm': 27.589914321899414, 'learning_rate': 4.4000000000000006e-05, 'epoch': 0.93}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d8892564c5604c99a3ca5065738115d4", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.28702405095100403, 'eval_accuracy': 0.9283284742468416, 'eval_f1': 0.9261469130665329, 'eval_precision': 0.932353730954924, 'eval_recall': 0.9269987597263075, 'eval_runtime': 116.0063, 'eval_samples_per_second': 35.481, 'eval_steps_per_second': 1.112, 'epoch': 0.93}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.6293, 'grad_norm': 30.230831146240234, 'learning_rate': 4.35e-05, 'epoch': 1.01}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "77ea7b5d46644bd5b9f0f8a30cc3410d", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.2760055363178253, 'eval_accuracy': 0.9275996112730807, 'eval_f1': 0.9245015141258733, 'eval_precision': 0.9328572702910616, 'eval_recall': 0.9259591045746244, 'eval_runtime': 118.2448, 'eval_samples_per_second': 34.809, 'eval_steps_per_second': 1.091, 'epoch': 1.01}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.5564, 'grad_norm': 30.618703842163086, 'learning_rate': 4.3e-05, 'epoch': 1.09}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "97868df940fb4903af0b45bae9cd445b", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.25171801447868347, 'eval_accuracy': 0.9339164237123421, 'eval_f1': 0.9307519229969405, 'eval_precision': 0.9362431321697471, 'eval_recall': 0.932034966728314, 'eval_runtime': 119.4757, 'eval_samples_per_second': 34.451, 'eval_steps_per_second': 1.08, 'epoch': 1.09}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.5902, 'grad_norm': 20.61117935180664, 'learning_rate': 4.25e-05, 'epoch': 1.17}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3b06b354d04945ef9dff4dfb54668ef3", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.24996963143348694, 'eval_accuracy': 0.935131195335277, 'eval_f1': 0.930766066344411, 'eval_precision': 0.9371059756316118, 'eval_recall': 0.932821487763739, 'eval_runtime': 121.2778, 'eval_samples_per_second': 33.939, 'eval_steps_per_second': 1.064, 'epoch': 1.17}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.5269, 'grad_norm': 44.339908599853516, 'learning_rate': 4.2e-05, 'epoch': 1.24}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2dbc4f2ec2224cd1b9fcf45ee66da3f8", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.24294434487819672, 'eval_accuracy': 0.9334305150631681, 'eval_f1': 0.9306865063200268, 'eval_precision': 0.9369599626793679, 'eval_recall': 0.9317400870168705, 'eval_runtime': 118.4392, 'eval_samples_per_second': 34.752, 'eval_steps_per_second': 1.089, 'epoch': 1.24}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.5148, 'grad_norm': 30.723909378051758, 'learning_rate': 4.15e-05, 'epoch': 1.32}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "044cb59e692a443680b4b35e5d34866b", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.23583707213401794, 'eval_accuracy': 0.9392614188532555, 'eval_f1': 0.936751447670333, 'eval_precision': 0.940688889978433, 'eval_recall': 0.9373301093824123, 'eval_runtime': 116.0664, 'eval_samples_per_second': 35.462, 'eval_steps_per_second': 1.111, 'epoch': 1.32}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4998, 'grad_norm': 19.328826904296875, 'learning_rate': 4.1e-05, 'epoch': 1.4}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7dc67823e0ad430f920f22ddc19ac971", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.24513410031795502, 'eval_accuracy': 0.9310009718172984, 'eval_f1': 0.927024551038857, 'eval_precision': 0.9356818949396615, 'eval_recall': 0.9282887653534672, 'eval_runtime': 120.4127, 'eval_samples_per_second': 34.182, 'eval_steps_per_second': 1.071, 'epoch': 1.4}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4797, 'grad_norm': 24.599159240722656, 'learning_rate': 4.05e-05, 'epoch': 1.48}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "65cea0b3c66c48aeb61eb53006fec1aa", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.24253395199775696, 'eval_accuracy': 0.9324586977648203, 'eval_f1': 0.9287454827991866, 'eval_precision': 0.9377120573315072, 'eval_recall': 0.9315104638341816, 'eval_runtime': 119.6435, 'eval_samples_per_second': 34.402, 'eval_steps_per_second': 1.078, 'epoch': 1.48}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4933, 'grad_norm': 26.98736000061035, 'learning_rate': 4e-05, 'epoch': 1.55}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "48bebc018bf34b1e871c931c5297468c", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.23598308861255646, 'eval_accuracy': 0.9280855199222546, 'eval_f1': 0.9257052861053487, 'eval_precision': 0.9333450067922484, 'eval_recall': 0.9265670342866311, 'eval_runtime': 119.2057, 'eval_samples_per_second': 34.529, 'eval_steps_per_second': 1.082, 'epoch': 1.55}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4414, 'grad_norm': 17.272090911865234, 'learning_rate': 3.9500000000000005e-05, 'epoch': 1.63}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "59657fead53542f38c191b91ee499acb", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.22012192010879517, 'eval_accuracy': 0.9370748299319728, 'eval_f1': 0.9342704965664521, 'eval_precision': 0.9398056862573132, 'eval_recall': 0.9351463805006789, 'eval_runtime': 118.5465, 'eval_samples_per_second': 34.721, 'eval_steps_per_second': 1.088, 'epoch': 1.63}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4401, 'grad_norm': 24.135671615600586, 'learning_rate': 3.9000000000000006e-05, 'epoch': 1.71}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6ded8941be8f46f3b4ebb40125343347", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.22481901943683624, 'eval_accuracy': 0.934645286686103, 'eval_f1': 0.9327461119244179, 'eval_precision': 0.9374733009874218, 'eval_recall': 0.9337120109149368, 'eval_runtime': 119.581, 'eval_samples_per_second': 34.42, 'eval_steps_per_second': 1.079, 'epoch': 1.71}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4023, 'grad_norm': 18.742977142333984, 'learning_rate': 3.85e-05, 'epoch': 1.79}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "71cd6fd13ea0487baf75a33d19c156cd", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.21992439031600952, 'eval_accuracy': 0.934402332361516, 'eval_f1': 0.928214478021815, 'eval_precision': 0.9381431820114174, 'eval_recall': 0.9316608316026248, 'eval_runtime': 117.9963, 'eval_samples_per_second': 34.882, 'eval_steps_per_second': 1.093, 'epoch': 1.79}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4723, 'grad_norm': 38.709022521972656, 'learning_rate': 3.8e-05, 'epoch': 1.86}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7150297c3b554e369d76024bc6a43b38", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20709680020809174, 'eval_accuracy': 0.9419339164237124, 'eval_f1': 0.9388751179290546, 'eval_precision': 0.9436815319776929, 'eval_recall': 0.9400943603709142, 'eval_runtime': 119.397, 'eval_samples_per_second': 34.473, 'eval_steps_per_second': 1.08, 'epoch': 1.86}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4593, 'grad_norm': 50.140323638916016, 'learning_rate': 3.7500000000000003e-05, 'epoch': 1.94}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6169350823824fe3b06a9ad42e659a00", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.2123415470123291, 'eval_accuracy': 0.9402332361516035, 'eval_f1': 0.9371278710889068, 'eval_precision': 0.9420549122739866, 'eval_recall': 0.9381532555681376, 'eval_runtime': 116.219, 'eval_samples_per_second': 35.416, 'eval_steps_per_second': 1.11, 'epoch': 1.94}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4544, 'grad_norm': 23.941455841064453, 'learning_rate': 3.7e-05, 'epoch': 2.02}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a1709c745b3740b5862c4dc2da2bf108", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.21911881864070892, 'eval_accuracy': 0.9385325558794947, 'eval_f1': 0.9347402547690099, 'eval_precision': 0.9396020589418915, 'eval_recall': 0.9371002065736007, 'eval_runtime': 114.7649, 'eval_samples_per_second': 35.865, 'eval_steps_per_second': 1.124, 'epoch': 2.02}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3871, 'grad_norm': 38.75582504272461, 'learning_rate': 3.65e-05, 'epoch': 2.1}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "468b2f2f90014db482b0d0e6d788b576", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.2157505750656128, 'eval_accuracy': 0.9395043731778425, 'eval_f1': 0.9371811470572733, 'eval_precision': 0.940108515450947, 'eval_recall': 0.9378344447237702, 'eval_runtime': 121.4897, 'eval_samples_per_second': 33.879, 'eval_steps_per_second': 1.062, 'epoch': 2.1}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4162, 'grad_norm': 88.1770248413086, 'learning_rate': 3.6e-05, 'epoch': 2.17}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7881e78f905342959b1b0456cf4e70e9", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.2073366492986679, 'eval_accuracy': 0.9385325558794947, 'eval_f1': 0.9353177685966004, 'eval_precision': 0.9396403999390738, 'eval_recall': 0.9363707275073216, 'eval_runtime': 116.8272, 'eval_samples_per_second': 35.232, 'eval_steps_per_second': 1.104, 'epoch': 2.17}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3774, 'grad_norm': 36.40309143066406, 'learning_rate': 3.55e-05, 'epoch': 2.25}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3788bfe285bd4f058fac599f8daf7d4b", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1980944573879242, 'eval_accuracy': 0.9397473275024295, 'eval_f1': 0.9386843900947771, 'eval_precision': 0.9421884299962102, 'eval_recall': 0.9386779703682222, 'eval_runtime': 120.2041, 'eval_samples_per_second': 34.242, 'eval_steps_per_second': 1.073, 'epoch': 2.25}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3895, 'grad_norm': 25.867755889892578, 'learning_rate': 3.5e-05, 'epoch': 2.33}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a225cc7a368f4988be78bd539c815d2c", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20081372559070587, 'eval_accuracy': 0.9399902818270165, 'eval_f1': 0.9360823053891583, 'eval_precision': 0.9394616803569582, 'eval_recall': 0.9376069156821891, 'eval_runtime': 120.4595, 'eval_samples_per_second': 34.169, 'eval_steps_per_second': 1.071, 'epoch': 2.33}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3804, 'grad_norm': 22.707073211669922, 'learning_rate': 3.45e-05, 'epoch': 2.41}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "08ecb6b4b3464e20bca063df05e8b748", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20179978013038635, 'eval_accuracy': 0.9431486880466472, 'eval_f1': 0.9395727452715766, 'eval_precision': 0.9443087272661593, 'eval_recall': 0.9411567174610812, 'eval_runtime': 121.9133, 'eval_samples_per_second': 33.762, 'eval_steps_per_second': 1.058, 'epoch': 2.41}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3783, 'grad_norm': 38.07463455200195, 'learning_rate': 3.4000000000000007e-05, 'epoch': 2.49}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f5189e2ccc044776ba5889824010b002", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20383179187774658, 'eval_accuracy': 0.9421768707482994, 'eval_f1': 0.9383535454958121, 'eval_precision': 0.9439438918290918, 'eval_recall': 0.9402737816396812, 'eval_runtime': 120.4263, 'eval_samples_per_second': 34.179, 'eval_steps_per_second': 1.071, 'epoch': 2.49}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.4376, 'grad_norm': 43.67769241333008, 'learning_rate': 3.35e-05, 'epoch': 2.56}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "71958b3e1ea142b2aa2fb96015c83fd7", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19678549468517303, 'eval_accuracy': 0.9419339164237124, 'eval_f1': 0.9404046243130021, 'eval_precision': 0.9458722344411004, 'eval_recall': 0.9413704457193578, 'eval_runtime': 123.7565, 'eval_samples_per_second': 33.259, 'eval_steps_per_second': 1.042, 'epoch': 2.56}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3696, 'grad_norm': 31.614107131958008, 'learning_rate': 3.3e-05, 'epoch': 2.64}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3a7a9f42d9dc417ea52ed6c1636d398f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20113761723041534, 'eval_accuracy': 0.9441205053449951, 'eval_f1': 0.9421743651694238, 'eval_precision': 0.946350640108419, 'eval_recall': 0.942958838122118, 'eval_runtime': 119.9556, 'eval_samples_per_second': 34.313, 'eval_steps_per_second': 1.075, 'epoch': 2.64}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3954, 'grad_norm': 26.880002975463867, 'learning_rate': 3.2500000000000004e-05, 'epoch': 2.72}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "92f819999c57463494f36576c71b9ff6", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19969813525676727, 'eval_accuracy': 0.9416909620991254, 'eval_f1': 0.9378657579080204, 'eval_precision': 0.9430488265976644, 'eval_recall': 0.9398713930887551, 'eval_runtime': 117.8393, 'eval_samples_per_second': 34.929, 'eval_steps_per_second': 1.095, 'epoch': 2.72}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3651, 'grad_norm': 31.13330841064453, 'learning_rate': 3.2000000000000005e-05, 'epoch': 2.8}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "583c9abac9964f68a45c8767c629ecf3", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19516931474208832, 'eval_accuracy': 0.9433916423712342, 'eval_f1': 0.9392243935788644, 'eval_precision': 0.9406883337763913, 'eval_recall': 0.941455122485994, 'eval_runtime': 122.1789, 'eval_samples_per_second': 33.688, 'eval_steps_per_second': 1.056, 'epoch': 2.8}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3646, 'grad_norm': 98.82879638671875, 'learning_rate': 3.15e-05, 'epoch': 2.87}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fbebae1c66454d84a3d05088e3c66bfc", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20450347661972046, 'eval_accuracy': 0.9429057337220602, 'eval_f1': 0.9390995326847609, 'eval_precision': 0.9458541828816678, 'eval_recall': 0.9413282899191538, 'eval_runtime': 119.9024, 'eval_samples_per_second': 34.328, 'eval_steps_per_second': 1.076, 'epoch': 2.87}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3532, 'grad_norm': 31.276166915893555, 'learning_rate': 3.1e-05, 'epoch': 2.95}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "15a026ca444e40a9881e5d60fbd501f3", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19912821054458618, 'eval_accuracy': 0.9426627793974732, 'eval_f1': 0.9393622510314591, 'eval_precision': 0.9455193168980128, 'eval_recall': 0.9412730437472111, 'eval_runtime': 122.2826, 'eval_samples_per_second': 33.66, 'eval_steps_per_second': 1.055, 'epoch': 2.95}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.342, 'grad_norm': 60.54090118408203, 'learning_rate': 3.05e-05, 'epoch': 3.03}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "20e0d0c088c1484abf27996fa30ce3d7", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1957888901233673, 'eval_accuracy': 0.9409620991253644, 'eval_f1': 0.9398780139411471, 'eval_precision': 0.9441421171281802, 'eval_recall': 0.9403750101182756, 'eval_runtime': 119.8687, 'eval_samples_per_second': 34.338, 'eval_steps_per_second': 1.076, 'epoch': 3.03}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3706, 'grad_norm': 43.60276412963867, 'learning_rate': 3e-05, 'epoch': 3.11}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "76a02d1bdae7443ea05407489e0e2478", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.2010001391172409, 'eval_accuracy': 0.9419339164237124, 'eval_f1': 0.9401284791009227, 'eval_precision': 0.9441525256799089, 'eval_recall': 0.9405920428282856, 'eval_runtime': 123.2004, 'eval_samples_per_second': 33.409, 'eval_steps_per_second': 1.047, 'epoch': 3.11}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3031, 'grad_norm': 29.58135223388672, 'learning_rate': 2.95e-05, 'epoch': 3.18}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5fdf1142621e47fd89f9b812861e8b26", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.2012944370508194, 'eval_accuracy': 0.9424198250728864, 'eval_f1': 0.940652603786356, 'eval_precision': 0.944859328024553, 'eval_recall': 0.9409548800746589, 'eval_runtime': 120.3602, 'eval_samples_per_second': 34.197, 'eval_steps_per_second': 1.072, 'epoch': 3.18}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3345, 'grad_norm': 26.952251434326172, 'learning_rate': 2.9e-05, 'epoch': 3.26}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0f9dbda7993d4aaf951335735cbfa908", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20217198133468628, 'eval_accuracy': 0.9414480077745384, 'eval_f1': 0.9398743895240353, 'eval_precision': 0.9437685295122507, 'eval_recall': 0.940567220268477, 'eval_runtime': 121.8969, 'eval_samples_per_second': 33.766, 'eval_steps_per_second': 1.058, 'epoch': 3.26}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3356, 'grad_norm': 24.304956436157227, 'learning_rate': 2.8499999999999998e-05, 'epoch': 3.34}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "34aed845f92a4d49a31af40e78190588", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1926911622285843, 'eval_accuracy': 0.9470359572400389, 'eval_f1': 0.9450684172706612, 'eval_precision': 0.9500250970053578, 'eval_recall': 0.9452978687027325, 'eval_runtime': 122.9461, 'eval_samples_per_second': 33.478, 'eval_steps_per_second': 1.049, 'epoch': 3.34}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3538, 'grad_norm': 35.96293258666992, 'learning_rate': 2.8000000000000003e-05, 'epoch': 3.42}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6212fafcd84e4105896e39e32e99b5c8", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19266565144062042, 'eval_accuracy': 0.9446064139941691, 'eval_f1': 0.9422172989918101, 'eval_precision': 0.9471725874195985, 'eval_recall': 0.9430422435895882, 'eval_runtime': 116.9153, 'eval_samples_per_second': 35.205, 'eval_steps_per_second': 1.103, 'epoch': 3.42}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3505, 'grad_norm': 41.92510223388672, 'learning_rate': 2.7500000000000004e-05, 'epoch': 3.5}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3cb1b8a7245d4b93b37fb69cc347de76", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19093753397464752, 'eval_accuracy': 0.9480077745383868, 'eval_f1': 0.9460719176044295, 'eval_precision': 0.9497622268099324, 'eval_recall': 0.9466116314128773, 'eval_runtime': 120.4639, 'eval_samples_per_second': 34.168, 'eval_steps_per_second': 1.071, 'epoch': 3.5}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3398, 'grad_norm': 32.31686019897461, 'learning_rate': 2.7000000000000002e-05, 'epoch': 3.57}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "cc77162b30e542869c5b43284de44822", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19165052473545074, 'eval_accuracy': 0.9453352769679301, 'eval_f1': 0.9419069427496958, 'eval_precision': 0.9474577473078628, 'eval_recall': 0.9435639060907978, 'eval_runtime': 120.9988, 'eval_samples_per_second': 34.017, 'eval_steps_per_second': 1.066, 'epoch': 3.57}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3303, 'grad_norm': 27.238615036010742, 'learning_rate': 2.6500000000000004e-05, 'epoch': 3.65}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "209fea79032a4a3992904bd072e375ae", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18950748443603516, 'eval_accuracy': 0.9482507288629738, 'eval_f1': 0.9452758696160088, 'eval_precision': 0.9505660971754324, 'eval_recall': 0.9464068779916857, 'eval_runtime': 116.3477, 'eval_samples_per_second': 35.377, 'eval_steps_per_second': 1.109, 'epoch': 3.65}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3685, 'grad_norm': 24.894229888916016, 'learning_rate': 2.6000000000000002e-05, 'epoch': 3.73}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fa1e5564512d44c5bc6889ae4f4db398", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1882941573858261, 'eval_accuracy': 0.9458211856171039, 'eval_f1': 0.9442150666998825, 'eval_precision': 0.946797791883452, 'eval_recall': 0.9444712646441935, 'eval_runtime': 116.7869, 'eval_samples_per_second': 35.244, 'eval_steps_per_second': 1.105, 'epoch': 3.73}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3125, 'grad_norm': 18.43492317199707, 'learning_rate': 2.5500000000000003e-05, 'epoch': 3.81}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fc2ad31dc20541bda448414658420154", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19259178638458252, 'eval_accuracy': 0.9441205053449951, 'eval_f1': 0.9422199565891657, 'eval_precision': 0.9461649389885276, 'eval_recall': 0.9425716100870981, 'eval_runtime': 114.8889, 'eval_samples_per_second': 35.826, 'eval_steps_per_second': 1.123, 'epoch': 3.81}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3857, 'grad_norm': 22.214452743530273, 'learning_rate': 2.5e-05, 'epoch': 3.88}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7f62b7dd913242c6b051492ee7be851b", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19113469123840332, 'eval_accuracy': 0.9446064139941691, 'eval_f1': 0.9425736071012825, 'eval_precision': 0.9473044127623929, 'eval_recall': 0.9430301167546269, 'eval_runtime': 114.4094, 'eval_samples_per_second': 35.976, 'eval_steps_per_second': 1.128, 'epoch': 3.88}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3407, 'grad_norm': 21.46514320373535, 'learning_rate': 2.45e-05, 'epoch': 3.96}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0106199a60b14e5c9c620bc2991df616", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18251299858093262, 'eval_accuracy': 0.9470359572400389, 'eval_f1': 0.9454087407119244, 'eval_precision': 0.9486186077142267, 'eval_recall': 0.9458598844907358, 'eval_runtime': 114.9434, 'eval_samples_per_second': 35.809, 'eval_steps_per_second': 1.122, 'epoch': 3.96}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3545, 'grad_norm': 25.38130760192871, 'learning_rate': 2.4e-05, 'epoch': 4.04}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4afbe720ffe74e32b3c7ffde191e25d2", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19193987548351288, 'eval_accuracy': 0.9443634596695821, 'eval_f1': 0.9428463946456694, 'eval_precision': 0.9448256718942806, 'eval_recall': 0.9432181768118788, 'eval_runtime': 115.0647, 'eval_samples_per_second': 35.771, 'eval_steps_per_second': 1.121, 'epoch': 4.04}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.306, 'grad_norm': 27.787370681762695, 'learning_rate': 2.35e-05, 'epoch': 4.12}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "55bfc136f493457d896462ed69ab6d24", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1900983303785324, 'eval_accuracy': 0.9465500485908649, 'eval_f1': 0.9437130071213534, 'eval_precision': 0.9471011841873509, 'eval_recall': 0.9449739851348137, 'eval_runtime': 115.2179, 'eval_samples_per_second': 35.724, 'eval_steps_per_second': 1.12, 'epoch': 4.12}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2511, 'grad_norm': 16.61831283569336, 'learning_rate': 2.3000000000000003e-05, 'epoch': 4.19}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2f62946a39034980b70d894a767a5f45", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20255418121814728, 'eval_accuracy': 0.9431486880466472, 'eval_f1': 0.9387534563762207, 'eval_precision': 0.9447987426924589, 'eval_recall': 0.9409519566021532, 'eval_runtime': 115.4022, 'eval_samples_per_second': 35.667, 'eval_steps_per_second': 1.118, 'epoch': 4.19}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3233, 'grad_norm': 32.306888580322266, 'learning_rate': 2.25e-05, 'epoch': 4.27}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "40b6a87ace854547bafd24234c1cb91a", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1949690282344818, 'eval_accuracy': 0.9453352769679301, 'eval_f1': 0.9432795376952223, 'eval_precision': 0.9470467262800225, 'eval_recall': 0.9437738846449156, 'eval_runtime': 115.3043, 'eval_samples_per_second': 35.697, 'eval_steps_per_second': 1.119, 'epoch': 4.27}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2793, 'grad_norm': 27.93284797668457, 'learning_rate': 2.2000000000000003e-05, 'epoch': 4.35}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9f605606d59b4911b9e2d4f749c3320b", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19729143381118774, 'eval_accuracy': 0.9453352769679301, 'eval_f1': 0.9437011967217411, 'eval_precision': 0.9466380826466282, 'eval_recall': 0.9443602847049549, 'eval_runtime': 115.0211, 'eval_samples_per_second': 35.785, 'eval_steps_per_second': 1.122, 'epoch': 4.35}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3035, 'grad_norm': 29.801733016967773, 'learning_rate': 2.15e-05, 'epoch': 4.43}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f34eae4485934fc49e35abb04572d544", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1944328248500824, 'eval_accuracy': 0.9470359572400389, 'eval_f1': 0.9454077939859713, 'eval_precision': 0.9490637035878001, 'eval_recall': 0.9458771100450171, 'eval_runtime': 115.3924, 'eval_samples_per_second': 35.67, 'eval_steps_per_second': 1.118, 'epoch': 4.43}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2776, 'grad_norm': 20.9915828704834, 'learning_rate': 2.1e-05, 'epoch': 4.5}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "11dd6cec832243d0877056556d017440", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.20303666591644287, 'eval_accuracy': 0.9412050534499514, 'eval_f1': 0.9392606380349275, 'eval_precision': 0.94447529290143, 'eval_recall': 0.9397943721934947, 'eval_runtime': 115.1463, 'eval_samples_per_second': 35.746, 'eval_steps_per_second': 1.12, 'epoch': 4.5}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3204, 'grad_norm': 17.069580078125, 'learning_rate': 2.05e-05, 'epoch': 4.58}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "11c57ca87d864e079450107d6daae16c", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19586138427257538, 'eval_accuracy': 0.9441205053449951, 'eval_f1': 0.9417141302475077, 'eval_precision': 0.9467820293098373, 'eval_recall': 0.9427832632551781, 'eval_runtime': 115.5547, 'eval_samples_per_second': 35.619, 'eval_steps_per_second': 1.116, 'epoch': 4.58}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2868, 'grad_norm': 17.005329132080078, 'learning_rate': 2e-05, 'epoch': 4.66}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "80caf6cbf7af4c398f1830403ae6dc69", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19589664041996002, 'eval_accuracy': 0.9429057337220602, 'eval_f1': 0.9412779369524416, 'eval_precision': 0.9436887213614966, 'eval_recall': 0.941389388185646, 'eval_runtime': 114.8994, 'eval_samples_per_second': 35.823, 'eval_steps_per_second': 1.123, 'epoch': 4.66}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3325, 'grad_norm': 22.332515716552734, 'learning_rate': 1.9500000000000003e-05, 'epoch': 4.74}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "25a805532c774eb8a583b512cd2b7357", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1990695744752884, 'eval_accuracy': 0.9414480077745384, 'eval_f1': 0.9389284653201647, 'eval_precision': 0.9435251865500319, 'eval_recall': 0.9401065772897685, 'eval_runtime': 115.2827, 'eval_samples_per_second': 35.704, 'eval_steps_per_second': 1.119, 'epoch': 4.74}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3255, 'grad_norm': 17.661787033081055, 'learning_rate': 1.9e-05, 'epoch': 4.82}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b69a536fbcb9485c86eac9547c37e2e0", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18941913545131683, 'eval_accuracy': 0.9441205053449951, 'eval_f1': 0.9424829587896328, 'eval_precision': 0.9447961606157357, 'eval_recall': 0.9430641446858793, 'eval_runtime': 115.2599, 'eval_samples_per_second': 35.711, 'eval_steps_per_second': 1.119, 'epoch': 4.82}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2744, 'grad_norm': 34.363895416259766, 'learning_rate': 1.85e-05, 'epoch': 4.89}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "79ee42855cba4b80bb80facc0175d153", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19150397181510925, 'eval_accuracy': 0.9433916423712342, 'eval_f1': 0.941062925322068, 'eval_precision': 0.9433788984636261, 'eval_recall': 0.9420693320043537, 'eval_runtime': 114.9312, 'eval_samples_per_second': 35.813, 'eval_steps_per_second': 1.122, 'epoch': 4.89}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2945, 'grad_norm': 20.922874450683594, 'learning_rate': 1.8e-05, 'epoch': 4.97}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "fc19a85d125d46938b32c403560fbe1a", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19324198365211487, 'eval_accuracy': 0.9453352769679301, 'eval_f1': 0.9414975203151191, 'eval_precision': 0.9468249930723125, 'eval_recall': 0.9436447378131596, 'eval_runtime': 115.8075, 'eval_samples_per_second': 35.542, 'eval_steps_per_second': 1.114, 'epoch': 4.97}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.253, 'grad_norm': 59.48971939086914, 'learning_rate': 1.75e-05, 'epoch': 5.05}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0001e70320524fae90c0a57ae70c1aec", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19280648231506348, 'eval_accuracy': 0.9448493683187561, 'eval_f1': 0.9423025197423933, 'eval_precision': 0.9464565098738388, 'eval_recall': 0.9434635843996152, 'eval_runtime': 116.3856, 'eval_samples_per_second': 35.365, 'eval_steps_per_second': 1.108, 'epoch': 5.05}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2614, 'grad_norm': 35.534996032714844, 'learning_rate': 1.7000000000000003e-05, 'epoch': 5.13}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "909d505c8d29499ab8c2b03710af98c3", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19421857595443726, 'eval_accuracy': 0.9450923226433431, 'eval_f1': 0.9440586237220369, 'eval_precision': 0.947803962700277, 'eval_recall': 0.9444136876611519, 'eval_runtime': 115.5529, 'eval_samples_per_second': 35.62, 'eval_steps_per_second': 1.116, 'epoch': 5.13}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2699, 'grad_norm': 28.269590377807617, 'learning_rate': 1.65e-05, 'epoch': 5.2}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e5c801bb482f42f2866afa0b1ec14c1f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19241546094417572, 'eval_accuracy': 0.9467930029154519, 'eval_f1': 0.9432654058995984, 'eval_precision': 0.9478755125415989, 'eval_recall': 0.9451263185953379, 'eval_runtime': 115.2745, 'eval_samples_per_second': 35.706, 'eval_steps_per_second': 1.119, 'epoch': 5.2}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2839, 'grad_norm': 49.77896499633789, 'learning_rate': 1.6000000000000003e-05, 'epoch': 5.28}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4d67d5ebb4ca4b8ba01d4d5e3cc4e201", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18935900926589966, 'eval_accuracy': 0.9460641399416909, 'eval_f1': 0.9441903396088637, 'eval_precision': 0.9474691284305218, 'eval_recall': 0.9447453360528948, 'eval_runtime': 115.2339, 'eval_samples_per_second': 35.719, 'eval_steps_per_second': 1.119, 'epoch': 5.28}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2353, 'grad_norm': 48.467369079589844, 'learning_rate': 1.55e-05, 'epoch': 5.36}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b44ae0fbaa4e44cb98df471a5c15634d", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1947290152311325, 'eval_accuracy': 0.9426627793974732, 'eval_f1': 0.9407007005168834, 'eval_precision': 0.9435088097701708, 'eval_recall': 0.9409665078475089, 'eval_runtime': 115.4888, 'eval_samples_per_second': 35.64, 'eval_steps_per_second': 1.117, 'epoch': 5.36}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2627, 'grad_norm': 24.514537811279297, 'learning_rate': 1.5e-05, 'epoch': 5.44}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ba726c2a4ce243b0b054d16e14fbf259", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1964055746793747, 'eval_accuracy': 0.9419339164237124, 'eval_f1': 0.9405169171820565, 'eval_precision': 0.9439573145111002, 'eval_recall': 0.9408796841895061, 'eval_runtime': 115.2408, 'eval_samples_per_second': 35.717, 'eval_steps_per_second': 1.119, 'epoch': 5.44}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2592, 'grad_norm': 24.031824111938477, 'learning_rate': 1.45e-05, 'epoch': 5.51}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "329bfd614aaf4c9380dc0ddc0de55c9f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1893424391746521, 'eval_accuracy': 0.9455782312925171, 'eval_f1': 0.9439805785053186, 'eval_precision': 0.9468026471991711, 'eval_recall': 0.9441105071708379, 'eval_runtime': 115.3002, 'eval_samples_per_second': 35.698, 'eval_steps_per_second': 1.119, 'epoch': 5.51}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2634, 'grad_norm': 28.876989364624023, 'learning_rate': 1.4000000000000001e-05, 'epoch': 5.59}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "dfe25efbff7145a489082300b8280ec4", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1917800009250641, 'eval_accuracy': 0.9458211856171039, 'eval_f1': 0.9431417402206548, 'eval_precision': 0.9473129216601327, 'eval_recall': 0.9442848481856797, 'eval_runtime': 115.4501, 'eval_samples_per_second': 35.652, 'eval_steps_per_second': 1.117, 'epoch': 5.59}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.294, 'grad_norm': 32.31275939941406, 'learning_rate': 1.3500000000000001e-05, 'epoch': 5.67}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f6b112f7683249efbde70a44dad3fec2", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19223856925964355, 'eval_accuracy': 0.9446064139941691, 'eval_f1': 0.9417264287748108, 'eval_precision': 0.9457319047543262, 'eval_recall': 0.9428177281241216, 'eval_runtime': 115.1654, 'eval_samples_per_second': 35.74, 'eval_steps_per_second': 1.12, 'epoch': 5.67}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2565, 'grad_norm': 19.098983764648438, 'learning_rate': 1.3000000000000001e-05, 'epoch': 5.75}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "96340ddd2beb4d339a848f012d7aa308", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19067798554897308, 'eval_accuracy': 0.9455782312925171, 'eval_f1': 0.9432348046028909, 'eval_precision': 0.946855780013746, 'eval_recall': 0.9439227794539756, 'eval_runtime': 114.8422, 'eval_samples_per_second': 35.84, 'eval_steps_per_second': 1.123, 'epoch': 5.75}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2657, 'grad_norm': 42.332576751708984, 'learning_rate': 1.25e-05, 'epoch': 5.83}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7f031ffe8381425babb3a056ae8e8f54", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.19017623364925385, 'eval_accuracy': 0.9453352769679301, 'eval_f1': 0.9415296464977013, 'eval_precision': 0.9463815083000611, 'eval_recall': 0.9433958833255649, 'eval_runtime': 114.622, 'eval_samples_per_second': 35.909, 'eval_steps_per_second': 1.125, 'epoch': 5.83}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2945, 'grad_norm': 39.387691497802734, 'learning_rate': 1.2e-05, 'epoch': 5.9}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "af152715607a4e789e6ef5f8521bb30f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18721483647823334, 'eval_accuracy': 0.9453352769679301, 'eval_f1': 0.9426775245720236, 'eval_precision': 0.9457148349600426, 'eval_recall': 0.9439314840572076, 'eval_runtime': 114.5325, 'eval_samples_per_second': 35.937, 'eval_steps_per_second': 1.126, 'epoch': 5.9}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2758, 'grad_norm': 27.8656063079834, 'learning_rate': 1.1500000000000002e-05, 'epoch': 5.98}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "bb211143d07a413c9a1de4b747d80c2a", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18547533452510834, 'eval_accuracy': 0.9443634596695821, 'eval_f1': 0.9431702431972039, 'eval_precision': 0.9460009728094113, 'eval_recall': 0.9429548318246411, 'eval_runtime': 114.4103, 'eval_samples_per_second': 35.976, 'eval_steps_per_second': 1.128, 'epoch': 5.98}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.226, 'grad_norm': 11.917640686035156, 'learning_rate': 1.1000000000000001e-05, 'epoch': 6.06}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f5517fa0510f444b9a1cd4a634dbe006", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18669773638248444, 'eval_accuracy': 0.9470359572400389, 'eval_f1': 0.9456140149688117, 'eval_precision': 0.9487726083120527, 'eval_recall': 0.945650639479456, 'eval_runtime': 115.3149, 'eval_samples_per_second': 35.694, 'eval_steps_per_second': 1.119, 'epoch': 6.06}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2105, 'grad_norm': 30.10668182373047, 'learning_rate': 1.05e-05, 'epoch': 6.14}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "da7452e9f2254bbf8db66e2cd1dcdb1a", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18662355840206146, 'eval_accuracy': 0.9470359572400389, 'eval_f1': 0.9446376380830669, 'eval_precision': 0.9481985751231733, 'eval_recall': 0.9451399291998663, 'eval_runtime': 114.8383, 'eval_samples_per_second': 35.842, 'eval_steps_per_second': 1.123, 'epoch': 6.14}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2524, 'grad_norm': 19.51650619506836, 'learning_rate': 1e-05, 'epoch': 6.21}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "570935ebcf8248db90e774819a48f13d", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18912473320960999, 'eval_accuracy': 0.9455782312925171, 'eval_f1': 0.9440828207972681, 'eval_precision': 0.9470319200009861, 'eval_recall': 0.9440647628944369, 'eval_runtime': 114.9869, 'eval_samples_per_second': 35.795, 'eval_steps_per_second': 1.122, 'epoch': 6.21}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2987, 'grad_norm': 21.431785583496094, 'learning_rate': 9.5e-06, 'epoch': 6.29}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5071c681f60a42c7856110c385265652", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18788579106330872, 'eval_accuracy': 0.9463070942662779, 'eval_f1': 0.9442174084334728, 'eval_precision': 0.94717500919616, 'eval_recall': 0.94474208440163, 'eval_runtime': 114.7843, 'eval_samples_per_second': 35.859, 'eval_steps_per_second': 1.124, 'epoch': 6.29}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2393, 'grad_norm': 29.874370574951172, 'learning_rate': 9e-06, 'epoch': 6.37}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "aaf3a6412e1e430e857332f36a740b33", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18758134543895721, 'eval_accuracy': 0.9455782312925171, 'eval_f1': 0.9438735702946481, 'eval_precision': 0.9467168582344176, 'eval_recall': 0.944165304237067, 'eval_runtime': 114.4749, 'eval_samples_per_second': 35.955, 'eval_steps_per_second': 1.127, 'epoch': 6.37}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2779, 'grad_norm': 20.344120025634766, 'learning_rate': 8.500000000000002e-06, 'epoch': 6.45}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c10f2a19f9ea4bdb897111838b0ae138", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18703600764274597, 'eval_accuracy': 0.9472789115646258, 'eval_f1': 0.9460078195309758, 'eval_precision': 0.9486167487517463, 'eval_recall': 0.9462858886621092, 'eval_runtime': 114.7558, 'eval_samples_per_second': 35.867, 'eval_steps_per_second': 1.124, 'epoch': 6.45}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.3117, 'grad_norm': 46.45502853393555, 'learning_rate': 8.000000000000001e-06, 'epoch': 6.52}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4edd884409a54723b867a2757987d0c5", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18655528128147125, 'eval_accuracy': 0.9470359572400389, 'eval_f1': 0.9450272796125615, 'eval_precision': 0.9483441803390215, 'eval_recall': 0.9454568498919402, 'eval_runtime': 115.4417, 'eval_samples_per_second': 35.654, 'eval_steps_per_second': 1.117, 'epoch': 6.52}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2574, 'grad_norm': 29.437402725219727, 'learning_rate': 7.5e-06, 'epoch': 6.6}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f235dcbf496741cb9dc7f4a9d85deacd", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18528060615062714, 'eval_accuracy': 0.9467930029154519, 'eval_f1': 0.9449366516090995, 'eval_precision': 0.9480591020362807, 'eval_recall': 0.9453992021634803, 'eval_runtime': 115.4083, 'eval_samples_per_second': 35.665, 'eval_steps_per_second': 1.118, 'epoch': 6.6}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2307, 'grad_norm': 32.25284957885742, 'learning_rate': 7.000000000000001e-06, 'epoch': 6.68}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c86b4f0ee943421197a259866dbd48fe", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1886408030986786, 'eval_accuracy': 0.9463070942662779, 'eval_f1': 0.9440694728489321, 'eval_precision': 0.9475093316150454, 'eval_recall': 0.9446716794721195, 'eval_runtime': 114.9197, 'eval_samples_per_second': 35.816, 'eval_steps_per_second': 1.123, 'epoch': 6.68}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2771, 'grad_norm': 28.42708396911621, 'learning_rate': 6.5000000000000004e-06, 'epoch': 6.76}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "1f5da6982261421cadae5ff53492c3e8", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18778492510318756, 'eval_accuracy': 0.9455782312925171, 'eval_f1': 0.9437151356331512, 'eval_precision': 0.9463778961520076, 'eval_recall': 0.9440032215632309, 'eval_runtime': 114.8005, 'eval_samples_per_second': 35.853, 'eval_steps_per_second': 1.124, 'epoch': 6.76}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2575, 'grad_norm': 25.114654541015625, 'learning_rate': 6e-06, 'epoch': 6.83}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5dce0504beba4f8395ba60b7f54b5011", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18679623305797577, 'eval_accuracy': 0.9458211856171039, 'eval_f1': 0.9440304784957401, 'eval_precision': 0.9464549050027096, 'eval_recall': 0.9443298152354914, 'eval_runtime': 114.9672, 'eval_samples_per_second': 35.802, 'eval_steps_per_second': 1.122, 'epoch': 6.83}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2422, 'grad_norm': 16.643173217773438, 'learning_rate': 5.500000000000001e-06, 'epoch': 6.91}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "834af4a8bfd0495b9d74f03808c34a9f", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18573926389217377, 'eval_accuracy': 0.9463070942662779, 'eval_f1': 0.9447287950344947, 'eval_precision': 0.9466256264740276, 'eval_recall': 0.9448092856904987, 'eval_runtime': 114.2623, 'eval_samples_per_second': 36.022, 'eval_steps_per_second': 1.129, 'epoch': 6.91}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2564, 'grad_norm': 23.791414260864258, 'learning_rate': 5e-06, 'epoch': 6.99}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9e5d6325bccb4d4daaf9b5bc6bbe95ac", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18609043955802917, 'eval_accuracy': 0.9450923226433431, 'eval_f1': 0.943405927871684, 'eval_precision': 0.9457964096942665, 'eval_recall': 0.9437011484910802, 'eval_runtime': 114.5533, 'eval_samples_per_second': 35.931, 'eval_steps_per_second': 1.126, 'epoch': 6.99}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.222, 'grad_norm': 22.469945907592773, 'learning_rate': 4.5e-06, 'epoch': 7.07}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "27e1d3e7b75f457b9304316b3bb4e172", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18656669557094574, 'eval_accuracy': 0.9460641399416909, 'eval_f1': 0.9442410518423953, 'eval_precision': 0.9471358331649645, 'eval_recall': 0.9445136266970219, 'eval_runtime': 114.7242, 'eval_samples_per_second': 35.877, 'eval_steps_per_second': 1.124, 'epoch': 7.07}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2467, 'grad_norm': 21.200775146484375, 'learning_rate': 4.000000000000001e-06, 'epoch': 7.15}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e719ff91b30747bcbb175883c0cd6161", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18616622686386108, 'eval_accuracy': 0.9455782312925171, 'eval_f1': 0.9437781408457974, 'eval_precision': 0.9464490390853617, 'eval_recall': 0.9440603175141112, 'eval_runtime': 114.8323, 'eval_samples_per_second': 35.844, 'eval_steps_per_second': 1.123, 'epoch': 7.15}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2412, 'grad_norm': 35.93463134765625, 'learning_rate': 3.5000000000000004e-06, 'epoch': 7.22}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0aa0eac4e7634e09ab3b00e1460a4cfe", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18599696457386017, 'eval_accuracy': 0.9463070942662779, 'eval_f1': 0.9448775786545901, 'eval_precision': 0.947363829714541, 'eval_recall': 0.9450603074013545, 'eval_runtime': 114.6507, 'eval_samples_per_second': 35.9, 'eval_steps_per_second': 1.125, 'epoch': 7.22}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2518, 'grad_norm': 29.987287521362305, 'learning_rate': 3e-06, 'epoch': 7.3}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f39114979bc9453893f1d27a7ce3020d", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18572011590003967, 'eval_accuracy': 0.9458211856171039, 'eval_f1': 0.9442243391811521, 'eval_precision': 0.946596309226017, 'eval_recall': 0.9444744566350352, 'eval_runtime': 115.5702, 'eval_samples_per_second': 35.615, 'eval_steps_per_second': 1.116, 'epoch': 7.3}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2811, 'grad_norm': 23.384248733520508, 'learning_rate': 2.5e-06, 'epoch': 7.38}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ae40c574e47b436f9c0ad5f4619350ab", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1857149749994278, 'eval_accuracy': 0.9463070942662779, 'eval_f1': 0.9445989796887535, 'eval_precision': 0.9472480417520439, 'eval_recall': 0.9448064645960754, 'eval_runtime': 115.481, 'eval_samples_per_second': 35.642, 'eval_steps_per_second': 1.117, 'epoch': 7.38}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2255, 'grad_norm': 30.20746612548828, 'learning_rate': 2.0000000000000003e-06, 'epoch': 7.46}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9e6212eb9c794b89ad827d50ebfb4ce2", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18561427295207977, 'eval_accuracy': 0.9467930029154519, 'eval_f1': 0.9451045640195868, 'eval_precision': 0.9476659871671366, 'eval_recall': 0.9453293404130689, 'eval_runtime': 114.8389, 'eval_samples_per_second': 35.842, 'eval_steps_per_second': 1.123, 'epoch': 7.46}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2425, 'grad_norm': 19.37528419494629, 'learning_rate': 1.5e-06, 'epoch': 7.53}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6eb5a6b787884fa3878df79c165bc8ec", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18569190800189972, 'eval_accuracy': 0.9465500485908649, 'eval_f1': 0.9448586598790534, 'eval_precision': 0.9477969985142358, 'eval_recall': 0.9450842423738532, 'eval_runtime': 115.0804, 'eval_samples_per_second': 35.766, 'eval_steps_per_second': 1.121, 'epoch': 7.53}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2352, 'grad_norm': 32.203643798828125, 'learning_rate': 1.0000000000000002e-06, 'epoch': 7.61}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c795710621a342f08fedfcf61d8b2ef8", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.18563427031040192, 'eval_accuracy': 0.9467930029154519, 'eval_f1': 0.9450299849824627, 'eval_precision': 0.9479779072439513, 'eval_recall': 0.9453246844288115, 'eval_runtime': 114.6829, 'eval_samples_per_second': 35.89, 'eval_steps_per_second': 1.125, 'epoch': 7.61}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{'loss': 0.2328, 'grad_norm': 38.99296951293945, 'learning_rate': 5.000000000000001e-07, 'epoch': 7.69}\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "2f865fc88ab9411d95890432df2d047a", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/129 [00:00, ?it/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "{'eval_loss': 0.1855447143316269, 'eval_accuracy': 0.9467930029154519, 'eval_f1': 0.9450299849824627, 'eval_precision': 0.9479779072439513, 'eval_recall': 0.9453246844288115, 'eval_runtime': 114.7231, 'eval_samples_per_second': 35.878, 'eval_steps_per_second': 1.124, 'epoch': 7.69}\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/Users/andrewmayes/Openclassroom/CanineNet/env/lib/python3.12/site-packages/torch/utils/checkpoint.py:464: UserWarning: torch.utils.checkpoint: the use_reentrant parameter should be passed explicitly. In version 2.4 we will raise an exception if use_reentrant is not passed. use_reentrant=False is recommended, but if you need to preserve the current default behavior, you can pass use_reentrant=True. Refer to docs for more details on the differences between the two variants.\n", " warnings.warn(\n" ] } ], "source": [ "metrics = {metric: evaluate.load(metric) for metric in METRICS}\n", "\n", "\n", "# for lr in [5e-3, 5e-4, 5e-5]: # 5e-5\n", "# for batch in [64]: # 32\n", "# for model_name in [\"google/vit-base-patch16-224\", \"microsoft/swinv2-base-patch4-window16-256\", \"google/siglip-base-patch16-224\"]: # \"facebook/dinov2-base\"\n", "\n", "lr = 5e-5\n", "batch = 32\n", "model_name = \"microsoft/swinv2-base-patch4-window16-256\"\n", "\n", "image_processor = AutoImageProcessor.from_pretrained(model_name)\n", "model = AutoModelForImageClassification.from_pretrained(\n", "model_name,\n", "num_labels=len(label2int),\n", "id2label=int2label,\n", "label2id=label2int,\n", "ignore_mismatched_sizes=True,\n", ")\n", "\n", "# Then, in your transformations:\n", "def train_transform(examples, num_ops=10, magnitude=9, num_magnitude_bins=31):\n", "\n", " transformation = v2.Compose(\n", " [\n", " v2.RandAugment(\n", " num_ops=num_ops,\n", " magnitude=magnitude,\n", " num_magnitude_bins=num_magnitude_bins,\n", " )\n", " ]\n", " )\n", " # Ensure each image has three dimensions (in this case, ensure it's RGB)\n", " examples[\"pixel_values\"] = [\n", " image.convert(\"RGB\") for image in examples[\"pixel_values\"]\n", " ]\n", " # Apply transformations\n", " examples[\"pixel_values\"] = [\n", " image_processor(transformation(image), return_tensors=\"pt\")[\n", " \"pixel_values\"\n", " ].squeeze()\n", " for image in examples[\"pixel_values\"]\n", " ]\n", " return examples\n", "\n", "\n", "def test_transform(examples):\n", " # Ensure each image is RGB\n", " examples[\"pixel_values\"] = [\n", " image.convert(\"RGB\") for image in examples[\"pixel_values\"]\n", " ]\n", " # Apply processing\n", " examples[\"pixel_values\"] = [\n", " image_processor(image, return_tensors=\"pt\")[\"pixel_values\"].squeeze()\n", " for image in examples[\"pixel_values\"]\n", " ]\n", " return examples\n", "\n", "\n", "def compute_metrics(eval_pred):\n", " predictions, labels = eval_pred\n", " # predictions = np.argmax(logits, axis=-1)\n", " results = {}\n", " for key, val in metrics.items():\n", " if \"accuracy\" == key:\n", " result = next(\n", " iter(val.compute(predictions=predictions, references=labels).items())\n", " )\n", " if \"accuracy\" != key:\n", " result = next(\n", " iter(\n", " val.compute(\n", " predictions=predictions, references=labels, average=\"macro\"\n", " ).items()\n", " )\n", " )\n", " results[result[0]] = result[1]\n", " return results\n", "\n", "\n", "def collate_fn(examples):\n", " pixel_values = torch.stack([example[\"pixel_values\"] for example in examples])\n", " labels = torch.tensor([example[\"label\"] for example in examples])\n", " return {\"pixel_values\": pixel_values, \"labels\": labels}\n", "\n", "\n", "def preprocess_logits_for_metrics(logits, labels):\n", " \"\"\"\n", " Original Trainer may have a memory leak.\n", " This is a workaround to avoid storing too many tensors that are not needed.\n", " \"\"\"\n", " pred_ids = torch.argmax(logits, dim=-1)\n", " return pred_ids\n", "\n", "ds[\"train\"].set_transform(train_transform)\n", "ds[\"test\"].set_transform(test_transform)\n", "\n", "training_args = TrainingArguments(**CONFIG[\"training_args\"])\n", "training_args.per_device_train_batch_size = batch\n", "training_args.per_device_eval_batch_size = batch\n", "training_args.hub_model_id = f\"amaye15/{model_name.replace('/','-')}-batch{batch}-lr{lr}-standford-dogs\"\n", "\n", "mlflow.start_run(run_name=f\"{model_name.replace('/','-')}-batch{batch}-lr{lr}\")\n", "\n", "trainer = Trainer(\n", " model=model,\n", " args=training_args,\n", " train_dataset=ds[\"train\"],\n", " eval_dataset=ds[\"test\"],\n", " tokenizer=image_processor,\n", " data_collator=collate_fn,\n", " compute_metrics=compute_metrics,\n", " # callbacks=[early_stopping_callback],\n", " preprocess_logits_for_metrics=preprocess_logits_for_metrics,\n", ")\n", "\n", "# Train the model\n", "trainer.train()\n", "\n", "trainer.push_to_hub()\n", "\n", "mlflow.end_run()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "mlflow.end_run()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# training_args = TrainingArguments(**CONFIG[\"training_args\"])\n", "\n", "# image_processor = AutoImageProcessor.from_pretrained(MODELS)\n", "# model = AutoModelForImageClassification.from_pretrained(\n", "# MODELS,\n", "# num_labels=len(CONFIG[\"label2int\"]),\n", "# id2label=CONFIG[\"label2int\"],\n", "# label2id=CONFIG[\"int2label\"],\n", "# ignore_mismatched_sizes=True,\n", "# )\n", "\n", "\n", "# training_args = TrainingArguments(**CONFIG[\"training_args\"])\n", "\n", "# trainer = Trainer(\n", "# model=model,\n", "# args=training_args,\n", "# train_dataset=ds[\"train\"],\n", "# eval_dataset=ds[\"test\"],\n", "# tokenizer=image_processor,\n", "# data_collator=collate_fn,\n", "# compute_metrics=compute_metrics,\n", "# # callbacks=[early_stopping_callback],\n", "# preprocess_logits_for_metrics=preprocess_logits_for_metrics,\n", "# )\n", "\n", "# # Train the model\n", "# trainer.train()\n", "\n", "# mlflow.end_run()" ] } ], "metadata": { "kernelspec": { "display_name": "env", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 2 }