Commit 457064e1 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 312096778
parent ef61bae9
...@@ -32,8 +32,6 @@ FLAGS = flags.FLAGS ...@@ -32,8 +32,6 @@ FLAGS = flags.FLAGS
def main(_): def main(_):
# Users should always run this script under TF 2.x
with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader: with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader:
input_meta_data = json.loads(reader.read().decode('utf-8')) input_meta_data = json.loads(reader.read().decode('utf-8'))
......
...@@ -94,8 +94,6 @@ def export_squad(model_export_path, input_meta_data): ...@@ -94,8 +94,6 @@ def export_squad(model_export_path, input_meta_data):
def main(_): def main(_):
# Users should always run this script under TF 2.x
with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader: with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader:
input_meta_data = json.loads(reader.read().decode('utf-8')) input_meta_data = json.loads(reader.read().decode('utf-8'))
......
...@@ -434,7 +434,6 @@ def custom_main(custom_callbacks=None): ...@@ -434,7 +434,6 @@ def custom_main(custom_callbacks=None):
def main(_): def main(_):
# Users should always run this script under TF 2.x
custom_main(custom_callbacks=None) custom_main(custom_callbacks=None)
......
...@@ -180,7 +180,6 @@ def run_bert_pretrain(strategy, custom_callbacks=None): ...@@ -180,7 +180,6 @@ def run_bert_pretrain(strategy, custom_callbacks=None):
def main(_): def main(_):
# Users should always run this script under TF 2.x
gin.parse_config_files_and_bindings(FLAGS.gin_file, FLAGS.gin_param) gin.parse_config_files_and_bindings(FLAGS.gin_file, FLAGS.gin_param)
if not FLAGS.model_dir: if not FLAGS.model_dir:
FLAGS.model_dir = '/tmp/bert20/' FLAGS.model_dir = '/tmp/bert20/'
......
...@@ -91,7 +91,6 @@ def export_squad(model_export_path, input_meta_data): ...@@ -91,7 +91,6 @@ def export_squad(model_export_path, input_meta_data):
def main(_): def main(_):
# Users should always run this script under TF 2.x
gin.parse_config_files_and_bindings(FLAGS.gin_file, FLAGS.gin_param) gin.parse_config_files_and_bindings(FLAGS.gin_file, FLAGS.gin_param)
with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader: with tf.io.gfile.GFile(FLAGS.input_meta_data_path, 'rb') as reader:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment