Skip to content

Commit

Permalink
refactor: Uniform BRANCH for notebooks
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Koenig <okoenig@nvidia.com>
  • Loading branch information
ko3n1g committed Jul 12, 2024
1 parent 3e2bb21 commit 21107ef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tutorials/asr/Confidence_Ensembles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"\n",
"# option #2: download NeMo repo\n",
"if 'google.colab' in str(get_ipython()) or not os.path.exists(os.path.join(NEMO_DIR, \"nemo\")):\n",
" BRANCH = \"main\"\n",
" BRANCH = 'main'\n",
" !git clone -b $BRANCH https://github.com/NVIDIA/NeMo $WORKSPACE_DIR/NeMo\n",
" NEMO_DIR = os.path.join(WORKSPACE_DIR, 'NeMo')\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"5. Restart the runtime (Runtime -> Restart Runtime) for any upgraded packages to take effect\n",
"\"\"\"\n",
"\n",
"GIT_USER, GIT_BRANCH = 'NVIDIA', 'main'\n",
"GIT_USER = 'NVIDIA'\n",
"BRANCH = 'main'\n",
"\n",
"if 'google.colab' in str(get_ipython()):\n",
"\n",
Expand All @@ -56,7 +57,7 @@
" !pip install matplotlib>=3.3.2\n",
"\n",
" ## Install NeMo\n",
" !python -m pip install git+https://github.com/{GIT_USER}/NeMo.git@{GIT_BRANCH}#egg=nemo_toolkit[all]\n",
" !python -m pip install git+https://github.com/{GIT_USER}/NeMo.git@{BRANCH}#egg=nemo_toolkit[all]\n",
"\n",
" ## Install TorchAudio\n",
" !pip install torchaudio>=0.13.0 -f https://download.pytorch.org/whl/torch_stable.html"
Expand Down Expand Up @@ -210,7 +211,7 @@
"# Copy script\n",
"get_librispeech_script = os.path.join(scripts_dir, 'get_librispeech_data.py')\n",
"if not os.path.exists(get_librispeech_script):\n",
" !wget -P $scripts_dir https://raw.githubusercontent.com/{GIT_USER}/NeMo/{GIT_BRANCH}/scripts/dataset_processing/get_librispeech_data.py\n",
" !wget -P $scripts_dir https://raw.githubusercontent.com/{GIT_USER}/NeMo/{BRANCH}/scripts/dataset_processing/get_librispeech_data.py\n",
"\n",
"# Download the data\n",
"if not speech_dir.is_dir():\n",
Expand Down Expand Up @@ -260,7 +261,7 @@
"# Copy script\n",
"get_demand_script = os.path.join(scripts_dir, 'get_demand_data.py')\n",
"if not os.path.exists(get_demand_script):\n",
" !wget -P $scripts_dir https://raw.githubusercontent.com/{GIT_USER}/NeMo/{GIT_BRANCH}/scripts/dataset_processing/get_demand_data.py\n",
" !wget -P $scripts_dir https://raw.githubusercontent.com/{GIT_USER}/NeMo/{BRANCH}/scripts/dataset_processing/get_demand_data.py\n",
"\n",
"if not noise_dir.is_dir():\n",
" noise_dir.mkdir(exist_ok=True)\n",
Expand Down Expand Up @@ -323,7 +324,7 @@
"# Copy script\n",
"add_noise_script = os.path.join(scripts_dir, 'add_noise.py')\n",
"if not os.path.exists(add_noise_script):\n",
" !wget -P $scripts_dir https://raw.githubusercontent.com/{GIT_USER}/NeMo/{GIT_BRANCH}/scripts/dataset_processing/add_noise.py\n",
" !wget -P $scripts_dir https://raw.githubusercontent.com/{GIT_USER}/NeMo/{BRANCH}/scripts/dataset_processing/add_noise.py\n",
"\n",
"# Generate noisy datasets and save the noise component as well.\n",
"noisy_dir = data_dir / 'noisy'\n",
Expand Down Expand Up @@ -494,7 +495,7 @@
"config_path = config_dir / 'masking.yaml'\n",
"\n",
"if not config_path.is_file():\n",
" !wget https://raw.githubusercontent.com/{GIT_USER}/NeMo/{GIT_BRANCH}/examples/audio/conf/masking.yaml -P {config_dir.as_posix()}\n",
" !wget https://raw.githubusercontent.com/{GIT_USER}/NeMo/{BRANCH}/examples/audio/conf/masking.yaml -P {config_dir.as_posix()}\n",
"\n",
"config = OmegaConf.load(config_path)\n",
"config = OmegaConf.to_container(config, resolve=True)\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/nlp/Token_Classification-BioMegatron.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"metadata": {},
"outputs": [],
"source": [
"BRANCH='main'"
"BRANCH = 'main'"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorials/nlp/lora.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"outputs": [],
"source": [
"%cd /NeMo/tutorials/nlp\n",
"BRANCH='main'\n",
"BRANCH = 'main'\n",
"import os\n",
"import wget\n",
"import sys\n",
Expand Down

0 comments on commit 21107ef

Please sign in to comment.