2424from sagemaker import AlgorithmEstimator , ModelPackage
2525from sagemaker .serializers import CSVSerializer
2626from sagemaker .tuner import IntegerParameter , HyperparameterTuner
27- from sagemaker .utils import sagemaker_timestamp
28- from sagemaker .utils import _aws_partition
27+ from sagemaker .utils import sagemaker_timestamp , _aws_partition , unique_name_from_base
2928from tests .integ import DATA_DIR
3029from tests .integ .timeout import timeout , timeout_and_delete_endpoint_by_name
3130from tests .integ .marketplace_utils import REGION_ACCOUNT_MAP
@@ -117,7 +116,7 @@ def test_marketplace_attach(sagemaker_session, cpu_instance_type):
117116 instance_count = 1 ,
118117 instance_type = cpu_instance_type ,
119118 sagemaker_session = sagemaker_session ,
120- base_job_name = "test-marketplace" ,
119+ base_job_name = unique_name_from_base ( "test-marketplace" ) ,
121120 )
122121
123122 train_input = mktplace .sagemaker_session .upload_data (
@@ -205,7 +204,7 @@ def test_marketplace_tuning_job(sagemaker_session, cpu_instance_type):
205204 instance_count = 1 ,
206205 instance_type = cpu_instance_type ,
207206 sagemaker_session = sagemaker_session ,
208- base_job_name = "test-marketplace" ,
207+ base_job_name = unique_name_from_base ( "test-marketplace" ) ,
209208 )
210209
211210 train_input = mktplace .sagemaker_session .upload_data (
@@ -218,7 +217,7 @@ def test_marketplace_tuning_job(sagemaker_session, cpu_instance_type):
218217
219218 tuner = HyperparameterTuner (
220219 estimator = mktplace ,
221- base_tuning_job_name = "byo" ,
220+ base_tuning_job_name = unique_name_from_base ( "byo" ) ,
222221 objective_metric_name = "validation:accuracy" ,
223222 hyperparameter_ranges = hyperparameter_ranges ,
224223 max_jobs = 2 ,
@@ -248,7 +247,7 @@ def test_marketplace_transform_job(sagemaker_session, cpu_instance_type):
248247 instance_count = 1 ,
249248 instance_type = cpu_instance_type ,
250249 sagemaker_session = sagemaker_session ,
251- base_job_name = "test-marketplace" ,
250+ base_job_name = unique_name_from_base ( "test-marketplace" ) ,
252251 )
253252
254253 train_input = algo .sagemaker_session .upload_data (
0 commit comments