pytorch/torch/csrc/jit/python
Luthaf 5970fb402e C++ CustomClass in Python: indicate which methods are not implemented (#100171)
Without these changes, it can be hard to know which magic methods are not implemented on a given ScriptObject.

before:
```py
torch.ops.load_library("somelib.so")
c = torch.classes.somelib.SomeClass()
print(len(c))
# raise NotImplementedError
```

after:
```py
torch.ops.load_library("somelib.so")
c = torch.classes.somelib.SomeClass()
print(len(c))
# raise NotImplementedError: '__len__' is not implemented for __torch__.torch.classes.somelib.SomeClass
```

------

I could not find a linked issue, if you want me to open one as well I can do this.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/100171
Approved by: https://github.com/ezyang
2023-05-09 18:41:40 +00:00
..
init.cpp Optionally ignore utf-8 decoding error when converting std::string to python str. (#97282) 2023-03-23 01:19:08 +00:00
init.h
module_python.h
pybind_utils.cpp make torch/csrc/jit/python/pybind_utils.cpp data_ptr-correct (#100682) 2023-05-05 15:53:06 +00:00
pybind_utils.h Revert "Reduce includes of CUDACachingAllocator.h (#97072)" 2023-04-07 06:15:11 +00:00
pybind.h
python_arg_flatten.cpp
python_arg_flatten.h
python_custom_class.cpp
python_custom_class.h
python_dict.cpp
python_dict.h
python_interpreter.cpp
python_ir.cpp Add Symbool support in python to C++ translation (#98453) 2023-04-12 03:21:57 +00:00
python_ir.h
python_ivalue.h
python_list.cpp
python_list.h
python_sugared_value.cpp [JIT] clarify errors due to non-literal indexing into ModuleList, ModuleDict (#98606) 2023-04-18 02:53:53 +00:00
python_sugared_value.h
python_tracer.cpp do not need to check if element in dict input is Tensor. (#97866) 2023-03-31 19:39:00 +00:00
python_tracer.h
python_tree_views.cpp
python_tree_views.h
script_init.cpp C++ CustomClass in Python: indicate which methods are not implemented (#100171) 2023-05-09 18:41:40 +00:00
script_init.h
update_graph_executor_opt.cpp
update_graph_executor_opt.h
utf8_decoding_ignore.cpp Optionally ignore utf-8 decoding error when converting std::string to python str. (#97282) 2023-03-23 01:19:08 +00:00
utf8_decoding_ignore.h Optionally ignore utf-8 decoding error when converting std::string to python str. (#97282) 2023-03-23 01:19:08 +00:00