From 13c6a4dff5383e36998f78741412335f530881bc Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Tue, 26 Jul 2022 15:49:41 +0800 Subject: [PATCH] fix create tmp_dir in Windows (#1313) --- paddleslim/auto_compression/compressor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddleslim/auto_compression/compressor.py b/paddleslim/auto_compression/compressor.py index fb58c0df..af16e6e9 100644 --- a/paddleslim/auto_compression/compressor.py +++ b/paddleslim/auto_compression/compressor.py @@ -554,7 +554,7 @@ class AutoCompression: def create_tmp_dir(self, base_dir, prefix="tmp"): # create a new temp directory in final dir - s_datetime = strftime("%Y-%m-%d-%H:%M:%S", gmtime()) + s_datetime = strftime("%Y_%m_%d_%H_%M_%S", gmtime()) tmp_base_name = "_".join([prefix, str(os.getpid()), s_datetime]) tmp_dir = os.path.join(base_dir, tmp_base_name) if not os.path.exists(tmp_dir): -- GitLab