Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
1fb339d0
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看板
提交
1fb339d0
编写于
8月 21, 2020
作者:
B
barriery
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix cpu
上级
23210349
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
40 addition
and
12 deletion
+40
-12
python/examples/pipeline/web_service/local_pipeline_server.py
...on/examples/pipeline/web_service/local_pipeline_server.py
+2
-2
python/examples/pipeline/web_service/web_service.py
python/examples/pipeline/web_service/web_service.py
+8
-3
python/paddle_serving_server/__init__.py
python/paddle_serving_server/__init__.py
+4
-0
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+4
-0
python/pipeline/local_rpc_service_handler.py
python/pipeline/local_rpc_service_handler.py
+2
-2
python/setup.py.client.in
python/setup.py.client.in
+9
-3
python/setup.py.server.in
python/setup.py.server.in
+11
-2
未找到文件。
python/examples/pipeline/web_service/local_pipeline_server.py
浏览文件 @
1fb339d0
...
...
@@ -13,9 +13,9 @@
# limitations under the License.
# pylint: disable=doc-string-missing
try
:
from
paddle_serving_server
import
pipeline
except
ImportError
:
from
paddle_serving_server_gpu
import
pipeline
except
ImportError
:
from
paddle_serving_server
import
pipeline
import
numpy
as
np
import
logging
...
...
python/examples/pipeline/web_service/web_service.py
浏览文件 @
1fb339d0
...
...
@@ -11,8 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
paddle_serving_server_gpu.web_service
import
DefaultPipelineWebService
try
:
from
paddle_serving_server_gpu.web_service
import
DefaultPipelineWebService
except
ImportError
:
from
paddle_serving_server.web_service
import
DefaultPipelineWebService
import
logging
import
numpy
as
np
...
...
@@ -40,6 +42,9 @@ class UciService(DefaultPipelineWebService):
uci_service
=
UciService
(
name
=
"uci"
)
uci_service
.
init_separator
()
uci_service
.
load_model_config
(
"./uci_housing_model"
)
uci_service
.
set_gpus
(
"0"
)
try
:
uci_service
.
set_gpus
(
"0"
)
except
Exception
:
pass
uci_service
.
prepare_server
(
workdir
=
"workdir"
,
port
=
18080
)
uci_service
.
run_service
()
python/paddle_serving_server/__init__.py
浏览文件 @
1fb339d0
...
...
@@ -159,6 +159,10 @@ class Server(object):
self
.
mkl_flag
=
False
self
.
model_config_paths
=
None
# for multi-model in a workflow
def
get_fetch_list
(
self
):
fetch_names
=
[
var
.
alias_name
for
var
in
self
.
model_conf
.
fetch_var
]
return
fetch_names
def
set_max_concurrency
(
self
,
concurrency
):
self
.
max_concurrency
=
concurrency
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
1fb339d0
...
...
@@ -197,6 +197,10 @@ class Server(object):
self
.
gpuid
=
0
self
.
model_config_paths
=
None
# for multi-model in a workflow
def
get_fetch_list
(
self
):
fetch_names
=
[
var
.
alias_name
for
var
in
self
.
model_conf
.
fetch_var
]
return
fetch_names
def
set_max_concurrency
(
self
,
concurrency
):
self
.
max_concurrency
=
concurrency
...
...
python/pipeline/local_rpc_service_handler.py
浏览文件 @
1fb339d0
...
...
@@ -16,9 +16,9 @@ import os
import
logging
import
multiprocessing
try
:
from
paddle_serving_server
import
OpMaker
,
OpSeqMaker
,
Server
except
ImportError
:
from
paddle_serving_server_gpu
import
OpMaker
,
OpSeqMaker
,
Server
except
ImportError
:
from
paddle_serving_server
import
OpMaker
,
OpSeqMaker
,
Server
from
.util
import
AvailablePortGenerator
,
NameGenerator
_LOGGER
=
logging
.
getLogger
(
__name__
)
...
...
python/setup.py.client.in
浏览文件 @
1fb339d0
...
...
@@ -63,8 +63,10 @@ packages=['paddle_serving_client',
'paddle_serving_client.metric',
'paddle_serving_client.utils',
'paddle_serving_client.pipeline',
'paddle_serving_client.pipeline.proto']
package_data={'paddle_serving_client': ['serving_client.so','lib/*'],}
'paddle_serving_client.pipeline.proto',
'paddle_serving_client.pipeline.gateway',
'paddle_serving_client.pipeline.gateway.proto']
package_data={'paddle_serving_client': ['serving_client.so', 'lib/*', 'pipeline/gateway/libproxy_server.so'],}
package_dir={'paddle_serving_client':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_client',
'paddle_serving_client.proto':
...
...
@@ -78,7 +80,11 @@ package_dir={'paddle_serving_client':
'paddle_serving_client.pipeline':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_client/pipeline',
'paddle_serving_client.pipeline.proto':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_client/pipeline/proto'}
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_client/pipeline/proto',
'paddle_serving_client.pipeline.gateway':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_client/pipeline/gateway',
'paddle_serving_client.pipeline.gateway.proto':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_client/pipeline/gateway/proto'}
setup(
name='paddle-serving-client',
...
...
python/setup.py.server.in
浏览文件 @
1fb339d0
...
...
@@ -35,7 +35,9 @@ REQUIRED_PACKAGES = [
packages=['paddle_serving_server',
'paddle_serving_server.proto',
'paddle_serving_server.pipeline',
'paddle_serving_server.pipeline.proto']
'paddle_serving_server.pipeline.proto',
'paddle_serving_server.pipeline.gateway',
'paddle_serving_server.pipeline.gateway.proto']
package_dir={'paddle_serving_server':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_server',
...
...
@@ -44,7 +46,13 @@ package_dir={'paddle_serving_server':
'paddle_serving_server.pipeline':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_server/pipeline',
'paddle_serving_server.pipeline.proto':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_server/pipeline/proto'}
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_server/pipeline/proto',
'paddle_serving_server.pipeline.gateway':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_server/pipeline/gateway',
'paddle_serving_server.pipeline.gateway.proto':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_server/pipeline/gateway/proto'}
package_data={'paddle_serving_server': ['pipeline/gateway/libproxy_server.so'],}
setup(
name='paddle-serving-server',
...
...
@@ -56,6 +64,7 @@ setup(
author_email='guru4elephant@gmail.com',
install_requires=REQUIRED_PACKAGES,
packages=packages,
package_data=package_data,
package_dir=package_dir,
# PyPI package information.
classifiers=[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录