提交 f84d82d0 编写于 作者: T tangwei

update run version judge

上级 9a4576c2
import argparse import argparse
import os import os
import subprocess
import yaml import yaml
from paddle.fluid.incubate.fleet.parameter_server import version
from fleetrec.core.factory import TrainerFactory from fleetrec.core.factory import TrainerFactory
from fleetrec.core.utils import envs from fleetrec.core.utils import envs
...@@ -12,6 +11,18 @@ engines = {"TRAINSPILER": {}, "PSLIB": {}} ...@@ -12,6 +11,18 @@ engines = {"TRAINSPILER": {}, "PSLIB": {}}
clusters = ["SINGLE", "LOCAL_CLUSTER", "CLUSTER"] clusters = ["SINGLE", "LOCAL_CLUSTER", "CLUSTER"]
def is_transpiler():
FNULL = open(os.devnull, 'w')
cmd = ["python", "-c",
"import paddle.fluid as fluid; fleet_ptr = fluid.core.Fleet(); [fleet_ptr.copy_table_by_feasign(10, 10, [2020, 1010])];"]
proc = subprocess.Popen(cmd, stdout=FNULL, stderr=FNULL, cwd=os.getcwd())
ret = proc.wait()
if ret == -11:
return False
else:
return True
def set_runtime_envs(cluster_envs, engine_yaml): def set_runtime_envs(cluster_envs, engine_yaml):
def get_engine_extras(): def get_engine_extras():
with open(engine_yaml, 'r') as rb: with open(engine_yaml, 'r') as rb:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册