def _env_vars_for_role()

in src/sagemaker_mxnet_container/training.py [0:0]


def _env_vars_for_role(role, hosts, ps_port, ps_verbose):
    if role in ROLES:
        return {
            'DMLC_NUM_WORKER': str(len(hosts)),
            'DMLC_NUM_SERVER': str(len(hosts)),
            'DMLC_ROLE': role,
            'DMLC_PS_ROOT_URI': _host_lookup(scheduler_host(hosts)),
            'DMLC_PS_ROOT_PORT': ps_port,
            'PS_VERBOSE': ps_verbose,
        }

    raise ValueError('Unexpected role: {}'.format(role))