class JobEnv(object):
def __init__(self, etcd_endoints=None, job_id=None, master=None):
self.running_env = os.getenv("PADDLE_RUNING_ENV")
self.job_id = os.getenv("PADDLE_JOB_ID") if job_id is None else job_id
self.master = os.getenv("PADDLE_MASTER") if master is None else master
self.etcd_endpoints = os.getenv(
"PADDLE_EDL_ETCD_ENPOINTS"
After Change
ports = os.getenv(
"PADDLE_TRAINER_PORTS") if trainer_ports is None else trainer_ports
assert ports, "PADDLE_TRAINER_PORTS must has valid value"
self.trainer_ports = ports.split(",")
assert len(self.trainer_ports) == gpu_num, "one gpu one port"
class TrainerEnv(object):