Skip to content

Commit

Permalink
Add logging for NO_SUCH_SUBOBJ
Browse files Browse the repository at this point in the history
  • Loading branch information
yf225 committed May 2, 2024
1 parent da991fa commit ff622d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions torch/_dynamo/variables/user_defined.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import threading
import types
import warnings
import logging

from typing import Dict, Generic, List

Expand Down Expand Up @@ -56,6 +57,9 @@
from .dicts import DefaultDictVariable


log = logging.getLogger(__name__)


def is_standard_setattr(val):
return val in (
object.__setattr__,
Expand Down Expand Up @@ -828,6 +832,7 @@ def var_getattr(self, tx, name):
subobj = self._getattr_static(name)
except AttributeError:
subobj = NO_SUCH_SUBOBJ
log.warning(f"NO_SUCH_SUBOBJ: {self.value} {name}")
getattr_fn = self._check_for_getattr()
if isinstance(getattr_fn, types.FunctionType):
return variables.UserMethodVariable(
Expand Down

0 comments on commit ff622d7

Please sign in to comment.