Use Type::str() in Type::operator<< (#14657)

Summary:
Stacked on zip commit because it also changes expect files, read only the last commit.

This reduces the number of ways we can print a Type from 3 (python_str, str, operator<<) to 2.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14657

Differential Revision: D13288912

Pulled By: zdevito

fbshipit-source-id: f8dd610cea798c511c1d4327395bba54b1aa1697
This commit is contained in:
Zachary DeVito
2018-12-01 00:50:21 -08:00
committed by Facebook Github Bot
parent 143e171cb9
commit 4c11dee0e8
72 changed files with 531 additions and 545 deletions

View File

@ -80,7 +80,7 @@ void test_argument_checking_for_serialized_modules(
} catch (const c10::Error& error) {
AT_ASSERT(
std::string(error.what_without_backtrace())
.find("Expected value of type Dynamic for argument 'input' in "
.find("Expected value of type Tensor for argument 'input' in "
"position 0, but instead got value of type int") == 0);
}