!5846 fix the bug of get id

Merge pull request !5846 from Simson/bugfix
pull/5846/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit 2ccb74c913

@ -137,10 +137,10 @@ static std::string GetId(const py::object &obj) {
}
if (py::isinstance<mindspore::Type>(to_process)) {
auto type_ptr = py::cast<mindspore::TypePtr>(to_process);
return prefix + type_ptr->ToString();
return "type" + type_ptr->ToString();
}
if (py::isinstance<py::str>(to_process)) {
return prefix + std::string(py::str(to_process));
return "s" + std::string(py::str(to_process));
}
if (py::isinstance<py::int_>(to_process)) {
return prefix + std::string(py::str(to_process));

Loading…
Cancel
Save