Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleRec
提交
24d5c800
P
PaddleRec
项目概览
PaddlePaddle
/
PaddleRec
通知
68
Star
12
Fork
5
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
27
列表
看板
标记
里程碑
合并请求
10
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
27
Issue
27
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
24d5c800
编写于
5月 14, 2020
作者:
T
tangwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add paddle cloud run
上级
032f657c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
56 deletion
+5
-56
core/engine/cluster/cluster.py
core/engine/cluster/cluster.py
+5
-1
core/engine/cluster/master.sh
core/engine/cluster/master.sh
+0
-55
未找到文件。
core/engine/cluster/cluster.py
浏览文件 @
24d5c800
...
...
@@ -28,7 +28,11 @@ from paddlerec.core.utils import envs
class
ClusterEngine
(
Engine
):
def
__init_impl__
(
self
):
abs_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
self
.
submit_script
=
os
.
path
.
join
(
abs_dir
,
"master.sh"
)
backend
=
envs
.
get_runtime_environ
(
"engine_backend"
)
if
backend
==
"PaddleCloud"
:
self
.
submit_script
=
os
.
path
.
join
(
abs_dir
,
"cloud/cluster.sh"
)
else
:
raise
ValueError
(
"{} can not supported now"
.
format
(
backend
))
def
start_worker_procs
(
self
):
trainer
=
TrainerFactory
.
create
(
self
.
trainer
)
...
...
core/engine/cluster/master.sh
已删除
100644 → 0
浏览文件 @
032f657c
#!/bin/bash
###################################################
# Usage: submit.sh
# Description: run mpi submit clinet
###################################################
# ---------------------------------------------------------------------------- #
# variable define #
# ---------------------------------------------------------------------------- #
declare
g_curPath
=
""
declare
g_scriptName
=
""
declare
g_workPath
=
""
declare
g_run_stage
=
""
# ---------------------------------------------------------------------------- #
# const define #
# ---------------------------------------------------------------------------- #
declare
-r
CALL
=
"x"
################################################################################
#-----------------------------------------------------------------------------------------------------------------
# Function: get_cur_path
# Description: get churrent path
# Parameter:
# input:
# N/A
# output:
# N/A
# Return: 0 -- success; not 0 -- failure
# Others: N/A
#-----------------------------------------------------------------------------------------------------------------
get_cur_path
()
{
g_run_stage
=
"get_cur_path"
cd
"
$(
dirname
"
${
BASH_SOURCE
-
$0
}
"
)
"
g_curPath
=
"
${
PWD
}
"
g_scriptName
=
"
$(
basename
"
${
BASH_SOURCE
-
$0
}
"
)
"
cd
-
>
/dev/null
}
#-----------------------------------------------------------------------------------------------------------------
#fun : check function return code
#param : N/A
#return : 0 -- success; not 0 -- failure
#-----------------------------------------------------------------------------------------------------------------
function
check_error
()
{
if
[
${
?
}
-ne
0
]
;
then
echo
"execute "
+
$g_run_stage
+
" raise exception! please check ..."
exit
1
fi
}
source
${
engine_submit_scrpit
}
main
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录