Skip to content

Commit

Permalink
fix: fix class method function name error (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeeeeeep authored Jan 18, 2025
1 parent 56f2ef6 commit 41b5c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions objwatch/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _get_function_info(self, frame: FrameType) -> Dict[str, Any]:
return func_info

@lru_cache(maxsize=sys.maxsize)
def filename_not_endswith(self, filename: str) -> bool:
def _filename_not_endswith(self, filename: str) -> bool:
"""
Check if the filename does not end with any of the target extensions.
Expand Down Expand Up @@ -417,7 +417,7 @@ def trace_func(frame: FrameType, event: str, arg: Any) -> Optional[FunctionType]
"""

# Skip frames that do not match the filename condition
if self.filename_not_endswith(frame.f_code.co_filename):
if self._filename_not_endswith(frame.f_code.co_filename):
return trace_func

# Handle multi-GPU ranks if PyTorch is available
Expand Down

0 comments on commit 41b5c86

Please sign in to comment.