From 4ac0f5db0bf755b8f67cac24c528a540fcc134d2 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 19 Nov 2021 16:42:31 -0500 Subject: [PATCH] updata_deepmd_input when compress This ensures the old model can be compressed by the new program. --- deepmd/entrypoints/compress.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deepmd/entrypoints/compress.py b/deepmd/entrypoints/compress.py index 8cb8070594..030224d7de 100644 --- a/deepmd/entrypoints/compress.py +++ b/deepmd/entrypoints/compress.py @@ -102,6 +102,7 @@ def compress( int(frequency), ] jdata["training"]["save_ckpt"] = "model-compression/model.ckpt" + jdata = updata_deepmd_input(jdata) jdata = normalize(jdata) # check the descriptor info of the input file @@ -146,4 +147,4 @@ def _check_compress_type(model_file): t_model_type = None if t_model_type == "compressed_model": - raise RuntimeError("The input frozen model %s has already been compressed! Please do not compress the model repeatedly. " % model_file) \ No newline at end of file + raise RuntimeError("The input frozen model %s has already been compressed! Please do not compress the model repeatedly. " % model_file)