Skip to content

Commit 1612263

Browse files
committed
Merge branch 'main' of into main-public
2 parents 120e394 + 77607b6 commit 1612263

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

notebooks/question_answering/tfhub_question_answering/BERT_Question_Answering.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"# Path where the https://github.com/tensorflow/models repo will be cloned\n",
107107
"tf_models_dir = os.path.join(output_directory, \"tensorflow-models\")\n",
108108
"os.environ[\"TF_MODELS_DIR\"] = tf_models_dir\n",
109-
"tf_models_branch = \"v2.7.0\"\n",
109+
"tf_models_branch = \"v2.11.0\"\n",
110110
"\n",
111111
"# Clone the TensorFlow models repo\n",
112112
"if not os.path.exists(tf_models_dir):\n",
@@ -296,7 +296,7 @@
296296
" os.makedirs(checkpoint_dir)\n",
297297
"\n",
298298
"os.environ[\"TFHUB_CACHE_DIR\"] = os.path.join(output_directory, \"tfhub_modules\")\n",
299-
"!python $tf_models_dir/official/nlp/bert/run_squad.py \\\n",
299+
"!python $tf_models_dir/official/legacy/bert/run_squad.py \\\n",
300300
" --mode=train_and_eval \\\n",
301301
" --input_meta_data_path=$squad_metadata_path \\\n",
302302
" --train_data_path=$train_mini_tfrecords_path \\\n",
@@ -337,9 +337,9 @@
337337
"outputs": [],
338338
"source": [
339339
"import tensorflow as tf\n",
340-
"from official.nlp.bert import bert_models\n",
341-
"from official.nlp.bert import configs as bert_configs\n",
342-
"from official.nlp.bert import model_saving_utils\n",
340+
"from official.legacy.bert import bert_models\n",
341+
"from official.legacy.bert import configs as bert_configs\n",
342+
"from official.legacy.bert import model_saving_utils\n",
343343
"\n",
344344
"tf.keras.mixed_precision.set_global_policy('float32')\n",
345345
"bert_config_obj = bert_configs.BertConfig.from_json_file(bert_config)\n",

notebooks/question_answering/tfhub_question_answering/bert_qa_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
sys.path.append(os.environ["TF_MODELS_DIR"])
2727

2828
from official.common import distribute_utils
29-
from official.nlp.bert.run_squad_helper import get_dataset_fn
29+
from official.legacy.bert.run_squad_helper import get_dataset_fn
3030
from tlt.utils.file_utils import download_file
3131
from zipfile import ZipFile
3232

0 commit comments

Comments
 (0)