Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Multi_Task_Adapters.ipynb by replacing canary2 with canary_custom #11636

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tutorials/asr/asr_adapters/Multi_Task_Adapters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
"outputs": [],
"source": [
"@registered_prompt_format_fn\n",
"def canary2(cuts, tokenizer, inference: bool):\n",
"def canary_custom(cuts, tokenizer, inference: bool):\n",
" \"\"\" Users can implement this as needed \"\"\"\n",
" raise NotImplementedError()\n",
"\n",
Expand All @@ -449,7 +449,7 @@
},
"outputs": [],
"source": [
"temp = get_prompt_format_fn('canary2')\n",
"temp = get_prompt_format_fn('canary_custom')\n",
"temp.__name__"
]
},
Expand Down Expand Up @@ -549,7 +549,7 @@
"class CanaryPromptFormatterV2(model.prompt.__class__):\n",
"\n",
" # make sure to provide a new name\n",
" NAME: str = \"canary2\"\n",
" NAME: str = \"canary_custom\"\n",
"\n",
" # Make any changes as necessary.\n",
" # For this demonstration, we will not change anything other than the name"
Expand All @@ -565,7 +565,7 @@
"outputs": [],
"source": [
"# Next, lets update the model's prompt formatter\n",
"model.change_prompt(\"canary2\")"
"model.change_prompt(\"canary_custom\")"
]
},
{
Expand All @@ -577,9 +577,9 @@
"source": [
"---\n",
"\n",
"We have now successfully changed the prompt format to `canary2`.\n",
"We have now successfully changed the prompt format to `canary_custom`.\n",
"\n",
"**Note**: It is important to know that when changing the prompt format, the name of the new prompt format class (`canary2` in this case) **has to match** the name of the prompt function registered with `@registered_prompt_format_fn`!"
"**Note**: It is important to know that when changing the prompt format, the name of the new prompt format class (`canary_custom` in this case) **has to match** the name of the prompt function registered with `@registered_prompt_format_fn`!"
]
},
{
Expand Down
Loading