Skip to content

Commit

Permalink
Fix transducer and question answering tutorial bugs bugs (NVIDIA#5809) (
Browse files Browse the repository at this point in the history
NVIDIA#5810)

Co-authored-by: Zhilin Wang <wangzhilin12061996@hotmail.com>
Co-authored-by: Eric Harper <complex451@gmail.com>
Signed-off-by: Jason <jasoli@nvidia.com>
  • Loading branch information
3 people authored and blisc committed Feb 10, 2023
1 parent 93e3f3b commit 58ee179
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tutorials/asr/Intro_to_Transducers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"\n",
"# For pip based environments,\n",
"# Update Numba to > 0.54\n",
"!pip install --upgrade numba==0.54.1"
"!pip install --upgrade numba>=0.54.1"
],
"execution_count": null,
"outputs": []
Expand Down Expand Up @@ -773,4 +773,4 @@
]
}
]
}
}
13 changes: 9 additions & 4 deletions tutorials/nlp/Question_Answering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"source": [
"import os\n",
"import wget\n",
"import gc\n",
"\n",
"import pytorch_lightning as pl\n",
"from omegaconf import OmegaConf\n",
Expand All @@ -116,7 +117,8 @@
"from nemo.collections.nlp.models.question_answering.qa_s2s_model import S2SQAModel\n",
"from nemo.utils.exp_manager import exp_manager\n",
"\n",
"pl.seed_everything(42)"
"pl.seed_everything(42)\n",
"gc.disable()"
]
},
{
Expand All @@ -128,8 +130,8 @@
"outputs": [],
"source": [
"# set the following paths\n",
"DATA_DIR = \"<PATH_TO_DATA_DIR>\" # directory for storing datasets\n",
"WORK_DIR = \"<PATH_TO_WORK_DIR>\" # directory for storing trained models, logs, additionally downloaded scripts\n",
"DATA_DIR = \"data_dir\" # directory for storing datasets\n",
"WORK_DIR = \"work_dir\" # directory for storing trained models, logs, additionally downloaded scripts\n",
"\n",
"os.makedirs(DATA_DIR, exist_ok=True)\n",
"os.makedirs(WORK_DIR, exist_ok=True)"
Expand Down Expand Up @@ -542,7 +544,10 @@
"\n",
"config.exp_manager.create_checkpoint_callback = True\n",
"\n",
"config.model.optim.lr = 5e-5"
"config.model.optim.lr = 5e-5\n",
"\n",
"#remove vocab_file from gpt model\n",
"config.model.tokenizer.vocab_file = None"
]
},
{
Expand Down

0 comments on commit 58ee179

Please sign in to comment.