forked from mindspore-Ecosystem/mindspore
fix code review
This commit is contained in:
parent
ba7ab2ec76
commit
7ae48d76a7
|
@ -9,7 +9,7 @@ endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
mindspore_add_pkg(sqlite
|
mindspore_add_pkg(sqlite
|
||||||
VER 3.32.2
|
VER 3.36.0
|
||||||
LIBS sqlite3
|
LIBS sqlite3
|
||||||
URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip
|
URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip
|
||||||
MD5 c5d360c74111bafae1b704721ff18fe6
|
MD5 c5d360c74111bafae1b704721ff18fe6
|
||||||
|
|
|
@ -746,6 +746,7 @@ void DeviceQueueOp::DetectPerBatchTime(const uint64_t *start_time, uint64_t *end
|
||||||
" performance(with creating dataset iterator) and optimize it.";
|
" performance(with creating dataset iterator) and optimize it.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void DeviceQueueOp::PrintBeginInfoWhenFirstBatch(const bool &first_push_flag) {
|
void DeviceQueueOp::PrintBeginInfoWhenFirstBatch(const bool &first_push_flag) {
|
||||||
if (first_push_flag != true) {
|
if (first_push_flag != true) {
|
||||||
|
@ -763,6 +764,5 @@ void DeviceQueueOp::PrintEndInfoWhenFirstBatch(bool *first_push_flag) {
|
||||||
*first_push_flag = true;
|
*first_push_flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} // namespace dataset
|
} // namespace dataset
|
||||||
} // namespace mindspore
|
} // namespace mindspore
|
||||||
|
|
|
@ -92,9 +92,11 @@ Status Serdes::Deserialize(const std::string &json_filepath, std::shared_ptr<Dat
|
||||||
try {
|
try {
|
||||||
json_in >> json_obj;
|
json_in >> json_obj;
|
||||||
} catch (const std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
|
json_in.close();
|
||||||
return Status(StatusCode::kMDSyntaxError,
|
return Status(StatusCode::kMDSyntaxError,
|
||||||
"Invalid file, failed to parse json file: " + json_filepath + ", error message: " + e.what());
|
"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_IF_NOT_OK(ConstructPipeline(json_obj, ds));
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue