// comma separated ips of all pservers, needed by trainer and
args.endpoints = os.getenv("PADDLE_PSERVERS", "")
ep_list = args.endpoints.split(",")
args.trainers = int(os.getenv("PADDLE_TRAINERS_NUM", "1"))
args.pserver_id = int(os.getenv("PADDLE_PSERVER_ID", "0"))
for ep in ep_list:
if os.getenv("POD_IP", "localhost") in ep:
args.current_endpoint = ep
break
args.role = os.getenv("TRAINING_ROLE", "TRAINER")
args.trainer_id = int(os.getenv("PADDLE_TRAINER_ID", "0"))
args.is_local = bool(int(os.getenv("PADDLE_IS_LOCAL", 0)))
if args.is_local: