提交 c65ea168 编写于 作者: 李嘉琪

modify error type

上级 c7b50bcd
......@@ -263,7 +263,7 @@ AnfNodePtr ResolveSymbol(const FuncGraphManagerPtr &manager, const NameSpacePtr
}
SymbolResolver symbol_resolver(name_space, symbol, node);
if (!symbol_resolver.Resolve()) {
MS_LOG(EXCEPTION) << "Parse Resolve node failed NodeInfo: " << trace::GetDebugInfo(node->debug_info());
MS_EXCEPTION(TypeError) << "Parse Resolve node failed NodeInfo: " << trace::GetDebugInfo(node->debug_info());
}
py::object obj = symbol_resolver.result();
......
......@@ -162,7 +162,7 @@ def test_sequential_resolve_error():
input_np = np.random.randn(2, 3, 4, 5).astype(np.float32)
input_me = Tensor(input_np)
net = SequenceNet()
with pytest.raises(RuntimeError):
with pytest.raises(TypeError):
net(input_me)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册