I met an error message saying that Overloaded torch operator invoked from Python failed to many any schema
. It might be a typo? It should be failed to match any schema
.
Searching the codebase, I find three places of this typo:
@ezyang
try {
stack = createStackForSchema(op->schema(), args, kwargs, c10::nullopt);
found_op = op;
break;
} catch (schema_match_error& error) {
errors.push_back(std::move(error));
}
}
if (!found_op) {
std::stringstream ss;
ss << "Overloaded torch operator invoked from Python failed to many any schema:\n";
for (const auto& err : errors) {
ss << err.what() << "\n\n";
}
throw std::runtime_error(ss.str());
}
return std::make_pair(std::move(found_op), std::move(stack));
}
}
@zou3519
self.assertIn(torch.Tag.pt2_compliant_tag, op.tags)
def test_resolve_packet(self):
x = torch.randn(3)
result = torch._C._jit_resolve_packet("aten::sum", x)
self.assertEqual(result, "default")
result = torch._C._jit_resolve_packet("aten::sum", x, dim=1)
self.assertEqual(result, "dim_IntList")
with self.assertRaisesRegex(RuntimeError, "failed to many any schema"):
result = torch._C._jit_resolve_packet("aten::sum", x, x, x)
def test_define_bad_schema(self):
lib = self.lib()
with self.assertRaisesRegex(ValueError, "expected schema to look like"):
torch.library.define(f"{self.test_ns}::foo", "foo(Tensor x) -> Tensor")
def test_define_and_impl(self):
lib = self.lib()
torch.library.define(f"{self.test_ns}::foo", "(Tensor x) -> Tensor", lib=lib)
@Pritam Damania
def test_rref_get_type_timeout_blocking(self):
self._test_rref_get_type_timeout(blocking=True)
def test_rref_get_type_timeout_non_blocking(self):
self._test_rref_get_type_timeout(blocking=False)
@dist_init
def test_op_with_invalid_args(self):
dst = worker_name((self.rank + 1) % self.world_size)
with self.assertRaisesRegex(
RuntimeError, "Overloaded torch operator invoked from Python failed to many any schema"
):
rpc.rpc_sync(dst, torch.add, args=())
def _test_rref_proxy_timeout(self, rref_proxy_api):
dst_rank = (self.rank + 1) % self.world_size
dst = worker_name(dst_rank)
rref = rpc.remote(dst, MyClass, args=(torch.ones(2, 2), ))
# Ensure RRef is created on remote node.
rref.to_here()
rref_api = getattr(rref, rref_proxy_api)
I want to confirm from these committers if they are indeed typos. If yes, I can go ahead and fix them.
smth
December 7, 2023, 3:16pm
2
yea this is a typo. go ahead and send a fix