diff --git a/torch/csrc/dynamo/guards.cpp b/torch/csrc/dynamo/guards.cpp index ea72631d8ad..6682e91cd08 100644 --- a/torch/csrc/dynamo/guards.cpp +++ b/torch/csrc/dynamo/guards.cpp @@ -2648,9 +2648,7 @@ class GuardAccessor { // subtree on immutable dict getitems. virtual bool check_nopybind(PyObject* obj, bool matches_dict_tag = false) = 0; virtual bool check_nopybind(FrameLocalsMapping* map, bool matches_dict_tag) { - // throw std::runtime_error("fallback to python"); - // Could fallback to running check on the Python dict (lazily constructed) - return check_nopybind((PyObject*)map->to_dict(), matches_dict_tag); + throw std::runtime_error("fallback to python"); } virtual GuardDebugInfo check_verbose_nopybind(PyObject* obj) = 0; virtual std::string repr() const = 0;