Commit
•
69a163d
1
Parent(s):
7e5a849
add nbs for training
Browse files- Whisper_modelling.ipynb +25 -2
Whisper_modelling.ipynb
CHANGED
@@ -484,10 +484,33 @@
|
|
484 |
},
|
485 |
{
|
486 |
"cell_type": "code",
|
487 |
-
"execution_count":
|
488 |
"id": "5bb6a481-af4a-4aa4-9238-b439c4929b8f",
|
489 |
"metadata": {},
|
490 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
"source": [
|
492 |
"kwargs = {\n",
|
493 |
" \"dataset_tags\": \"mozilla-foundation/common_voice_11_0\",\n",
|
|
|
484 |
},
|
485 |
{
|
486 |
"cell_type": "code",
|
487 |
+
"execution_count": 29,
|
488 |
"id": "5bb6a481-af4a-4aa4-9238-b439c4929b8f",
|
489 |
"metadata": {},
|
490 |
+
"outputs": [
|
491 |
+
{
|
492 |
+
"name": "stderr",
|
493 |
+
"output_type": "stream",
|
494 |
+
"text": [
|
495 |
+
"Saving model checkpoint to ./\n",
|
496 |
+
"Configuration saved in ./config.json\n",
|
497 |
+
"Model weights saved in ./pytorch_model.bin\n",
|
498 |
+
"Feature extractor saved in ./preprocessor_config.json\n"
|
499 |
+
]
|
500 |
+
},
|
501 |
+
{
|
502 |
+
"ename": "TypeError",
|
503 |
+
"evalue": "create_model_card() got multiple values for keyword argument 'model_name'",
|
504 |
+
"output_type": "error",
|
505 |
+
"traceback": [
|
506 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
507 |
+
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
|
508 |
+
"Input \u001b[0;32mIn [29]\u001b[0m, in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m kwargs \u001b[38;5;241m=\u001b[39m {\n\u001b[1;32m 2\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdataset_tags\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmozilla-foundation/common_voice_11_0\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 3\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdataset\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCommon Voice 11.0\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;66;03m# a 'pretty' name for the training dataset\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtags\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mwhisper-event\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 9\u001b[0m }\n\u001b[0;32m---> 10\u001b[0m \u001b[43mtrainer\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mpush_to_hub\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n",
|
509 |
+
"File \u001b[0;32m/opt/conda/lib/python3.8/site-packages/transformers/trainer.py:3457\u001b[0m, in \u001b[0;36mTrainer.push_to_hub\u001b[0;34m(self, commit_message, blocking, **kwargs)\u001b[0m\n\u001b[1;32m 3455\u001b[0m \u001b[38;5;66;03m# push separately the model card to be independant from the rest of the model\u001b[39;00m\n\u001b[1;32m 3456\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39margs\u001b[38;5;241m.\u001b[39mshould_save:\n\u001b[0;32m-> 3457\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcreate_model_card(model_name\u001b[38;5;241m=\u001b[39mmodel_name, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[1;32m 3458\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 3459\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mrepo\u001b[38;5;241m.\u001b[39mpush_to_hub(\n\u001b[1;32m 3460\u001b[0m commit_message\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mupdate model card README.md\u001b[39m\u001b[38;5;124m\"\u001b[39m, blocking\u001b[38;5;241m=\u001b[39mblocking, auto_lfs_prune\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[1;32m 3461\u001b[0m )\n",
|
510 |
+
"\u001b[0;31mTypeError\u001b[0m: create_model_card() got multiple values for keyword argument 'model_name'"
|
511 |
+
]
|
512 |
+
}
|
513 |
+
],
|
514 |
"source": [
|
515 |
"kwargs = {\n",
|
516 |
" \"dataset_tags\": \"mozilla-foundation/common_voice_11_0\",\n",
|