pytorch/torch/csrc/jit/python
Shuming Hu b45880c537 Optionally ignore utf-8 decoding error when converting std::string to python str. (#97282)
Summary: When language models use c++ tokenizer, outputs are a c++ strings that are not necessarily valid utf-8 encodings. Default pybind11 casting uses strict utf-8 decoding. We relax the decoding using 'ignore' argument.

Test Plan: https://www.internalfb.com/intern/testinfra/testrun/6473924609918070

Reviewed By: Nayef211

Differential Revision: D43970697

Pull Request resolved: https://github.com/pytorch/pytorch/pull/97282
Approved by: https://github.com/davidberard98
2023-03-23 01:19:08 +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 Optionally ignore utf-8 decoding error when converting std::string to python str. (#97282) 2023-03-23 01:19:08 +00:00
pybind_utils.h [JIT] Partially support ForwardRef type annotations for NamedTuple attributes (#96933) 2023-03-22 15:20:38 +00:00
pybind.h
python_arg_flatten.cpp [BE] Use nested namespaces in .cpp/.cu files (#92100) 2023-01-13 16:32:34 +00:00
python_arg_flatten.h
python_custom_class.cpp [BE] Use nested namespaces in .cpp/.cu files (#92100) 2023-01-13 16:32:34 +00:00
python_custom_class.h
python_dict.cpp Apply Clang-Tidy readability-container-size-empty (#93236) 2023-01-29 23:28:19 +00:00
python_dict.h
python_interpreter.cpp [BE] Use nested namespaces in .cpp/.cu files (#92100) 2023-01-13 16:32:34 +00:00
python_ir.cpp [jit] Support Awaitable type (#90863) 2023-01-30 17:38:59 +00:00
python_ir.h
python_ivalue.h
python_list.cpp Apply Clang-Tidy readability-container-size-empty (#93236) 2023-01-29 23:28:19 +00:00
python_list.h
python_sugared_value.cpp [JIT] Partially support ForwardRef type annotations for NamedTuple attributes (#96933) 2023-03-22 15:20:38 +00:00
python_sugared_value.h [JIT] Partially support ForwardRef type annotations for NamedTuple attributes (#96933) 2023-03-22 15:20:38 +00:00
python_tracer.cpp [BE] Use nested namespaces in .cpp/.cu files (#92100) 2023-01-13 16:32:34 +00:00
python_tracer.h
python_tree_views.cpp [BE] Use nested namespaces in .cpp/.cu files (#92100) 2023-01-13 16:32:34 +00:00
python_tree_views.h
script_init.cpp [JIT] Partially support ForwardRef type annotations for NamedTuple attributes (#96933) 2023-03-22 15:20:38 +00:00
script_init.h
update_graph_executor_opt.cpp [BE] Use nested namespaces in .cpp/.cu files (#92100) 2023-01-13 16:32:34 +00:00
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