Browse Source

!12899 【MD】【BUG】Fix MD log print

From: @xulei2020
Reviewed-by: @liucunwei,@pandoublefeng
Signed-off-by: @liucunwei
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
40c3e59922
2 changed files with 6 additions and 5 deletions
  1. +1
    -4
      mindspore/ccsrc/minddata/dataset/engine/datasetops/batch_op.cc
  2. +5
    -1
      mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc

+ 1
- 4
mindspore/ccsrc/minddata/dataset/engine/datasetops/batch_op.cc View File

@@ -387,10 +387,7 @@ Status BatchOp::InvokeBatchMapFunc(TensorTable *input, TensorTable *output, CBat
for (size_t i = 0; i < ret_tuple.size(); i++) {
TensorRow output_batch;
// If user returns a type that is neither a list nor an array, issue a error msg.
if (py::isinstance<py::array>(ret_tuple[i])) {
MS_LOG(INFO) << "column: " << out_col_names_[i]
<< " returned by per_batch_map is a np.array. Please use list instead.";
} else if (!py::isinstance<py::list>(ret_tuple[i])) {
if (!py::isinstance<py::list>(ret_tuple[i])) {
MS_LOG(ERROR) << "column: " << out_col_names_[i]
<< " returned by per_batch_map is not a list, this could lead to conversion failure.";
}


+ 5
- 1
mindspore/ccsrc/minddata/dataset/engine/datasetops/device_queue_op.cc View File

@@ -409,6 +409,7 @@ Status DeviceQueueOp::PushDataToGPU() {
}

Status DeviceQueueOp::RetryPushData(unsigned int handle, const std::vector<DataItemGpu> &items) {
bool flagLog = false;
while (!GpuBufferMgr::GetInstance().IsClosed() && !TaskManager::FindMe()->Interrupted()) {
BlockQueueStatus_T ret = GpuBufferMgr::GetInstance().Push(handle, items, WAIT_TIME);
if (ret) {
@@ -416,7 +417,10 @@ Status DeviceQueueOp::RetryPushData(unsigned int handle, const std::vector<DataI
return Status(StatusCode::kMDUnexpectedError, __LINE__, __FILE__, "Invalid input data, please check it.");
} else {
if (!stop_send_) {
MS_LOG(DEBUG) << "Retry pushing data...";
if (!flagLog) {
MS_LOG(DEBUG) << "Retry pushing data...";
flagLog = true;
}
continue;
}
break;


Loading…
Cancel
Save