diff --git a/core/general-client/src/general_model.cpp b/core/general-client/src/general_model.cpp index 1f4ee7ebfbcb6e39410450164c815051f9eb2494..8f5c5a1c22c6a13958e5273a2133f267bfa3073f 100644 --- a/core/general-client/src/general_model.cpp +++ b/core/general-client/src/general_model.cpp @@ -262,7 +262,6 @@ int PredictorClient::predict(const std::vector> &float_feed, << "prepro_1:" << preprocess_end << " " << "client_infer_0:" << client_infer_start << " " << "client_infer_1:" << client_infer_end << " "; - // TODO(barriery): multi-model profile time if (FLAGS_profile_server) { int op_num = res.profile_time_size() / 2; for (int i = 0; i < op_num; ++i) { @@ -442,7 +441,6 @@ int PredictorClient::batch_predict( << "prepro_1:" << preprocess_end << " " << "client_infer_0:" << client_infer_start << " " << "client_infer_1:" << client_infer_end << " "; - // TODO(barriery): multi-model profile time if (FLAGS_profile_server) { int op_num = res.profile_time_size() / 2; for (int i = 0; i < op_num; ++i) { diff --git a/core/predictor/op/op.h b/core/predictor/op/op.h index 43572b6759dea16231e7665cee0c4677d292b85f..ae52975fe6f2506fb0bf483318f607df137c8a96 100644 --- a/core/predictor/op/op.h +++ b/core/predictor/op/op.h @@ -14,12 +14,13 @@ #pragma once #include // bvar::LatencyRecorder +#include #include +#include #include "core/predictor/common/inner_common.h" #include "core/predictor/framework/channel.h" #include "core/predictor/framework/op_repository.h" #include "core/predictor/framework/predictor_metric.h" // PredictorMetric -#include namespace baidu { namespace paddle_serving { @@ -133,14 +134,10 @@ class Op { const std::string& full_name() const { return _full_name; } - // const std::string& pre_name() const { return _pre_node_name; } const std::vector& pre_names() const { return _pre_node_names; } void set_full_name(const std::string full_name) { _full_name = full_name; } - /*void set_pre_node_name(const std::string pre_name) {*/ - //_pre_node_name = pre_name; - /*}*/ void add_pre_node_name(const std::string pre_name) { _pre_node_names.push_back(pre_name); } @@ -204,8 +201,7 @@ class Op { Bus* _bus; Dag* _dag; uint32_t _id; - // std::string _pre_node_name; // only for sequential execution - std::vector _pre_node_names; // for dag execution + std::vector _pre_node_names; // for DAG execution std::string _name; std::string _full_name; // service_workflow_stageindex_opname std::string _type; @@ -232,8 +228,8 @@ class OpWithChannel : public Op { return _channel; } - //TODO: some bug in using butil::get_object - //_channel = butil::get_object(); + // TODO(barriery): There are some problems in using butil::get_object + // _channel = butil::get_object(); _channel = new ChannelType(); if (!_channel) { @@ -248,14 +244,15 @@ class OpWithChannel : public Op { int release_channel() { if (_channel) { - _channel->deinit(); + _channel->deinit(); delete _channel; } - //TODO: some bug in using butil::get_object - /*if (_channel) {*/ - //_channel->deinit(); - //butil::return_object(_channel); - /*}*/ + // TODO(barriery): There are some problems in using butil::get_object + /* + if (_channel) { + _channel->deinit(); + butil::return_object(_channel); + } */ _channel = NULL; return 0;