Skip to content

Commit e2fe1bf

Browse files
authored
[Bugfix] [Autowrapper] Fix visit_Delete (#1532)
## Purpose ## * Fix autowrapping for any models with use `del` in their forward function definitions ## Changes ## * `super().visit_Delete` does not exist, but `super().generic_visit` does (and is appropriate since we want to evaluate delete args before evaluating the delete itself --------- Signed-off-by: Kyle Sayers <[email protected]>
1 parent 4f40c6d commit e2fe1bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llmcompressor/pipelines/sequential/ast_utils/auto_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def visit_Delete(self, node: ast.Delete):
7373
Remove any deleted names from `self._local_names`,
7474
which are used to determine function wrapper arguments
7575
"""
76-
ret = super().visit_Delete(node)
76+
ret = super().generic_visit(node)
7777

7878
for target in node.targets:
7979
if isinstance(target, ast.Name):

0 commit comments

Comments
 (0)