Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
8eb9a133
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8eb9a133
编写于
1月 13, 2020
作者:
G
guru4elephant
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine CMakeLists.txt
上级
b470d47a
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
65 addition
and
33 deletion
+65
-33
CMakeLists.txt
CMakeLists.txt
+37
-14
configure/CMakeLists.txt
configure/CMakeLists.txt
+9
-0
configure/proto/sdk_configure.proto
configure/proto/sdk_configure.proto
+17
-17
python/CMakeLists.txt
python/CMakeLists.txt
+1
-1
python/paddle_serving/serving_client/__init__.py
python/paddle_serving/serving_client/__init__.py
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
8eb9a133
# Copyright (c) 20
16
PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 20
20
PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
...
...
@@ -62,17 +62,20 @@ if (NOT DEFINED WITH_MKLDNN)
endif
()
endif
()
if
(
NOT CLIENT_ONLY
)
include
(
external/jsoncpp
)
include
(
external/leveldb
)
include
(
external/rocksdb
)
include
(
external/gtest
)
endif
()
include
(
external/snappy
)
include
(
external/leveldb
)
include
(
external/zlib
)
include
(
external/boost
)
include
(
external/protobuf
)
include
(
external/brpc
)
include
(
external/gflags
)
include
(
external/glog
)
include
(
external/snappy
)
include
(
external/gtest
)
include
(
external/pybind11
)
include
(
external/python
)
include
(
generic
)
...
...
@@ -87,36 +90,54 @@ endif()
include_directories
(
${
PADDLE_SERVING_SOURCE_DIR
}
)
include_directories
(
${
PADDLE_SERVING_BINARY_DIR
}
)
set
(
EXTERNAL_LIBS
if
(
NOT CLIENT_ONLY
)
set
(
EXTERNAL_LIBS
jsoncpp
gflags
rocksdb
glog
protobuf
paddlepaddle
brpc
)
endif
()
set
(
EXTERNAL_LIBS
gflags
glog
protobuf
brpc
)
if
(
NOT CLIENT_ONLY
)
if
(
WITH_MKLML
)
list
(
APPEND EXTERNAL_LIBS
${
MKLML_IOMP_LIB
}
)
endif
()
endif
()
if
(
NOT CLIENT_ONLY
)
if
(
WITH_MKLDNN
)
list
(
APPEND EXTERNAL_LIBS
${
MKLDNN_LIB
}
)
endif
()
endif
()
if
(
NOT CLIENT_ONLY
)
list
(
APPEND EXTERNAL_LIBS paddlepaddle
)
list
(
APPEND EXTERNAL_LIBS opencv
)
endif
()
if
(
NOT CLIENT_ONLY
)
add_subdirectory
(
cube
)
add_subdirectory
(
demo-client
)
add_subdirectory
(
kvdb
)
endif
()
add_subdirectory
(
configure
)
add_subdirectory
(
pdcodegen
)
add_subdirectory
(
sdk-cpp
)
add_subdirectory
(
demo-client
)
add_subdirectory
(
kvdb
)
if
(
CLIENT_ONLY
)
add_subdirectory
(
general-client
)
add_subdirectory
(
python
)
endif
()
if
(
NOT CLIENT_ONLY
)
add_subdirectory
(
predictor
)
...
...
@@ -128,6 +149,8 @@ add_subdirectory(demo-serving)
endif
()
# Paddle Serving Solutions
if
(
NOT CLIENT_ONLY
)
if
(
WITH_ELASTIC_CTR
)
add_subdirectory
(
elastic-ctr
)
endif
()
endif
()
configure/CMakeLists.txt
浏览文件 @
8eb9a133
...
...
@@ -26,3 +26,12 @@ install(FILES ${CMAKE_CURRENT_LIST_DIR}/include/configure_parser.h
FILE
(
GLOB inc
${
CMAKE_CURRENT_BINARY_DIR
}
/*.pb.h
)
install
(
FILES
${
inc
}
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/configure
)
py_proto_compile
(
sdk_configure_py_proto SRCS proto/sdk_configure.proto
)
add_custom_target
(
sdk_configure_py_proto_init ALL COMMAND
${
CMAKE_COMMAND
}
-E touch __init__.py
)
add_dependencies
(
sdk_configure_py_proto sdk_configure_py_proto_init
)
add_custom_command
(
TARGET sdk_configure_py_proto POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving/proto
COMMAND cp *.py
${
PADDLE_SERVING_BINARY_DIR
}
/python/paddle_serving/proto
COMMENT
"Copy generated python proto into directory paddle_serving/proto."
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
configure/proto/sdk_configure.proto
浏览文件 @
8eb9a133
...
...
@@ -16,27 +16,27 @@ syntax = "proto2";
package
baidu
.
paddle_serving.configure
;
message
ConnectionConf
{
required
int32
connect_timeout_ms
=
1
;
required
int32
rpc_timeout_ms
=
2
;
required
int32
connect_retry_count
=
3
;
required
int32
max_connection_per_host
=
4
;
required
int32
hedge_request_timeout_ms
=
5
;
required
int32
hedge_fetch_retry_count
=
6
;
required
string
connection_type
=
7
;
required
int32
connect_timeout_ms
=
1
[
default
=
2000
]
;
required
int32
rpc_timeout_ms
=
2
[
default
=
20000
]
;
required
int32
connect_retry_count
=
3
[
default
=
2
]
;
required
int32
max_connection_per_host
=
4
[
default
=
100
]
;
required
int32
hedge_request_timeout_ms
=
5
[
default
=
-
1
]
;
required
int32
hedge_fetch_retry_count
=
6
[
default
=
2
]
;
required
string
connection_type
=
7
[
default
=
"pooled"
]
;
};
message
NamingConf
{
optional
string
cluster_filter_strategy
=
1
;
optional
string
load_balance_strategy
=
2
;
optional
string
cluster_filter_strategy
=
1
[
default
=
"Default"
]
;
optional
string
load_balance_strategy
=
2
[
default
=
"la"
]
;
optional
string
cluster
=
3
;
};
message
RpcParameter
{
// 0-NONE, 1-SNAPPY, 2-GZIP, 3-ZLIB, 4-LZ4
required
int32
compress_type
=
1
;
required
int32
package_size
=
2
;
required
string
protocol
=
3
;
required
int32
max_channel_per_request
=
4
;
required
int32
compress_type
=
1
[
default
=
0
]
;
required
int32
package_size
=
2
[
default
=
20
]
;
required
string
protocol
=
3
[
default
=
"baidu_std"
]
;
required
int32
max_channel_per_request
=
4
[
default
=
3
]
;
};
message
SplitConf
{
...
...
@@ -53,12 +53,12 @@ message VariantConf {
optional
string
variant_router
=
6
;
};
message
WeightedRandomRenderConf
{
required
string
variant_weight_list
=
1
;
};
message
WeightedRandomRenderConf
{
required
string
variant_weight_list
=
1
[
default
=
"50"
]
;
};
message
Predictor
{
required
string
name
=
1
;
required
string
service_name
=
2
;
required
string
endpoint_router
=
3
;
required
string
name
=
1
[
default
=
"general_model"
]
;
required
string
service_name
=
2
[
default
=
"baidu.paddle_serving.predictor.general_model.GeneralModelService"
]
;
required
string
endpoint_router
=
3
[
default
=
"WeightedRandomRender"
]
;
required
WeightedRandomRenderConf
weighted_random_render_conf
=
4
;
repeated
VariantConf
variants
=
5
;
};
...
...
python/CMakeLists.txt
浏览文件 @
8eb9a133
...
...
@@ -17,7 +17,7 @@ add_custom_command(
COMMAND env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py bdist_wheel
DEPENDS
${
SERVING_CLIENT_CORE
}
sdk_configure_py_proto
${
PY_FILES
}
)
add_custom_target
(
paddle_python ALL DEPENDS
${
PADDLE_SERVING_BINARY_DIR
}
/.timestamp
)
add_custom_target
(
paddle_python ALL DEPENDS
serving_client
${
PADDLE_SERVING_BINARY_DIR
}
/.timestamp
)
set
(
SERVING_CLIENT_PYTHON_PACKAGE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
)
...
...
python/paddle_serving/serving_client/__init__.py
浏览文件 @
8eb9a133
...
...
@@ -34,7 +34,7 @@ class SDKConfig(object):
variant_desc
=
sdk
.
VariantConf
()
variant_desc
.
tag
=
"var1"
variant_desc
.
naming_conf
.
cluster
=
"list://
%s
"
.
format
(
":"
.
join
(
self
.
endpoints
))
variant_desc
.
naming_conf
.
cluster
=
"list://
{}
"
.
format
(
":"
.
join
(
self
.
endpoints
))
predictor_desc
.
variants
.
extend
([
variant_desc
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录