From b420d4dddc74a641d35d0058ec1a6b6462080e81 Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Tue, 25 Oct 2022 10:53:12 +0800 Subject: [PATCH] fix multiprocess error (#47301) --- python/paddle/fluid/dygraph/dygraph_to_static/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/utils.py b/python/paddle/fluid/dygraph/dygraph_to_static/utils.py index 8b4a7ac645e..9687efb942e 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/utils.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/utils.py @@ -570,7 +570,7 @@ def get_temp_dir(): """ Return @to_static temp directory. """ - dir_name = "paddle/to_static_tmp" + dir_name = "paddle/to_static_tmp/{pid}".format(pid=os.getpid()) temp_dir = os.path.join(os.path.expanduser('~/.cache'), dir_name) is_windows = sys.platform.startswith('win') if is_windows: -- GitLab