Clean up
Browse files- Final_Training.ipynb +10 -9
Final_Training.ipynb
CHANGED
|
@@ -2001,7 +2001,7 @@
|
|
| 2001 |
},
|
| 2002 |
{
|
| 2003 |
"cell_type": "code",
|
| 2004 |
-
"execution_count":
|
| 2005 |
"id": "466d51ad",
|
| 2006 |
"metadata": {},
|
| 2007 |
"outputs": [],
|
|
@@ -2058,7 +2058,7 @@
|
|
| 2058 |
" commit_message=commit_msg,\n",
|
| 2059 |
" commit_description=commit_desc\n",
|
| 2060 |
" )\n",
|
| 2061 |
-
" elif os.path.isdir(
|
| 2062 |
" # Upload an entire folder (e.g., weights + config + scripts)\n",
|
| 2063 |
" self.api.upload_folder(\n",
|
| 2064 |
" folder_path=local_path,\n",
|
|
@@ -2089,7 +2089,7 @@
|
|
| 2089 |
},
|
| 2090 |
{
|
| 2091 |
"cell_type": "code",
|
| 2092 |
-
"execution_count":
|
| 2093 |
"id": "d38b8e1b",
|
| 2094 |
"metadata": {},
|
| 2095 |
"outputs": [],
|
|
@@ -2109,19 +2109,20 @@
|
|
| 2109 |
},
|
| 2110 |
{
|
| 2111 |
"cell_type": "code",
|
| 2112 |
-
"execution_count":
|
| 2113 |
"id": "fc3da1cb",
|
| 2114 |
"metadata": {},
|
| 2115 |
"outputs": [
|
| 2116 |
{
|
| 2117 |
-
"ename": "
|
| 2118 |
-
"evalue": "
|
| 2119 |
"output_type": "error",
|
| 2120 |
"traceback": [
|
| 2121 |
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
|
| 2122 |
-
"\u001b[
|
| 2123 |
-
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[
|
| 2124 |
-
"\u001b[
|
|
|
|
| 2125 |
]
|
| 2126 |
}
|
| 2127 |
],
|
|
|
|
| 2001 |
},
|
| 2002 |
{
|
| 2003 |
"cell_type": "code",
|
| 2004 |
+
"execution_count": 49,
|
| 2005 |
"id": "466d51ad",
|
| 2006 |
"metadata": {},
|
| 2007 |
"outputs": [],
|
|
|
|
| 2058 |
" commit_message=commit_msg,\n",
|
| 2059 |
" commit_description=commit_desc\n",
|
| 2060 |
" )\n",
|
| 2061 |
+
" elif os.path.isdir(local_path):\n",
|
| 2062 |
" # Upload an entire folder (e.g., weights + config + scripts)\n",
|
| 2063 |
" self.api.upload_folder(\n",
|
| 2064 |
" folder_path=local_path,\n",
|
|
|
|
| 2089 |
},
|
| 2090 |
{
|
| 2091 |
"cell_type": "code",
|
| 2092 |
+
"execution_count": 50,
|
| 2093 |
"id": "d38b8e1b",
|
| 2094 |
"metadata": {},
|
| 2095 |
"outputs": [],
|
|
|
|
| 2109 |
},
|
| 2110 |
{
|
| 2111 |
"cell_type": "code",
|
| 2112 |
+
"execution_count": 48,
|
| 2113 |
"id": "fc3da1cb",
|
| 2114 |
"metadata": {},
|
| 2115 |
"outputs": [
|
| 2116 |
{
|
| 2117 |
+
"ename": "TypeError",
|
| 2118 |
+
"evalue": "_path_isdir() takes at most 1 argument (2 given)",
|
| 2119 |
"output_type": "error",
|
| 2120 |
"traceback": [
|
| 2121 |
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
|
| 2122 |
+
"\u001b[31mTypeError\u001b[39m Traceback (most recent call last)",
|
| 2123 |
+
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[48]\u001b[39m\u001b[32m, line 5\u001b[39m\n\u001b[32m 3\u001b[39m \u001b[38;5;66;03m# Training File and Model Weights\u001b[39;00m\n\u001b[32m 4\u001b[39m HF.upload_to_hub(\u001b[33m\"\u001b[39m\u001b[33mFinal_Training.ipynb\u001b[39m\u001b[33m\"\u001b[39m, commit_msg=\u001b[33m\"\u001b[39m\u001b[33mClean up\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m----> \u001b[39m\u001b[32m5\u001b[39m \u001b[43mHF\u001b[49m\u001b[43m.\u001b[49m\u001b[43mupload_to_hub\u001b[49m\u001b[43m(\u001b[49m\u001b[43mWEIGHTS_DIR\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mcommit_msg\u001b[49m\u001b[43m=\u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mModel weights\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 6\u001b[39m \u001b[38;5;66;03m# upload_to_hub(\"best_model_weights_PushupCounterSingleOutput_v01.pth\", commit_msg=\"PushupCounterSingleOutput model weights\")\u001b[39;00m\n\u001b[32m 7\u001b[39m \u001b[38;5;66;03m# upload_to_hub(\"best_model_weights_PushupCounterSingleOutput.pth\", commit_msg=\"PushupCounterSingleOutput model weights\")\u001b[39;00m\n\u001b[32m 8\u001b[39m \u001b[38;5;66;03m# upload_to_hub(\"best_model_weights_PushupCounterMaxPool.pth\", commit_msg=\"PushupCounterMaxPool model weights\")\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 13\u001b[39m \u001b[38;5;66;03m# delete_file(\"bytetrack.yaml\", is_folder=False, commit_msg=\"Real Estate Organization\")\u001b[39;00m\n\u001b[32m 14\u001b[39m \u001b[38;5;66;03m# delete_file(\"yolo11n-pose.pt\", is_folder=False, commit_msg=\"Real Estate Organization\")\u001b[39;00m\n",
|
| 2124 |
+
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[41]\u001b[39m\u001b[32m, line 53\u001b[39m, in \u001b[36mHugMyFace.upload_to_hub\u001b[39m\u001b[34m(self, local_path, commit_msg, commit_desc)\u001b[39m\n\u001b[32m 44\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m os.path.isfile(local_path):\n\u001b[32m 45\u001b[39m \u001b[38;5;28mself\u001b[39m.api.upload_file(\n\u001b[32m 46\u001b[39m path_or_fileobj=local_path,\n\u001b[32m 47\u001b[39m path_in_repo=local_path,\n\u001b[32m (...)\u001b[39m\u001b[32m 51\u001b[39m commit_description=commit_desc\n\u001b[32m 52\u001b[39m )\n\u001b[32m---> \u001b[39m\u001b[32m53\u001b[39m \u001b[38;5;28;01melif\u001b[39;00m \u001b[43mos\u001b[49m\u001b[43m.\u001b[49m\u001b[43mpath\u001b[49m\u001b[43m.\u001b[49m\u001b[43misdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mlocal_path\u001b[49m\u001b[43m)\u001b[49m:\n\u001b[32m 54\u001b[39m \u001b[38;5;66;03m# Upload an entire folder (e.g., weights + config + scripts)\u001b[39;00m\n\u001b[32m 55\u001b[39m \u001b[38;5;28mself\u001b[39m.api.upload_folder(\n\u001b[32m 56\u001b[39m folder_path=local_path,\n\u001b[32m 57\u001b[39m path_in_repo=local_path,\n\u001b[32m (...)\u001b[39m\u001b[32m 61\u001b[39m commit_description=commit_desc\n\u001b[32m 62\u001b[39m )\n\u001b[32m 63\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n",
|
| 2125 |
+
"\u001b[31mTypeError\u001b[39m: _path_isdir() takes at most 1 argument (2 given)"
|
| 2126 |
]
|
| 2127 |
}
|
| 2128 |
],
|