提交 85ed4928 编写于 作者: B barrierye

add comment

上级 55c54e06
...@@ -262,7 +262,6 @@ int PredictorClient::predict(const std::vector<std::vector<float>> &float_feed, ...@@ -262,7 +262,6 @@ int PredictorClient::predict(const std::vector<std::vector<float>> &float_feed,
<< "prepro_1:" << preprocess_end << " " << "prepro_1:" << preprocess_end << " "
<< "client_infer_0:" << client_infer_start << " " << "client_infer_0:" << client_infer_start << " "
<< "client_infer_1:" << client_infer_end << " "; << "client_infer_1:" << client_infer_end << " ";
// TODO(barriery): multi-model profile time
if (FLAGS_profile_server) { if (FLAGS_profile_server) {
int op_num = res.profile_time_size() / 2; int op_num = res.profile_time_size() / 2;
for (int i = 0; i < op_num; ++i) { for (int i = 0; i < op_num; ++i) {
...@@ -442,7 +441,6 @@ int PredictorClient::batch_predict( ...@@ -442,7 +441,6 @@ int PredictorClient::batch_predict(
<< "prepro_1:" << preprocess_end << " " << "prepro_1:" << preprocess_end << " "
<< "client_infer_0:" << client_infer_start << " " << "client_infer_0:" << client_infer_start << " "
<< "client_infer_1:" << client_infer_end << " "; << "client_infer_1:" << client_infer_end << " ";
// TODO(barriery): multi-model profile time
if (FLAGS_profile_server) { if (FLAGS_profile_server) {
int op_num = res.profile_time_size() / 2; int op_num = res.profile_time_size() / 2;
for (int i = 0; i < op_num; ++i) { for (int i = 0; i < op_num; ++i) {
......
...@@ -14,12 +14,13 @@ ...@@ -14,12 +14,13 @@
#pragma once #pragma once
#include <bvar/bvar.h> // bvar::LatencyRecorder #include <bvar/bvar.h> // bvar::LatencyRecorder
#include <cstdlib>
#include <string> #include <string>
#include <vector>
#include "core/predictor/common/inner_common.h" #include "core/predictor/common/inner_common.h"
#include "core/predictor/framework/channel.h" #include "core/predictor/framework/channel.h"
#include "core/predictor/framework/op_repository.h" #include "core/predictor/framework/op_repository.h"
#include "core/predictor/framework/predictor_metric.h" // PredictorMetric #include "core/predictor/framework/predictor_metric.h" // PredictorMetric
#include <cstdlib>
namespace baidu { namespace baidu {
namespace paddle_serving { namespace paddle_serving {
...@@ -133,14 +134,10 @@ class Op { ...@@ -133,14 +134,10 @@ class Op {
const std::string& full_name() const { return _full_name; } const std::string& full_name() const { return _full_name; }
// const std::string& pre_name() const { return _pre_node_name; }
const std::vector<std::string>& pre_names() const { return _pre_node_names; } const std::vector<std::string>& pre_names() const { return _pre_node_names; }
void set_full_name(const std::string full_name) { _full_name = full_name; } 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) { void add_pre_node_name(const std::string pre_name) {
_pre_node_names.push_back(pre_name); _pre_node_names.push_back(pre_name);
} }
...@@ -204,8 +201,7 @@ class Op { ...@@ -204,8 +201,7 @@ class Op {
Bus* _bus; Bus* _bus;
Dag* _dag; Dag* _dag;
uint32_t _id; uint32_t _id;
// std::string _pre_node_name; // only for sequential execution std::vector<std::string> _pre_node_names; // for DAG execution
std::vector<std::string> _pre_node_names; // for dag execution
std::string _name; std::string _name;
std::string _full_name; // service_workflow_stageindex_opname std::string _full_name; // service_workflow_stageindex_opname
std::string _type; std::string _type;
...@@ -232,8 +228,8 @@ class OpWithChannel : public Op { ...@@ -232,8 +228,8 @@ class OpWithChannel : public Op {
return _channel; return _channel;
} }
//TODO: some bug in using butil::get_object // TODO(barriery): There are some problems in using butil::get_object
//_channel = butil::get_object<ChannelType>(); // _channel = butil::get_object<ChannelType>();
_channel = new ChannelType(); _channel = new ChannelType();
if (!_channel) { if (!_channel) {
...@@ -251,11 +247,12 @@ class OpWithChannel : public Op { ...@@ -251,11 +247,12 @@ class OpWithChannel : public Op {
_channel->deinit(); _channel->deinit();
delete _channel; delete _channel;
} }
//TODO: some bug in using butil::get_object // TODO(barriery): There are some problems in using butil::get_object
/*if (_channel) {*/ /*
//_channel->deinit(); if (_channel) {
//butil::return_object<ChannelType>(_channel); _channel->deinit();
/*}*/ butil::return_object<ChannelType>(_channel);
} */
_channel = NULL; _channel = NULL;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册