From 50f38d59701854e8125163e6c2e44305e02b3a05 Mon Sep 17 00:00:00 2001 From: Lukasz Kaiser Date: Sun, 11 Feb 2018 20:12:41 -0800 Subject: [PATCH] Bump back json printing to support TF 1.4 and make a small release. PiperOrigin-RevId: 185328910 --- setup.py | 2 +- tensor2tensor/bin/t2t_trainer.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 94f58130c..b17656b5b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='tensor2tensor', - version='1.5.0', + version='1.5.1', description='Tensor2Tensor', author='Google Inc.', author_email='no-reply@google.com', diff --git a/tensor2tensor/bin/t2t_trainer.py b/tensor2tensor/bin/t2t_trainer.py index b2545a159..af7cb5077 100644 --- a/tensor2tensor/bin/t2t_trainer.py +++ b/tensor2tensor/bin/t2t_trainer.py @@ -274,7 +274,9 @@ def save_metadata(hparams): # Save hparams as hparams.json hparams_fname = os.path.join(output_dir, "hparams.json") with tf.gfile.Open(hparams_fname, "w") as f: - f.write(hparams.to_json(indent=0, sort_keys=True)) + # TODO(lukaszkaiser): use the first line once we require TF 1.5+. + # f.write(hparams.to_json(indent=0, sort_keys=True)) + f.write(hparams.to_json()) def execute_schedule(exp):