diff --git a/official/benchmark/bert_squad_benchmark.py b/official/benchmark/bert_squad_benchmark.py index 85e3f5e8c818e42980f35d46aeff8c3e4e868921..3255a5aa71b31f2fedb07491175ad2f5d139b023 100644 --- a/official/benchmark/bert_squad_benchmark.py +++ b/official/benchmark/bert_squad_benchmark.py @@ -340,7 +340,6 @@ class BertSquadAccuracy(BertSquadBenchmarkBase): FLAGS.init_checkpoint = PRETRAINED_CHECKPOINT_PATH FLAGS.num_train_epochs = 2 FLAGS.steps_per_loop = 1 - FLAGS.use_keras_bert_for_squad = True def _run_and_report_benchmark(self, use_ds=True, diff --git a/official/nlp/bert/run_squad.py b/official/nlp/bert/run_squad.py index db66a71a2b99b1f32f50012306e3b10e997b8cef..82ed922238b6029bb6f14276b6d0d4dd88705320 100644 --- a/official/nlp/bert/run_squad.py +++ b/official/nlp/bert/run_squad.py @@ -80,8 +80,6 @@ flags.DEFINE_integer( 'max_answer_length', 30, 'The maximum length of an answer that can be generated. This is needed ' 'because the start and end predictions are not conditioned on one another.') -flags.DEFINE_bool( - 'use_keras_bert_for_squad', True, 'Deprecated and will be removed soon.') common_flags.define_common_bert_flags() @@ -374,10 +372,6 @@ def main(_): # Users should always run this script under TF 2.x assert tf.version.VERSION.startswith('2.') - if not FLAGS.use_keras_bert_for_squad: - raise ValueError( - 'Old tf2 BERT is no longer supported. Please use keras BERT.') - with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader: input_meta_data = json.loads(reader.read().decode('utf-8'))