From b6ec6525b9face31f190ee0779739bb734bc7e75 Mon Sep 17 00:00:00 2001 From: youkaichao Date: Tue, 28 Nov 2023 16:04:53 +0800 Subject: [PATCH] remove type_name arg --- depyf/explain/enable_debugging.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/depyf/explain/enable_debugging.py b/depyf/explain/enable_debugging.py index ac9364c2..0118a7c7 100644 --- a/depyf/explain/enable_debugging.py +++ b/depyf/explain/enable_debugging.py @@ -14,9 +14,6 @@ @dataclasses.dataclass class DebuggableHook(object): dump_src_dir: str - type_name: str - code_counter: Any = dataclasses.field( - default_factory=lambda: itertools.count(start=0)) def __call__(self, code, new_code): from depyf.decompiler import DecompilationError @@ -101,7 +98,7 @@ def prepare_debug(func, dump_src_dir, clean_wild_fx_code=True): data["unpatched__exec_with_source"] = torch.fx.graph_module._exec_with_source data["unpatched_load_by_key_path"] = torch._inductor.codecache.PyCodeCache.load_by_key_path - bytecode_hook = DebuggableHook(dump_src_dir, "transformed_code") + bytecode_hook = DebuggableHook(dump_src_dir) # patch some functions with patch(torch.fx.graph_module, "_exec_with_source", patched__exec_with_source), \