Revert "Change deprecated warning on dispatch_on_subclass to warn once (#130047)"

This reverts commit f21a21828ac6e16d903ee88f726fdb2278c04782.

Reverted https://github.com/pytorch/pytorch/pull/130047 on behalf of https://github.com/albanD due to The failure on the PR are valid, they should not have been ignored ([comment](https://github.com/pytorch/pytorch/pull/130047#issuecomment-2223488933))
This commit is contained in:
PyTorch MergeBot
2024-07-11 17:24:02 +00:00
parent f21a21828a
commit 492de213e2

View File

@ -291,7 +291,7 @@ static py::object dispatch_on_subclass(
PyObject_FastGetAttrString(torch_function.ptr(), "__self__")
.is(py::handle(arg)) &&
torch_function.ptr() != torch::disabled_torch_function_impl()) {
TORCH_WARN_ONCE(
TORCH_WARN(
"Defining your `",
torch_function_name_str,
"` as a plain method is deprecated ",