Skip to content

Instantly share code, notes, and snippets.

@muellerzr
Created June 24, 2025 01:08
Show Gist options
  • Save muellerzr/118de40590e98dcbf2e5885c8b118e76 to your computer and use it in GitHub Desktop.
Save muellerzr/118de40590e98dcbf2e5885c8b118e76 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tutorial: Using Hugging Face `accelerate` with `nbdistributed`\n",
"> Showcasing how to use `nbdistributed` to create a more interactive Jupyter distributed tutorial"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This notebook is based upon the [official `accelerate` notebook](https://github.com/huggingface/notebooks/blob/main/examples/accelerate_examples/simple_nlp_example.ipynb) but modified for this tutorial and to utilize `nbdistributed`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First we enable the plugin:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%load_ext nbdistributed"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then define how the topology should be:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using GPU IDs: [3, 4]\n",
"Starting 2 distributed workers...\n",
"✓ Successfully started 2 workers\n",
" Rank 0 -> GPU 3\n",
" Rank 1 -> GPU 4\n",
"Available commands:\n",
" %%distributed - Execute code on all ranks (explicit)\n",
" %%rank [0,n] - Execute code on specific ranks\n",
" %sync - Synchronize all ranks\n",
" %dist_status - Show worker status\n",
" %dist_mode - Toggle automatic distributed mode\n",
" %dist_shutdown - Shutdown workers\n",
"\n",
"🚀 Distributed mode active: All cells will now execute on workers automatically!\n",
" Magic commands (%, %%) will still execute locally as normal.\n",
"\n",
"🐍 Below are auto-imported and special variables auto-generated into the namespace to use\n",
" `torch`\n",
" `dist`: `torch.distributed` import alias\n",
" `rank` (`int`): The local rank\n",
" `world_size` (`int`): The global world size\n",
" `gpu_id` (`int`): The specific GPU ID assigned to this worker\n",
" `device` (`torch.device`): The current PyTorch device object (e.g. `cuda:1`)\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%dist_init --num-processes 2 --gpu-ids 3,4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports and model\n",
"\n",
"Next let's bring in the imports we will use:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import torch\n",
"from torch.utils.data import DataLoader\n",
"\n",
"from accelerate import Accelerator, DistributedType\n",
"from datasets import load_dataset\n",
"from transformers import (\n",
" AutoModelForSequenceClassification,\n",
" AutoTokenizer,\n",
" get_linear_schedule_with_warmup,\n",
" set_seed,\n",
")\n",
"from evaluate import load as load_metric\n",
"from torch.optim import AdamW\n",
"\n",
"\n",
"from tqdm.auto import tqdm\n",
"\n",
"import datasets\n",
"import transformers"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_2a61879c\": {\"cell_id\": \"cell_5_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"set_seed(42)\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"set_seed(42)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As with the tutorial, we'll train on a smol model:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_a75c3edc\": {\"cell_id\": \"cell_7_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"model_checkpoint = \"HuggingFaceTB/SmolLM2-135M\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Load the data\n",
"\n",
"We'll just use Hugging Face `dataset`'s `load_dataset` to download and cache the dataset:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_603fd080\": {\"cell_id\": \"cell_9_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"raw_datasets = load_dataset(\"glue\", \"mrpc\")"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== Ranks [0] ===\n",
"\n",
"--- Rank 0 ---\n",
"DatasetDict({\n",
" train: Dataset({\n",
" features: ['sentence1', 'sentence2', 'label', 'idx'],\n",
" num_rows: 3668\n",
" })\n",
" validation: Dataset({\n",
" features: ['sentence1', 'sentence2', 'label', 'idx'],\n",
" num_rows: 408\n",
" })\n",
" test: Dataset({\n",
" features: ['sentence1', 'sentence2', 'label', 'idx'],\n",
" num_rows: 1725\n",
" })\n",
"})\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_0f49f18a\": {\"cell_id\": \"cell_11_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%rank [0]\n",
"raw_datasets"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== Ranks [0] ===\n",
"\n",
"--- Rank 0 ---\n",
"{'sentence1': 'Amrozi accused his brother , whom he called \" the witness \" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \" the witness \" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_164557e1\": {\"cell_id\": \"cell_13_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%rank [0]\n",
"raw_datasets[\"train\"][0]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can preprocess the data:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_f5fdf41e\": {\"cell_id\": \"cell_15_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\n",
"tokenizer.pad_token = tokenizer.eos_token"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== Ranks [0] ===\n",
"\n",
"--- Rank 0 ---\n",
"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_64210e19\": {\"cell_id\": \"cell_17_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%rank [0]\n",
"tokenizer(\"Hello, this one sentence!\", \"And this sentence goes with it.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_b9667e16\": {\"cell_id\": \"cell_19_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"def tokenize_function(examples):\n",
" outputs = tokenizer(examples[\"sentence1\"], examples[\"sentence2\"], truncation=True, padding=\"max_length\", max_length=128)\n",
" return outputs"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_c21530f3\": {\"cell_id\": \"cell_21_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\"idx\", \"sentence1\", \"sentence2\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Lastly we get rid of any columns that we don't want to use, as well as rename columns to what we would expect:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_23_7f0cfc50\": {\"cell_id\": \"cell_23_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 23, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"tokenized_datasets = tokenized_datasets.rename_column(\"label\", \"labels\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== Ranks [0] ===\n",
"\n",
"--- Rank 0 ---\n",
"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_25_0fcbf9e0\": {\"cell_id\": \"cell_25_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 25, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%rank [0]\n",
"tokenized_datasets[\"train\"].features"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_27_5ef0ed3d\": {\"cell_id\": \"cell_27_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 27, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"tokenized_datasets.set_format(\"torch\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Getting the training chunks ready\n",
"\n",
"Since we're already in a distributed process, we can just declare a model and create dataloaders \n",
"\n",
"> With accelerate, we needed to create seperate functions for these since they call cuda"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_29_9ba48c77\": {\"cell_id\": \"cell_29_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 29, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_31_adffdfd8\": {\"cell_id\": \"cell_31_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 31, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"model.config.pad_token_id = tokenizer.pad_token_id"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_33_467afd9f\": {\"cell_id\": \"cell_33_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 33, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"optimizer = AdamW(params=model.parameters(), lr=2e-5)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_35_2a2f6fe5\": {\"cell_id\": \"cell_35_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 35, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"train_dataloader = DataLoader(\n",
" tokenized_datasets[\"train\"], shuffle=True, batch_size=16\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_37_468c5c1c\": {\"cell_id\": \"cell_37_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 37, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"eval_dataloader = DataLoader(\n",
" tokenized_datasets[\"validation\"], shuffle=False, batch_size=32\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_39_fe0d04c9\": {\"cell_id\": \"cell_39_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 39, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_fe0d04c9\": {\"cell_id\": \"cell_21_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": 1750727010.645177, \"total_duration\": 0.01221466064453125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.645177, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0122s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"lr_scheduler = get_linear_schedule_with_warmup(\n",
" optimizer=optimizer,\n",
" num_warmup_steps=100,\n",
" num_training_steps=len(train_dataloader) * 3\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can (safely) examine a batch of data:"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\n",
"\n",
"\n",
"--- Rank 1 ---\n",
"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\n",
"\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_fe0d04c9\": {\"cell_id\": \"cell_21_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": 1750727010.645177, \"total_duration\": 0.01221466064453125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.645177, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0122s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_41_b549c3f1\": {\"cell_id\": \"cell_41_b549c3f1\", \"start_time\": 1750727012.2381463, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\", \"execution_count\": 41, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2381463, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_42_88dc4aab\": {\"cell_id\": \"cell_42_88dc4aab\", \"start_time\": 1750727012.2383175, \"end_time\": 1750727013.4304883, \"total_duration\": 1.1921708583831787, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\\n\", \"execution_count\": 42, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2383175, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.41984, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 1, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.419862, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.4304883, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1922s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_fe0d04c9\": {\"cell_id\": \"cell_21_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": 1750727010.645177, \"total_duration\": 0.01221466064453125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.645177, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0122s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_42_88dc4aab\": {\"cell_id\": \"cell_42_88dc4aab\", \"start_time\": 1750727012.2383175, \"end_time\": 1750727013.4304883, \"total_duration\": 1.1921708583831787, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\\n\", \"execution_count\": 42, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2383175, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.41984, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 1, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.419862, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.4304883, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1922s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_b549c3f1\": {\"cell_id\": \"cell_22_b549c3f1\", \"start_time\": 1750727012.2381463, \"end_time\": 1750727013.431865, \"total_duration\": 1.193718671798706, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2381463, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.431865, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1937s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for batch in train_dataloader:\n",
" print({k:v.shape for k,v in batch.items()})\n",
" outputs = model(**batch)\n",
" break"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"✓ Executed successfully\n",
"\n",
"--- Rank 1 ---\n",
"✓ Executed successfully\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_fe0d04c9\": {\"cell_id\": \"cell_21_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": 1750727010.645177, \"total_duration\": 0.01221466064453125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.645177, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0122s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_42_88dc4aab\": {\"cell_id\": \"cell_42_88dc4aab\", \"start_time\": 1750727012.2383175, \"end_time\": 1750727013.4304883, \"total_duration\": 1.1921708583831787, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\\n\", \"execution_count\": 42, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2383175, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.41984, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 1, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.419862, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.4304883, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1922s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_b549c3f1\": {\"cell_id\": \"cell_22_b549c3f1\", \"start_time\": 1750727012.2381463, \"end_time\": 1750727013.431865, \"total_duration\": 1.193718671798706, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2381463, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.431865, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1937s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_43_198682cf\": {\"cell_id\": \"cell_43_198682cf\", \"start_time\": 1750727015.112002, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"metric = load_metric(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 43, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727015.112002, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_44_384d869a\": {\"cell_id\": \"cell_44_384d869a\", \"start_time\": 1750727015.1121767, \"end_time\": 1750727015.2801497, \"total_duration\": 0.16797304153442383, \"cell_content\": \"metric = load_metric(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 44, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727015.1121767, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727015.2801497, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.1680s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_fe0d04c9\": {\"cell_id\": \"cell_21_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": 1750727010.645177, \"total_duration\": 0.01221466064453125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.645177, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0122s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_42_88dc4aab\": {\"cell_id\": \"cell_42_88dc4aab\", \"start_time\": 1750727012.2383175, \"end_time\": 1750727013.4304883, \"total_duration\": 1.1921708583831787, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\\n\", \"execution_count\": 42, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2383175, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.41984, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 1, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.419862, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.4304883, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1922s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_b549c3f1\": {\"cell_id\": \"cell_22_b549c3f1\", \"start_time\": 1750727012.2381463, \"end_time\": 1750727013.431865, \"total_duration\": 1.193718671798706, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2381463, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.431865, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1937s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_44_384d869a\": {\"cell_id\": \"cell_44_384d869a\", \"start_time\": 1750727015.1121767, \"end_time\": 1750727015.2801497, \"total_duration\": 0.16797304153442383, \"cell_content\": \"metric = load_metric(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 44, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727015.1121767, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727015.2801497, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.1680s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_23_198682cf\": {\"cell_id\": \"cell_23_198682cf\", \"start_time\": 1750727015.112002, \"end_time\": 1750727015.2815669, \"total_duration\": 0.16956496238708496, \"cell_content\": \"metric = load_metric(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 23, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727015.112002, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727015.2815669, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.1696s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"metric = load_metric(\"glue\", \"mrpc\")"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== All ranks ===\n",
"\n",
"--- Rank 0 ---\n",
"{'accuracy': 0.25, 'f1': 0.0}\n",
"\n",
"--- Rank 1 ---\n",
"{'accuracy': 0.25, 'f1': 0.0}\n",
"Warning: Error creating local proxies: name '_T_co' is not defined\n"
]
},
{
"data": {
"application/javascript": "\n \n // Update notebook metadata with timeline data\n if (typeof Jupyter !== 'undefined' && Jupyter.notebook) {\n // Initialize execution_timelines if it doesn't exist\n if (!Jupyter.notebook.metadata.execution_timelines) {\n Jupyter.notebook.metadata.execution_timelines = {};\n }\n \n // Merge the new timeline data\n const newTimelines = {\"cell_2_db169d6e\": {\"cell_id\": \"cell_2_db169d6e\", \"start_time\": 1750726954.1296306, \"end_time\": 1750726957.0162594, \"total_duration\": 2.8866288661956787, \"cell_content\": \"%dist_init --num-processes 2 --gpu-ids 3,4\", \"execution_count\": 2, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726954.1296306, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726957.0162594, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.8866s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_3_d8efee89\": {\"cell_id\": \"cell_3_d8efee89\", \"start_time\": 1750726963.2756429, \"end_time\": 1750726965.63002, \"total_duration\": 2.354377031326294, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\", \"execution_count\": 3, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2756429, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.63002, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3544s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_4c12db52\": {\"cell_id\": \"cell_4_4c12db52\", \"start_time\": 1750726963.2758749, \"end_time\": 1750726965.6288607, \"total_duration\": 2.3529858589172363, \"cell_content\": \"import torch\\nfrom torch.utils.data import DataLoader\\n\\nfrom accelerate import Accelerator, DistributedType\\nfrom datasets import load_dataset\\nfrom transformers import (\\n AutoModelForSequenceClassification,\\n AutoTokenizer,\\n get_linear_schedule_with_warmup,\\n set_seed,\\n)\\nfrom evaluate import load as load_metric\\nfrom torch.optim import AdamW\\n\\n\\nfrom tqdm.auto import tqdm\\n\\nimport datasets\\nimport transformers\\n\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726963.2758749, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726965.6288607, \"event_type\": \"end\", \"content\": \"Cell execution completed in 2.3530s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_b5641538\": {\"cell_id\": \"cell_6_b5641538\", \"start_time\": 1750726966.4234545, \"end_time\": 1750726966.435406, \"total_duration\": 0.011951446533203125, \"cell_content\": \"set_seed(42)\\n\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4234545, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.435406, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_4_2a61879c\": {\"cell_id\": \"cell_4_2a61879c\", \"start_time\": 1750726966.4232988, \"end_time\": 1750726966.4363286, \"total_duration\": 0.013029813766479492, \"cell_content\": \"set_seed(42)\", \"execution_count\": 4, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726966.4232988, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726966.4363286, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_c33dc3ec\": {\"cell_id\": \"cell_8_c33dc3ec\", \"start_time\": 1750726967.7295995, \"end_time\": 1750726967.7406793, \"total_duration\": 0.011079788208007812, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\\n\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7295995, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.7406793, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_5_a75c3edc\": {\"cell_id\": \"cell_5_a75c3edc\", \"start_time\": 1750726967.7294352, \"end_time\": 1750726967.741281, \"total_duration\": 0.011845827102661133, \"cell_content\": \"model_checkpoint = \\\"HuggingFaceTB/SmolLM2-135M\\\"\", \"execution_count\": 5, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726967.7294352, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726967.741281, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_b02c7b44\": {\"cell_id\": \"cell_10_b02c7b44\", \"start_time\": 1750726968.8076138, \"end_time\": 1750726973.1736987, \"total_duration\": 4.366084814071655, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8076138, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.1736987, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3661s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_6_603fd080\": {\"cell_id\": \"cell_6_603fd080\", \"start_time\": 1750726968.8074508, \"end_time\": 1750726973.174643, \"total_duration\": 4.367192268371582, \"cell_content\": \"raw_datasets = load_dataset(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 6, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726968.8074508, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726973.174643, \"event_type\": \"end\", \"content\": \"Cell execution completed in 4.3672s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_ea16090e\": {\"cell_id\": \"cell_12_ea16090e\", \"start_time\": 1750726999.6304672, \"end_time\": 1750726999.640862, \"total_duration\": 0.010394811630249023, \"cell_content\": \"raw_datasets\\n\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.6304672, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6407926, \"event_type\": \"output\", \"content\": \"DatasetDict({\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6417925, \"event_type\": \"output\", \"content\": \" train: Dataset({\", \"rank\": 0, \"line_number\": 2, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6427927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 3, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6447926, \"event_type\": \"output\", \"content\": \" num_rows: 3668\", \"rank\": 0, \"line_number\": 4, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6457927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 5, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6467927, \"event_type\": \"output\", \"content\": \" validation: Dataset({\", \"rank\": 0, \"line_number\": 6, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6477926, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 7, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6497927, \"event_type\": \"output\", \"content\": \" num_rows: 408\", \"rank\": 0, \"line_number\": 8, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6507926, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 9, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6517925, \"event_type\": \"output\", \"content\": \" test: Dataset({\", \"rank\": 0, \"line_number\": 10, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6527927, \"event_type\": \"output\", \"content\": \" features: ['sentence1', 'sentence2', 'label', 'idx'],\", \"rank\": 0, \"line_number\": 11, \"sub_duration\": 0.002}, {\"timestamp\": 1750726999.6547925, \"event_type\": \"output\", \"content\": \" num_rows: 1725\", \"rank\": 0, \"line_number\": 12, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6557927, \"event_type\": \"output\", \"content\": \" })\", \"rank\": 0, \"line_number\": 13, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.6567926, \"event_type\": \"output\", \"content\": \"})\", \"rank\": 0, \"line_number\": 14, \"sub_duration\": 0.001}, {\"timestamp\": 1750726999.640862, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_7_0f49f18a\": {\"cell_id\": \"cell_7_0f49f18a\", \"start_time\": 1750726999.630301, \"end_time\": 1750726999.6415973, \"total_duration\": 0.011296272277832031, \"cell_content\": \"%%rank [0]\\nraw_datasets\", \"execution_count\": 7, \"line_durations\": [], \"events\": [{\"timestamp\": 1750726999.630301, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750726999.6415973, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_b3cbcd17\": {\"cell_id\": \"cell_14_b3cbcd17\", \"start_time\": 1750727000.659639, \"end_time\": 1750727000.6698992, \"total_duration\": 0.010260343551635742, \"cell_content\": \"raw_datasets[\\\"train\\\"][0]\\n\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.659639, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.669852, \"event_type\": \"output\", \"content\": \"{'sentence1': 'Amrozi accused his brother , whom he called \\\" the witness \\\" , of deliberately distorting his evidence .', 'sentence2': 'Referring to him as only \\\" the witness \\\" , Amrozi accused his brother of deliberately distorting his evidence .', 'label': 1, 'idx': 0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727000.6698992, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0103s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_8_164557e1\": {\"cell_id\": \"cell_8_164557e1\", \"start_time\": 1750727000.6594667, \"end_time\": 1750727000.6707287, \"total_duration\": 0.011261940002441406, \"cell_content\": \"%%rank [0]\\nraw_datasets[\\\"train\\\"][0]\", \"execution_count\": 8, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727000.6594667, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727000.6707287, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0113s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_8cb5f499\": {\"cell_id\": \"cell_16_8cb5f499\", \"start_time\": 1750727002.2373552, \"end_time\": 1750727002.517585, \"total_duration\": 0.2802298069000244, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\\n\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2373552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.517585, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2802s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_9_f5fdf41e\": {\"cell_id\": \"cell_9_f5fdf41e\", \"start_time\": 1750727002.2371137, \"end_time\": 1750727002.518671, \"total_duration\": 0.2815573215484619, \"cell_content\": \"tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)\\ntokenizer.pad_token = tokenizer.eos_token\", \"execution_count\": 9, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.2371137, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.518671, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.2816s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_7e159845\": {\"cell_id\": \"cell_18_7e159845\", \"start_time\": 1750727002.941848, \"end_time\": 1750727002.9520786, \"total_duration\": 0.010230541229248047, \"cell_content\": \"tokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\\n\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.941848, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9520273, \"event_type\": \"output\", \"content\": \"{'input_ids': [19556, 28, 451, 582, 6330, 17, 3528, 451, 6330, 3935, 351, 357, 30], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727002.9520786, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0102s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_10_64210e19\": {\"cell_id\": \"cell_10_64210e19\", \"start_time\": 1750727002.9416115, \"end_time\": 1750727002.9528472, \"total_duration\": 0.011235713958740234, \"cell_content\": \"%%rank [0]\\ntokenizer(\\\"Hello, this one sentence!\\\", \\\"And this sentence goes with it.\\\")\", \"execution_count\": 10, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727002.9416115, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727002.9528472, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_44213d9a\": {\"cell_id\": \"cell_20_44213d9a\", \"start_time\": 1750727003.4167383, \"end_time\": 1750727003.4277494, \"total_duration\": 0.011011123657226562, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\\n\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4167383, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4277494, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_11_b9667e16\": {\"cell_id\": \"cell_11_b9667e16\", \"start_time\": 1750727003.4164884, \"end_time\": 1750727003.4285932, \"total_duration\": 0.01210474967956543, \"cell_content\": \"def tokenize_function(examples):\\n outputs = tokenizer(examples[\\\"sentence1\\\"], examples[\\\"sentence2\\\"], truncation=True, padding=\\\"max_length\\\", max_length=128)\\n return outputs\", \"execution_count\": 11, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.4164884, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.4285932, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0121s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_eb74eab3\": {\"cell_id\": \"cell_22_eb74eab3\", \"start_time\": 1750727003.876604, \"end_time\": 1750727003.9254682, \"total_duration\": 0.048864126205444336, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\\n\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.876604, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9254682, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0489s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_12_c21530f3\": {\"cell_id\": \"cell_12_c21530f3\", \"start_time\": 1750727003.8763552, \"end_time\": 1750727003.9265552, \"total_duration\": 0.05019998550415039, \"cell_content\": \"tokenized_datasets = raw_datasets.map(tokenize_function, batched=True, remove_columns=[\\\"idx\\\", \\\"sentence1\\\", \\\"sentence2\\\"])\", \"execution_count\": 12, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727003.8763552, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727003.9265552, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0502s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_24_133237e0\": {\"cell_id\": \"cell_24_133237e0\", \"start_time\": 1750727004.9055362, \"end_time\": 1750727004.918052, \"total_duration\": 0.012515783309936523, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\\n\", \"execution_count\": 24, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9055362, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.918052, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0125s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_13_7f0cfc50\": {\"cell_id\": \"cell_13_7f0cfc50\", \"start_time\": 1750727004.9053686, \"end_time\": 1750727004.9189985, \"total_duration\": 0.013629913330078125, \"cell_content\": \"tokenized_datasets = tokenized_datasets.rename_column(\\\"label\\\", \\\"labels\\\")\", \"execution_count\": 13, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727004.9053686, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727004.9189985, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0136s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_26_8da7b1c3\": {\"cell_id\": \"cell_26_8da7b1c3\", \"start_time\": 1750727005.5815294, \"end_time\": 1750727005.591889, \"total_duration\": 0.010359525680541992, \"cell_content\": \"tokenized_datasets[\\\"train\\\"].features\\n\", \"execution_count\": 26, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5815294, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.5918295, \"event_type\": \"output\", \"content\": \"{'labels': ClassLabel(names=['not_equivalent', 'equivalent'], id=None), 'input_ids': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None), 'attention_mask': Sequence(feature=Value(dtype='int8', id=None), length=-1, id=None)}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.002}, {\"timestamp\": 1750727005.591889, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0104s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_14_0fcbf9e0\": {\"cell_id\": \"cell_14_0fcbf9e0\", \"start_time\": 1750727005.5813625, \"end_time\": 1750727005.592994, \"total_duration\": 0.011631488800048828, \"cell_content\": \"%%rank [0]\\ntokenized_datasets[\\\"train\\\"].features\", \"execution_count\": 14, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727005.5813625, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727005.592994, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0116s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_28_9e4faf11\": {\"cell_id\": \"cell_28_9e4faf11\", \"start_time\": 1750727006.2459443, \"end_time\": 1750727006.257357, \"total_duration\": 0.011412620544433594, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\\n\", \"execution_count\": 28, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.2459443, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.257357, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0114s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_15_5ef0ed3d\": {\"cell_id\": \"cell_15_5ef0ed3d\", \"start_time\": 1750727006.245782, \"end_time\": 1750727006.2586632, \"total_duration\": 0.012881278991699219, \"cell_content\": \"tokenized_datasets.set_format(\\\"torch\\\")\", \"execution_count\": 15, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727006.245782, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727006.2586632, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0129s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_30_590283ae\": {\"cell_id\": \"cell_30_590283ae\", \"start_time\": 1750727007.4910953, \"end_time\": 1750727007.8115747, \"total_duration\": 0.3204793930053711, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\\n\", \"execution_count\": 30, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4910953, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.8115747, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3205s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_16_9ba48c77\": {\"cell_id\": \"cell_16_9ba48c77\", \"start_time\": 1750727007.4909203, \"end_time\": 1750727007.812684, \"total_duration\": 0.3217637538909912, \"cell_content\": \"model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=2)\", \"execution_count\": 16, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727007.4909203, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727007.812684, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.3218s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_32_44529220\": {\"cell_id\": \"cell_32_44529220\", \"start_time\": 1750727008.2894564, \"end_time\": 1750727008.3004305, \"total_duration\": 0.01097416877746582, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\\n\", \"execution_count\": 32, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2894564, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3004305, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_17_adffdfd8\": {\"cell_id\": \"cell_17_adffdfd8\", \"start_time\": 1750727008.2892935, \"end_time\": 1750727008.3013313, \"total_duration\": 0.01203775405883789, \"cell_content\": \"model.config.pad_token_id = tokenizer.pad_token_id\", \"execution_count\": 17, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.2892935, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.3013313, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0120s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_34_33039dd4\": {\"cell_id\": \"cell_34_33039dd4\", \"start_time\": 1750727008.8709722, \"end_time\": 1750727008.8828006, \"total_duration\": 0.011828422546386719, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\\n\", \"execution_count\": 34, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8709722, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8828006, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0118s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_18_467afd9f\": {\"cell_id\": \"cell_18_467afd9f\", \"start_time\": 1750727008.8707366, \"end_time\": 1750727008.8837547, \"total_duration\": 0.013018131256103516, \"cell_content\": \"optimizer = AdamW(params=model.parameters(), lr=2e-5)\", \"execution_count\": 18, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727008.8707366, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727008.8837547, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0130s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_36_d914a14f\": {\"cell_id\": \"cell_36_d914a14f\", \"start_time\": 1750727009.5129857, \"end_time\": 1750727009.5242023, \"total_duration\": 0.01121664047241211, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\\n\", \"execution_count\": 36, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5129857, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5242023, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0112s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_19_2a2f6fe5\": {\"cell_id\": \"cell_19_2a2f6fe5\", \"start_time\": 1750727009.5127785, \"end_time\": 1750727009.5251315, \"total_duration\": 0.012352943420410156, \"cell_content\": \"train_dataloader = DataLoader(\\n tokenized_datasets[\\\"train\\\"], shuffle=True, batch_size=16\\n)\", \"execution_count\": 19, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727009.5127785, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727009.5251315, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0124s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_38_413862d6\": {\"cell_id\": \"cell_38_413862d6\", \"start_time\": 1750727010.1459482, \"end_time\": 1750727010.156989, \"total_duration\": 0.011040925979614258, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\\n\", \"execution_count\": 38, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1459482, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.156989, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0110s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_20_468c5c1c\": {\"cell_id\": \"cell_20_468c5c1c\", \"start_time\": 1750727010.1457818, \"end_time\": 1750727010.1580648, \"total_duration\": 0.012283086776733398, \"cell_content\": \"eval_dataloader = DataLoader(\\n tokenized_datasets[\\\"validation\\\"], shuffle=False, batch_size=32\\n)\", \"execution_count\": 20, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.1457818, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.1580648, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0123s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_40_690541ec\": {\"cell_id\": \"cell_40_690541ec\", \"start_time\": 1750727010.6331468, \"end_time\": 1750727010.6442742, \"total_duration\": 0.011127471923828125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\\n\", \"execution_count\": 40, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6331468, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.6442742, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0111s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_21_fe0d04c9\": {\"cell_id\": \"cell_21_fe0d04c9\", \"start_time\": 1750727010.6329622, \"end_time\": 1750727010.645177, \"total_duration\": 0.01221466064453125, \"cell_content\": \"lr_scheduler = get_linear_schedule_with_warmup(\\n optimizer=optimizer,\\n num_warmup_steps=100,\\n num_training_steps=len(train_dataloader) * 3\\n)\", \"execution_count\": 21, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727010.6329622, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727010.645177, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0122s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_42_88dc4aab\": {\"cell_id\": \"cell_42_88dc4aab\", \"start_time\": 1750727012.2383175, \"end_time\": 1750727013.4304883, \"total_duration\": 1.1921708583831787, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\\n\", \"execution_count\": 42, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2383175, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.41984, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 1, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.419862, \"event_type\": \"output\", \"content\": \"{'labels': torch.Size([16]), 'input_ids': torch.Size([16, 128]), 'attention_mask': torch.Size([16, 128])}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.003}, {\"timestamp\": 1750727013.4304883, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1922s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_22_b549c3f1\": {\"cell_id\": \"cell_22_b549c3f1\", \"start_time\": 1750727012.2381463, \"end_time\": 1750727013.431865, \"total_duration\": 1.193718671798706, \"cell_content\": \"for batch in train_dataloader:\\n print({k:v.shape for k,v in batch.items()})\\n outputs = model(**batch)\\n break\", \"execution_count\": 22, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727012.2381463, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727013.431865, \"event_type\": \"end\", \"content\": \"Cell execution completed in 1.1937s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_44_384d869a\": {\"cell_id\": \"cell_44_384d869a\", \"start_time\": 1750727015.1121767, \"end_time\": 1750727015.2801497, \"total_duration\": 0.16797304153442383, \"cell_content\": \"metric = load_metric(\\\"glue\\\", \\\"mrpc\\\")\\n\", \"execution_count\": 44, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727015.1121767, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727015.2801497, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.1680s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_23_198682cf\": {\"cell_id\": \"cell_23_198682cf\", \"start_time\": 1750727015.112002, \"end_time\": 1750727015.2815669, \"total_duration\": 0.16956496238708496, \"cell_content\": \"metric = load_metric(\\\"glue\\\", \\\"mrpc\\\")\", \"execution_count\": 23, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727015.112002, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727015.2815669, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.1696s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_45_a8f2820d\": {\"cell_id\": \"cell_45_a8f2820d\", \"start_time\": 1750727016.818166, \"end_time\": null, \"total_duration\": null, \"cell_content\": \"predictions = outputs.logits.detach().argmax(dim=-1)\\nmetric.compute(predictions=predictions, references=batch[\\\"labels\\\"])\", \"execution_count\": 45, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727016.818166, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}, \"cell_46_dbc3c468\": {\"cell_id\": \"cell_46_dbc3c468\", \"start_time\": 1750727016.8183422, \"end_time\": 1750727016.8833964, \"total_duration\": 0.06505417823791504, \"cell_content\": \"predictions = outputs.logits.detach().argmax(dim=-1)\\nmetric.compute(predictions=predictions, references=batch[\\\"labels\\\"])\\n\", \"execution_count\": 46, \"line_durations\": [], \"events\": [{\"timestamp\": 1750727016.8183422, \"event_type\": \"start\", \"content\": \"Cell execution started\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}, {\"timestamp\": 1750727016.872938, \"event_type\": \"output\", \"content\": \"{'accuracy': 0.25, 'f1': 0.0}\", \"rank\": 0, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750727016.8729494, \"event_type\": \"output\", \"content\": \"{'accuracy': 0.25, 'f1': 0.0}\", \"rank\": 1, \"line_number\": 1, \"sub_duration\": 0.001}, {\"timestamp\": 1750727016.8833964, \"event_type\": \"end\", \"content\": \"Cell execution completed in 0.0651s\", \"rank\": null, \"line_number\": null, \"sub_duration\": null}]}};\n Object.assign(Jupyter.notebook.metadata.execution_timelines, newTimelines);\n \n // Mark notebook as dirty so it gets saved\n Jupyter.notebook.set_dirty(true);\n \n // Log success (can be seen in browser console)\n console.log('Timeline metadata updated:', Object.keys(newTimelines));\n } else {\n console.log('Jupyter notebook not available for metadata update');\n }\n \n \n // Remove the script element to avoid showing output\n element.remove();\n ",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment