a naming convention which includes the current AWS account ID.
def __init__(self, boto_session=None, sagemaker_client=None, sagemaker_runtime_client=None):
Initialize a SageMaker ``Session``.
Args:
boto_session (boto3.session.Session): The underlying Boto3 session which AWS service calls
are delegated to (default: None). If not provided, one is created with default AWS configuration chain.
sagemaker_client (boto3.SageMaker.Client): Client which makes Amazon SageMaker service calls other
than ``InvokeEndpoint`` (default: None). Estimators created using this ``Session`` use this client.
If not provided, one will be created using this instance"s ``boto_session``.
sagemaker_runtime_client (boto3.SageMakerRuntime.Client): Client which makes ``InvokeEndpoint``
calls to Amazon SageMaker (default: None). Predictors created using this ``Session`` use this client.
If not provided, one will be created using this instance"s ``boto_session``.
self._default_bucket = None
sagemaker_config_file = os.path.join(os.path.expanduser("~"), ".sagemaker", "config.yaml")
if os.path.exists(sagemaker_config_file):
self.config = yaml.load(open(sagemaker_config_file, "r"))
else:
self.config = None
self._initialize(boto_session, sagemaker_client, sagemaker_runtime_client)
def _initialize(self, boto_session, sagemaker_client, sagemaker_runtime_client):
Initialize this SageMaker Session.