Revert D33342569: (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change

Test Plan: revert-hammer

Differential Revision:
D33342569 (856157fcee)

Original commit changeset: 57984ac67ae2

Original Phabricator Diff: D33342569 (856157fcee)

fbshipit-source-id: 4c12235a1776a3652e7f91e93b626705759d5176
(cherry picked from commit 4cbd7d8bab76fcf050e376c8528dba36541a779f)
This commit is contained in:
Michael Suo
2022-02-15 10:39:11 -08:00
committed by PyTorch MergeBot
parent 41782a4542
commit 7db4a48d92
9 changed files with 159 additions and 385 deletions

View File

@ -914,11 +914,8 @@ std::shared_ptr<SugaredValue> PythonExceptionValue::call(
->insertNode(caller.graph()->createTuple(message_values))
->output();
}
Value* qualified_class_name =
insertConstant(*caller.graph(), exception_class_qualified_name_, loc);
return std::make_shared<ExceptionMessageValue>(
error_message, qualified_class_name);
return std::make_shared<ExceptionMessageValue>(error_message);
}
bool isNamedTupleClass(const py::object& obj) {