in src/sagemaker/job.py [0:0]
def _load_config(inputs, estimator, expand_role=True, validate_uri=True):
"""Placeholder docstring"""
input_config = _Job._format_inputs_to_input_config(inputs, validate_uri)
role = (
estimator.sagemaker_session.expand_role(estimator.role)
if expand_role
else estimator.role
)
output_config = _Job._prepare_output_config(estimator.output_path, estimator.output_kms_key)
resource_config = _Job._prepare_resource_config(
estimator.instance_count,
estimator.instance_type,
estimator.volume_size,
estimator.volume_kms_key,
)
stop_condition = _Job._prepare_stop_condition(estimator.max_run, estimator.max_wait)
vpc_config = estimator.get_vpc_config()
model_channel = _Job._prepare_channel(
input_config,
estimator.model_uri,
estimator.model_channel_name,
validate_uri,
content_type="application/x-sagemaker-model",
input_mode="File",
)
if model_channel:
input_config = [] if input_config is None else input_config
input_config.append(model_channel)
if estimator.enable_network_isolation():
code_channel = _Job._prepare_channel(
input_config, estimator.code_uri, estimator.code_channel_name, validate_uri
)
if code_channel:
input_config = [] if input_config is None else input_config
input_config.append(code_channel)
return {
"input_config": input_config,
"role": role,
"output_config": output_config,
"resource_config": resource_config,
"stop_condition": stop_condition,
"vpc_config": vpc_config,
}