Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

Specify a Bucket and Data Output Location

Specify the name of the Amazon S3 bucket where you want to store the output of the training jobs that the tuning job launches. The name of the bucket must contain sagemaker, and be globally unique. The bucket must be in the same AWS Region as the notebook instance that you use for this example. You can use the bucket that you created when you set up Amazon SageMaker, or you can create a new bucket. For information, see Step 1: Create an Amazon S3 Bucket.

Note
The name of the bucket doesn’t need to contain sagemaker if the role that you use to run the hyperparameter tuning job has a policy that gives the SageMaker service principle S3FullAccess permission.

prefix is the path within the bucket where Amazon SageMaker stores the output from training jobs.

bucket = 'sagemaker-MyBucket'                               # Replace with the name of your S3 bucket
prefix = 'sagemaker/DEMO-automatic-model-tuning-xgboost-dm'

Download, Prepare, and Upload Training Data