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

fix bugs for dialogue tutorial #4211

Merged
merged 1 commit into from
May 19, 2022
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
52 changes: 26 additions & 26 deletions tutorials/nlp/Dialogue.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"source": [
"import os \n",
"!apt-get update && apt-get install -y libsndfile1 ffmpeg\n",
"!git clone https://github.com/NVIDIA/NeMo --branch main\n",
"!git clone https://github.com/NVIDIA/NeMo --branch r1.9.0\n",
"os.chdir('NeMo')\n",
"!./reinstall.sh\n",
"os.chdir('..')\n"
Expand Down Expand Up @@ -87,7 +87,7 @@
"\n",
"An example is:\n",
"\n",
"* utterance: what alarms have i set for tomorrow intent: \n",
"* utterance: what alarms have i set for tomorrow \n",
"* intent: alarm_query\n",
"* slots: date(tomorrow)\n",
"\n",
Expand Down Expand Up @@ -287,15 +287,20 @@
},
{
"cell_type": "markdown",
"source": [
"## 1.4 (Optional) To train/ test a GPT2 model on the assistant dataset, run the cell below "
],
"metadata": {
"id": "-44x5PqyrOeQ"
}
},
"source": [
"## 1.4 (Optional) To train/ test a GPT2 model on the assistant dataset, run the cell below "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "QyqQbpR4rNHT"
},
"outputs": [],
"source": [
"# model.dataset.data_dir: folder to load data from\n",
"# model.dataset.dialogues_example_dir: folder that stores predictions for each sample\n",
Expand All @@ -312,15 +317,13 @@
" model.dataset.target_template=with_slots \\\n",
" model.dataset.eval_mode=generation \\\n",
" exp_manager.create_wandb_logger=False)"
],
"metadata": {
"id": "QyqQbpR4rNHT"
},
"execution_count": null,
"outputs": []
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "FbQ-6TVM1yQg"
},
"source": [
"**After 1 epoch:**\n",
"\n",
Expand Down Expand Up @@ -417,10 +420,7 @@
" test_loss_epoch 0.019178826361894608\n",
"────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
"```"
],
"metadata": {
"id": "FbQ-6TVM1yQg"
}
]
},
{
"cell_type": "markdown",
Expand All @@ -437,7 +437,7 @@
"\n",
"An example is:\n",
"\n",
"* utterance: I will be eating there at 11:30 am so make it for then.\n",
"* utterance: I will be eating there at 11:30 am so make the reservation for then.\n",
"* intent: ReserveRestaurant\n",
"* slots: {\"time\": \"11:30 am\"}\n",
"\n",
Expand Down Expand Up @@ -498,14 +498,14 @@
},
{
"cell_type": "code",
"source": [
"!ls sgd_gpt2_predictions"
],
"execution_count": null,
"metadata": {
"id": "kGDlV5HvI2PQ"
},
"execution_count": null,
"outputs": []
"outputs": [],
"source": [
"!ls sgd_gpt2_predictions"
]
},
{
"cell_type": "markdown",
Expand All @@ -515,7 +515,7 @@
"source": [
"**After 1 epoch:**\n",
"\n",
"More epoches would needed to reach convergence.\n",
"More epochs would needed to reach convergence.\n",
"\n",
"\n",
"```\n",
Expand Down Expand Up @@ -590,7 +590,7 @@
"An example is \n",
"\n",
"\n",
"* question: what county is nine mile in\n",
"* question: What county is Nine Mile in?\n",
"* extracted_answer: Onondaga\n",
"* fluent_answer: Nine Mile is in Onondaga county.\n"
]
Expand Down Expand Up @@ -667,7 +667,7 @@
"source": [
"**After 1 epoch:**\n",
"\n",
"Train more epoches for optimal performance\n",
"Train more epochs for optimal performance\n",
"\n",
"```\n",
"────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
Expand Down Expand Up @@ -713,4 +713,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}