File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 13
13
from __future__ import absolute_import
14
14
15
15
import os
16
- import time
17
16
18
17
import pytest
19
18
import tests .integ
34
33
TRAINING_DATA = os .path .join (DATA_DIR , "iris_training.csv" )
35
34
TEST_DATA = os .path .join (DATA_DIR , "iris_test.csv" )
36
35
PROBLEM_TYPE = "MultiClassClassification"
37
- JOB_NAME = "auto-ml-{}" . format ( time . strftime ( "%y%m%d-%H%M%S" ))
36
+ BASE_JOB_NAME = "auto-ml"
38
37
39
38
# use a succeeded AutoML job to test describe and list candidates method, otherwise tests will run too long
40
39
AUTO_ML_JOB_NAME = "python-sdk-integ-test-base-job"
@@ -119,11 +118,11 @@ def test_auto_ml_fit_optional_args(sagemaker_session):
119
118
)
120
119
inputs = TRAINING_DATA
121
120
with timeout (minutes = AUTO_ML_DEFAULT_TIMEMOUT_MINUTES ):
122
- auto_ml .fit (inputs , job_name = JOB_NAME )
121
+ auto_ml .fit (inputs , job_name = unique_name_from_base ( BASE_JOB_NAME ) )
123
122
124
- auto_ml_desc = auto_ml .describe_auto_ml_job (job_name = JOB_NAME )
123
+ auto_ml_desc = auto_ml .describe_auto_ml_job (job_name = auto_ml . latest_auto_ml_job . job_name )
125
124
assert auto_ml_desc ["AutoMLJobStatus" ] == "Completed"
126
- assert auto_ml_desc ["AutoMLJobName" ] == JOB_NAME
125
+ assert auto_ml_desc ["AutoMLJobName" ] == auto_ml . latest_auto_ml_job . job_name
127
126
assert auto_ml_desc ["AutoMLJobObjective" ] == job_objective
128
127
assert auto_ml_desc ["ProblemType" ] == problem_type
129
128
assert auto_ml_desc ["OutputDataConfig" ]["S3OutputPath" ] == output_path
You can’t perform that action at this time.
0 commit comments