diff --git a/python/paddle/fluid/dygraph/dygraph_to_static/error.py b/python/paddle/fluid/dygraph/dygraph_to_static/error.py index 2a975bf00d1d265b7ba62429d4b677887df5fe93..273961e27efba2b7dfe4c2cb942829fa89c2d8ff 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.