|
1 |
| -# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 1 | +# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
2 | 2 | #
|
3 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You
|
4 | 4 | # may not use this file except in compliance with the License. A copy of
|
@@ -60,7 +60,7 @@ def kmeans_train_set(sagemaker_session):
|
60 | 60 | def kmeans_estimator(sagemaker_session):
|
61 | 61 | kmeans = KMeans(role='SageMakerRole', train_instance_count=1,
|
62 | 62 | train_instance_type='ml.c4.xlarge',
|
63 |
| - k=10, sagemaker_session=sagemaker_session, base_job_name='tk', |
| 63 | + k=10, sagemaker_session=sagemaker_session, |
64 | 64 | output_path='s3://{}/'.format(sagemaker_session.default_bucket()))
|
65 | 65 | # set kmeans specific hp
|
66 | 66 | kmeans.init_method = 'random'
|
@@ -137,8 +137,9 @@ def test_tuning_kmeans(sagemaker_session,
|
137 | 137 | kmeans_train_set,
|
138 | 138 | kmeans_estimator,
|
139 | 139 | hyperparameter_ranges):
|
| 140 | + job_name = unique_name_from_base('test-tune-kmeans') |
140 | 141 | _tune_and_deploy(kmeans_estimator, kmeans_train_set, sagemaker_session,
|
141 |
| - hyperparameter_ranges=hyperparameter_ranges) |
| 142 | + hyperparameter_ranges=hyperparameter_ranges, job_name=job_name) |
142 | 143 |
|
143 | 144 |
|
144 | 145 | def test_tuning_kmeans_identical_dataset_algorithm_tuner_raw(sagemaker_session,
|
|
0 commit comments