diff --git a/cube/cube-api/include/cube_api.h b/cube/cube-api/include/cube_api.h index aee82f6dd1d009d5b5b53b3f6fe8de0d591e5d51..c5059b9fea3a1d03cf4e50f8cb8dc994307d31ad 100644 --- a/cube/cube-api/include/cube_api.h +++ b/cube/cube-api/include/cube_api.h @@ -18,7 +18,12 @@ #include #include +#ifdef BCLOUD +#include "baidu/rpc/server.h" +#else #include "brpc/server.h" +#endif + #include "cube/cube-api/cube.pb.h" #include "cube/cube-api/include/meta.h" diff --git a/cube/cube-api/include/meta.h b/cube/cube-api/include/meta.h index ec891720c55503ad77de24cd178db53b2170023e..69bbb8ccc12e423d286183ed5dd87e90bf2e59de 100644 --- a/cube/cube-api/include/meta.h +++ b/cube/cube-api/include/meta.h @@ -19,11 +19,25 @@ #include #include +#ifdef BCLOUD +#include "baidu/rpc/channel.h" +#include "baidu/rpc/parallel_channel.h" +#include "rapidjson/document.h" +#else #include "brpc/channel.h" #include "brpc/parallel_channel.h" #include "butil/third_party/rapidjson/document.h" +#endif + #include "bvar/bvar.h" +#ifdef BCLOUD +namespace brpc = baidu::rpc; +#ifndef BUTIL_RAPIDJSON_NAMESPACE +#define BUTIL_RAPIDJSON_NAMESPACE RAPIDJSON_NAMESPACE +#endif +#endif + namespace rec { namespace mcube { diff --git a/cube/cube-api/src/cube_api.cpp b/cube/cube-api/src/cube_api.cpp index 8a9cebb9aa92f1bdb13c47cb7c065eaf2738c73f..c481effae450889bbcf25c4e315edca3e8d88e6b 100644 --- a/cube/cube-api/src/cube_api.cpp +++ b/cube/cube-api/src/cube_api.cpp @@ -13,8 +13,14 @@ // limitations under the License. #include "cube/cube-api/include/cube_api.h" +#ifdef BCLOUD +#include +#include +#else #include #include +#endif + #include #include "cube/cube-api/include/cube_api_bvar.h" @@ -25,6 +31,10 @@ namespace { static ::rec::mcube::CubeAPI* g_ins = NULL; } +#ifdef BCLOUD +namespace brpc = baidu::rpc; +#endif + namespace rec { namespace mcube { diff --git a/cube/cube-api/src/meta.cpp b/cube/cube-api/src/meta.cpp index 69ce43a08e0f5460dfa4e440958ff247458f6140..06911e8828685abbe3b0912f22f8dd7a0f807e50 100644 --- a/cube/cube-api/src/meta.cpp +++ b/cube/cube-api/src/meta.cpp @@ -26,6 +26,10 @@ namespace { static ::rec::mcube::Meta* g_ins = NULL; } +#ifdef BCLOUD +namespace brpc = baidu::rpc; +#endif + namespace rec { namespace mcube { diff --git a/doc/CTR_PREDICTION.md b/doc/CTR_PREDICTION.md index 746b6360f3fb326f3a63561bab1a2163bf30da67..513b4560f025a08f3fc2ffe9a7fb96ada0b076c5 100755 --- a/doc/CTR_PREDICTION.md +++ b/doc/CTR_PREDICTION.md @@ -320,7 +320,7 @@ def prune_program(): ### 2.5 裁剪过程串到一起 -我们提供了完整的裁剪CTR预估模型的脚本文件save_program.py,同[CTR分布式训练任务](doc/DISTRIBUTED_TRAINING_AND_SERVING.md)一起发布,可以在trainer和pserver容器的训练脚本目录下找到 +我们提供了完整的裁剪CTR预估模型的脚本文件save_program.py,同[CTR分布式训练和Serving流程化部署](https://github.com/PaddlePaddle/Serving/blob/master/doc/DEPLOY.md)一起发布,可以在trainer和pserver容器的训练脚本目录下找到,也可以在[这里](https://github.com/PaddlePaddle/Serving/tree/master/doc/resource)下载。 ## 3. 整个预测计算流程