def _wait_hostname_resolution(): """Wait for the hostname resolution of the container. This is known behavior as the cluster boots up and has been documented here: https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-training-algo-running-container.html#your-algorithms-training-algo-running-container-dist-training """ for host in _env.TrainingEnv().hosts: _dns_lookup(host)
def training_env(resource_config=None, input_data_config=None, hyperparameters=None): resource_config = resource_config or env.read_resource_config() input_data_config = input_data_config or env.read_input_data_config() hyperparameters = hyperparameters or env.read_hyperparameters() return env.TrainingEnv(resource_config=resource_config, input_data_config=input_data_config, hyperparameters=hyperparameters)
def training_env(): """Create a TrainingEnv. Returns: TrainingEnv: an instance of TrainingEnv """ from sagemaker_containers import _env return _env.TrainingEnv(resource_config=_env.read_resource_config(), input_data_config=_env.read_input_data_config(), hyperparameters=_env.read_hyperparameters())
def training_env(resource_config=None, input_data_config=None, hyperparameters=None): """Placeholder docstring""" resource_config = resource_config or env.read_resource_config() input_data_config = input_data_config or env.read_input_data_config() hyperparameters = hyperparameters or env.read_hyperparameters() return env.TrainingEnv( resource_config=resource_config, input_data_config=input_data_config, hyperparameters=hyperparameters, )