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 1313from __future__ import absolute_import
1414
1515import os
16- import time
1716
1817import pytest
1918import tests .integ
3433TRAINING_DATA = os .path .join (DATA_DIR , "iris_training.csv" )
3534TEST_DATA = os .path .join (DATA_DIR , "iris_test.csv" )
3635PROBLEM_TYPE = "MultiClassClassification"
37- JOB_NAME = "auto-ml-{}" . format ( time . strftime ( "%y%m%d-%H%M%S" ))
36+ BASE_JOB_NAME = "auto-ml"
3837
3938# use a succeeded AutoML job to test describe and list candidates method, otherwise tests will run too long
4039AUTO_ML_JOB_NAME = "python-sdk-integ-test-base-job"
@@ -119,11 +118,11 @@ def test_auto_ml_fit_optional_args(sagemaker_session):
119118 )
120119 inputs = TRAINING_DATA
121120 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 ) )
123122
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 )
125124 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
127126 assert auto_ml_desc ["AutoMLJobObjective" ] == job_objective
128127 assert auto_ml_desc ["ProblemType" ] == problem_type
129128 assert auto_ml_desc ["OutputDataConfig" ]["S3OutputPath" ] == output_path
You can’t perform that action at this time.
0 commit comments