提交 9c50e961 编写于 作者: C Chen Chen 提交者: A. Unique TensorFlower

Completely remove "use_keras_bert_for_squad" FLAG.

PiperOrigin-RevId: 282384787
上级 5b2575c2
......@@ -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,
......
......@@ -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'))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册