"test/vscode:/vscode.git/clone" did not exist on "53d04acec98331d75fb17ce7cc3210dd157f1e27"
Commit 6f22f08d authored by Chen Chen's avatar Chen Chen Committed by A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 344836089
parent 8c248a5a
...@@ -101,7 +101,7 @@ class BestCheckpointExporter: ...@@ -101,7 +101,7 @@ class BestCheckpointExporter:
eval_logs_ext = copy.copy(eval_logs) eval_logs_ext = copy.copy(eval_logs)
eval_logs_ext['best_ckpt_global_step'] = global_step eval_logs_ext['best_ckpt_global_step'] = global_step
for name, value in eval_logs_ext.items(): for name, value in eval_logs_ext.items():
eval_logs_ext[name] = str(orbit.utils.get_value(value)) eval_logs_ext[name] = float(orbit.utils.get_value(value))
# Saving json file is very fast. # Saving json file is very fast.
with tf.io.gfile.GFile(self.best_ckpt_logs_path, 'w') as writer: with tf.io.gfile.GFile(self.best_ckpt_logs_path, 'w') as writer:
writer.write(json.dumps(eval_logs_ext, indent=4) + '\n') writer.write(json.dumps(eval_logs_ext, indent=4) + '\n')
......
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