From 5bdffcb0d1186c9775328a557f0c2e2d56387952 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 21 Aug 2022 14:40:15 -0400 Subject: [PATCH] remove white space from train_attr/training_script #921 discussed that the tensors are compressed in the graph file. But it looks no... So at least we remove white space. --- deepmd/entrypoints/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deepmd/entrypoints/train.py b/deepmd/entrypoints/train.py index 4a67eee9d4..edc76b4d85 100755 --- a/deepmd/entrypoints/train.py +++ b/deepmd/entrypoints/train.py @@ -97,7 +97,8 @@ def train( json.dump(jdata, fp, indent=4) # save the training script into the graph - tf.constant(json.dumps(jdata), name='train_attr/training_script', dtype=tf.string) + # remove white spaces as it is not compressed + tf.constant(json.dumps(jdata, separators=(',', ':')), name='train_attr/training_script', dtype=tf.string) for message in WELCOME + CITATION + BUILD: log.info(message)