⚡ skip install step if unsloth already loaded
Browse files
notebooks/qwen35-2b-bash-finetune.ipynb
CHANGED
|
@@ -28,11 +28,7 @@
|
|
| 28 |
"execution_count": null,
|
| 29 |
"metadata": {},
|
| 30 |
"outputs": [],
|
| 31 |
-
"source": [
|
| 32 |
-
"%%capture\n",
|
| 33 |
-
"!pip install --upgrade --force-reinstall --no-cache-dir unsloth unsloth_zoo\n",
|
| 34 |
-
"!pip install huggingface_hub datasets"
|
| 35 |
-
]
|
| 36 |
},
|
| 37 |
{
|
| 38 |
"cell_type": "markdown",
|
|
@@ -399,4 +395,4 @@
|
|
| 399 |
},
|
| 400 |
"nbformat": 4,
|
| 401 |
"nbformat_minor": 0
|
| 402 |
-
}
|
|
|
|
| 28 |
"execution_count": null,
|
| 29 |
"metadata": {},
|
| 30 |
"outputs": [],
|
| 31 |
+
"source": "try:\n import unsloth\n print(\"✓ Already installed, skipping\")\nexcept ImportError:\n import subprocess\n subprocess.run([\"pip\", \"install\", \"unsloth\", \"unsloth_zoo\", \"huggingface_hub\", \"datasets\"], capture_output=True)\n print(\"✓ Installed\")"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
},
|
| 33 |
{
|
| 34 |
"cell_type": "markdown",
|
|
|
|
| 395 |
},
|
| 396 |
"nbformat": 4,
|
| 397 |
"nbformat_minor": 0
|
| 398 |
+
}
|