提交 5d4361d9 编写于 作者: T tangwei

rename upper to lowe

上级 b45368e8
...@@ -45,13 +45,13 @@ if __name__ == "__main__": ...@@ -45,13 +45,13 @@ if __name__ == "__main__":
if not os.path.exists(args.model) or not os.path.isfile(args.model): if not os.path.exists(args.model) or not os.path.isfile(args.model):
raise ValueError("argument model: {} error, must specify a existed yaml file".format(args.model)) raise ValueError("argument model: {} error, must specify a existed yaml file".format(args.model))
if args.engine.upper == "SINGLE": if args.engine.upper() == "SINGLE":
print("use SingleTraining to run model: {}".format(args.model)) print("use SingleTraining to run model: {}".format(args.model))
single_envs = {} single_envs = {}
single_envs["train.trainer"] = "SingleTraining" single_envs["train.trainer"] = "SingleTraining"
single_engine(single_envs, args.model) single_engine(single_envs, args.model)
elif args.engine.upper == "LOCAL_CLUSTER": elif args.engine.upper() == "LOCAL_CLUSTER":
print("use 1X1 ClusterTraining at localhost to run model: {}".format(args.model)) print("use 1X1 ClusterTraining at localhost to run model: {}".format(args.model))
cluster_envs = {} cluster_envs = {}
...@@ -63,7 +63,7 @@ if __name__ == "__main__": ...@@ -63,7 +63,7 @@ if __name__ == "__main__":
cluster_envs["train.strategy.mode"] = "async" cluster_envs["train.strategy.mode"] = "async"
local_cluster_engine(cluster_envs, args.model) local_cluster_engine(cluster_envs, args.model)
elif args.engine.upper == "LOCAL_MPI": elif args.engine.upper() == "LOCAL_MPI":
print("use 1X1 MPI ClusterTraining at localhost to run model: {}".format(args.model)) print("use 1X1 MPI ClusterTraining at localhost to run model: {}".format(args.model))
cluster_envs = {} cluster_envs = {}
...@@ -76,5 +76,5 @@ if __name__ == "__main__": ...@@ -76,5 +76,5 @@ if __name__ == "__main__":
local_mpi_engine(cluster_envs, args.model) local_mpi_engine(cluster_envs, args.model)
else: else:
if not os.path.exists(args.engine) or not os.path.isfile(args.engine): if not os.path.exists(args.engine) or not os.path.isfile(args.engine):
raise ValueError("argument engine: {} error, must specify a existed yaml file".format(args.model)) raise ValueError("argument engine: {} error, must specify a existed yaml file".format(args.engine))
yaml_engine(args.engine, args.model) yaml_engine(args.engine, args.model)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册