mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
Uv workflow improvements (#531)
* Uv workflow improvements * Uv workflow improvements * linter improvements * pytproject.toml fixes * pytproject.toml fixes * pytproject.toml fixes * pytproject.toml fixes * pytproject.toml fixes * pytproject.toml fixes * windows fixes * windows fixes * windows fixes * windows fixes * windows fixes * windows fixes * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix * win32 fix
This commit is contained in:
committed by
GitHub
parent
29353c74d8
commit
a08d7aaa84
@@ -79,28 +79,6 @@
|
||||
"<img src=\"https://sebastianraschka.com/images/LLMs-from-scratch-images/ch06_compressed/chapter-overview.webp\" width=500px>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "946c3e56-b04b-4b0f-b35f-b485ce5b28df",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Utility to prevent certain cells from being executed twice\n",
|
||||
"\n",
|
||||
"from IPython.core.magic import register_line_cell_magic\n",
|
||||
"\n",
|
||||
"executed_cells = set()\n",
|
||||
"\n",
|
||||
"@register_line_cell_magic\n",
|
||||
"def run_once(line, cell):\n",
|
||||
" if line not in executed_cells:\n",
|
||||
" get_ipython().run_cell(cell)\n",
|
||||
" executed_cells.add(line)\n",
|
||||
" else:\n",
|
||||
" print(f\"Cell '{line}' has already been executed.\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3a84cf35-b37f-4c15-8972-dfafc9fadc1c",
|
||||
@@ -450,9 +428,6 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"%%run_once balance_df\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def create_balanced_dataset(df):\n",
|
||||
" \n",
|
||||
" # Count the instances of \"spam\"\n",
|
||||
@@ -490,7 +465,6 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%%run_once label_mapping\n",
|
||||
"balanced_df[\"Label\"] = balanced_df[\"Label\"].map({\"ham\": 0, \"spam\": 1}) "
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user