fix code review

This commit is contained in:
shenwei41 2021-12-31 09:51:39 +08:00
parent ba7ab2ec76
commit 7ae48d76a7
3 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ endif()
if(WIN32)
mindspore_add_pkg(sqlite
VER 3.32.2
VER 3.36.0
LIBS sqlite3
URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip
MD5 c5d360c74111bafae1b704721ff18fe6

View File

@ -746,6 +746,7 @@ void DeviceQueueOp::DetectPerBatchTime(const uint64_t *start_time, uint64_t *end
" performance(with creating dataset iterator) and optimize it.";
}
}
#endif
void DeviceQueueOp::PrintBeginInfoWhenFirstBatch(const bool &first_push_flag) {
if (first_push_flag != true) {
@ -763,6 +764,5 @@ void DeviceQueueOp::PrintEndInfoWhenFirstBatch(bool *first_push_flag) {
*first_push_flag = true;
}
}
#endif
} // namespace dataset
} // namespace mindspore

View File

@ -92,9 +92,11 @@ Status Serdes::Deserialize(const std::string &json_filepath, std::shared_ptr<Dat
try {
json_in >> json_obj;
} catch (const std::exception &e) {
json_in.close();
return Status(StatusCode::kMDSyntaxError,
"Invalid file, failed to parse json file: " + json_filepath + ", error message: " + e.what());
}
json_in.close();
RETURN_IF_NOT_OK(ConstructPipeline(json_obj, ds));
return Status::OK();
}