From 734538c7c571941e6f5962e2a25b4d86553689d5 Mon Sep 17 00:00:00 2001 From: hexia Date: Thu, 20 Aug 2020 14:47:47 +0800 Subject: [PATCH] delete info --- serving/core/http_process.cc | 3 --- serving/example/cpp_client/ms_client.cc | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/serving/core/http_process.cc b/serving/core/http_process.cc index cf989779001..51b2d0a950f 100644 --- a/serving/core/http_process.cc +++ b/serving/core/http_process.cc @@ -102,7 +102,6 @@ Status GetDataFromJson(const json &json_data, std::string *data, HTTP_DATA_TYPE } auto s_data = json_data.get(); data->append(reinterpret_cast(&s_data), sizeof(int32_t)); - MSI_LOG(INFO) << "data size " << data->size(); } else if (json_data.is_number_float()) { if (*type == HTTP_DATA_NONE) { *type = HTTP_DATA_FLOAT; @@ -112,7 +111,6 @@ Status GetDataFromJson(const json &json_data, std::string *data, HTTP_DATA_TYPE } auto s_data = json_data.get(); data->append(reinterpret_cast(&s_data), sizeof(float)); - MSI_LOG(INFO) << "data size " << data->size(); } else { ERROR_INFER_STATUS(status, INVALID_INPUTS, "the input data type should be int or float"); return status; @@ -227,7 +225,6 @@ Status TransTensorToPredictRequest(const json &message_info, PredictRequest *req std::string msg_data; HTTP_DATA_TYPE type{HTTP_DATA_NONE}; RecusiveGetTensor(tensor, 0, &shape, &msg_data, &type); - MSI_LOG(INFO) << shape << ", data = " << msg_data.size(); auto iter = http_to_infer_map.find(type); if (iter == http_to_infer_map.end()) { ERROR_INFER_STATUS(status, INVALID_INPUTS, "the input type is not supported right now"); diff --git a/serving/example/cpp_client/ms_client.cc b/serving/example/cpp_client/ms_client.cc index 720f1cf7044..8c82977008c 100644 --- a/serving/example/cpp_client/ms_client.cc +++ b/serving/example/cpp_client/ms_client.cc @@ -41,7 +41,8 @@ class MSClient { Tensor data; TensorShape shape; - shape.add_dims(4); + shape.add_dims(2); + shape.add_dims(2); *data.mutable_tensor_shape() = shape; data.set_tensor_type(ms_serving::MS_FLOAT32); std::vector input_data{1, 2, 3, 4}; @@ -58,7 +59,7 @@ class MSClient { // The actual RPC. Status status = stub_->Predict(&context, request, &reply); - std::cout << "Compute [1, 2, 3, 4] + [1, 2, 3, 4]" << std::endl; + std::cout << "Compute [[1, 2], [3, 4]] + [[1, 2], [3, 4]]" << std::endl; // Act upon its status. if (status.ok()) {