From a5767bb6f890e67afc40cd04472f080b14a5f8b3 Mon Sep 17 00:00:00 2001 From: 0x45f <23097963+0x45f@users.noreply.github.com> Date: Wed, 13 Oct 2021 16:02:29 +0800 Subject: [PATCH] delete remove_static_file() function in error.py (#36153) (#36375) * change time to remove static tempfile * delete remove_static_file() function --- .../fluid/dygraph/dygraph_to_static/error.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/error.py b/python/paddle/fluid/dygraph/dygraph_to_static/error.py index 2a975bf00d1..273961e27ef 100644 --- a/python/paddle/fluid/dygraph/dygraph_to_static/error.py +++ b/python/paddle/fluid/dygraph/dygraph_to_static/error.py @@ -54,27 +54,9 @@ def attach_error_data(error, in_runtime=False): setattr(error, ERROR_DATA, error_data) - remove_static_file() return error -def remove_static_file(): - """ - Removes temporary files created during the transformation of dygraph to static graph. - """ - del_files = set() - for loc in global_origin_info_map: - static_filepath = loc[0] - del_files.add(static_filepath) - - filename, extension = os.path.splitext(static_filepath) - del_files.add(filename + ".pyc") - - for filepath in del_files: - if os.path.exists(filepath): - os.remove(filepath) - - class TraceBackFrame(OriginInfo): """ Traceback frame information. -- GitLab