From 032f657cb6019856e14ce292b6b3540b6065379c Mon Sep 17 00:00:00 2001 From: tangwei Date: Thu, 14 May 2020 10:51:03 +0800 Subject: [PATCH] add paddle cloud run --- core/engine/cluster/cloud/cluster.sh | 2 -- example/cloud/config.ini | 16 +++++++--------- example/cloud/job.sh | 2 +- example/cloud/submit.sh | 6 +++--- run.py | 1 + 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/core/engine/cluster/cloud/cluster.sh b/core/engine/cluster/cloud/cluster.sh index 3a90e069..5e79a35b 100644 --- a/core/engine/cluster/cloud/cluster.sh +++ b/core/engine/cluster/cloud/cluster.sh @@ -75,9 +75,7 @@ function _submit() { function submit_hook() { _before_submit - _submit - _after_submit } diff --git a/example/cloud/config.ini b/example/cloud/config.ini index 710e248d..ba311a24 100644 --- a/example/cloud/config.ini +++ b/example/cloud/config.ini @@ -6,19 +6,17 @@ force_reuse_output_path="True" fs_name="afs://yinglong.afs.baidu.com:9902" fs_ugi="paddle,paddle" -FLAGS_rpc_deadline=300000 - -##train data path on hdfs -train_data_path="/user/paddle/benchmark/ctr/train_data_paddle" thirdparty_path="/user/paddle/benchmark/ctr/thirdparty" +#train data path on hdfs +train_data_path="/user/paddle/benchmark/ctr/train_data_paddle/part_1*" +#test data path on hdfs +#test_data_path="/user/paddle/benchmark/ctr/test_data" + #the output directory on hdfs output_path="/user/paddle/ly" -#the test data path on hdfs -test_data_path="/user/paddle/benchmark/ctr/test_data" CPU_NUM=16 -GLOG_v=0 -FLAGS_communicator_fake_rpc=0 -FLAGS_rpc_retry_times=0 +GLOG_v=0 +FLAGS_rpc_deadline=300000 diff --git a/example/cloud/job.sh b/example/cloud/job.sh index e53b05fb..a299372b 100644 --- a/example/cloud/job.sh +++ b/example/cloud/job.sh @@ -7,4 +7,4 @@ echo "heheda" -python -m paddlerec.run -m paddlerec.models.rank.dnn -e cluster -r worker +python -m paddlerec.run -m config.yaml -e cluster -r worker diff --git a/example/cloud/submit.sh b/example/cloud/submit.sh index 0069ec68..27caafa2 100644 --- a/example/cloud/submit.sh +++ b/example/cloud/submit.sh @@ -34,10 +34,10 @@ function package() { echo "package" temp=${engine_temp_path} - cp ${engine_workspace}/submit.sh ${temp} cp ${engine_workspace}/job.sh ${temp} cp ${engine_workspace}/before_hook.sh ${temp} + cp ${engine_run_config} ${temp}/config.yaml - g_submitfiles="submit.sh before_hook.sh" + g_submitfiles="job.sh before_hook.sh config.yaml" g_run_cmd="sh job.sh" -} \ No newline at end of file +} diff --git a/run.py b/run.py index 22d16a2a..ca89e88b 100755 --- a/run.py +++ b/run.py @@ -136,6 +136,7 @@ def cluster_engine(args): flattens = envs.flatten_environs(_envs, "_") flattens["engine_role"] = args.role + flattens["engine_run_config"] = args.model flattens["engine_temp_path"] = tempfile.mkdtemp() update_workspace(flattens) -- GitLab