@@ -1234,47 +1234,6 @@ def assert_create_tuning_job_request(**kwrags):
1234
1234
)
1235
1235
1236
1236
1237
- def test_tune_with_strategy_config (sagemaker_session ):
1238
- def assert_create_tuning_job_request (** kwrags ):
1239
- assert (
1240
- kwrags ["HyperParameterTuningJobConfig" ]["StrategyConfig" ]["HyperbandStrategyConfig" ][
1241
- "MinResource"
1242
- ]
1243
- == SAMPLE_HYPERBAND_STRATEGY_CONFIG ["HyperbandStrategyConfig" ]["MinResource" ]
1244
- )
1245
- assert (
1246
- kwrags ["HyperParameterTuningJobConfig" ]["StrategyConfig" ]["HyperbandStrategyConfig" ][
1247
- "MaxResource"
1248
- ]
1249
- == SAMPLE_HYPERBAND_STRATEGY_CONFIG ["HyperbandStrategyConfig" ]["MaxResource" ]
1250
- )
1251
-
1252
- sagemaker_session .sagemaker_client .create_hyper_parameter_tuning_job .side_effect = (
1253
- assert_create_tuning_job_request
1254
- )
1255
- sagemaker_session .tune (
1256
- job_name = "dummy-tuning-1" ,
1257
- strategy = "Bayesian" ,
1258
- objective_type = "Maximize" ,
1259
- objective_metric_name = "val-score" ,
1260
- max_jobs = 100 ,
1261
- max_parallel_jobs = 5 ,
1262
- parameter_ranges = SAMPLE_PARAM_RANGES ,
1263
- static_hyperparameters = STATIC_HPs ,
1264
- image_uri = "dummy-image-1" ,
1265
- input_mode = "File" ,
1266
- metric_definitions = SAMPLE_METRIC_DEF ,
1267
- role = EXPANDED_ROLE ,
1268
- input_config = SAMPLE_INPUT ,
1269
- output_config = SAMPLE_OUTPUT ,
1270
- resource_config = RESOURCE_CONFIG ,
1271
- stop_condition = SAMPLE_STOPPING_CONDITION ,
1272
- tags = None ,
1273
- warm_start_config = None ,
1274
- strategy_config = SAMPLE_HYPERBAND_STRATEGY_CONFIG ,
1275
- )
1276
-
1277
-
1278
1237
def test_tune_with_encryption_flag (sagemaker_session ):
1279
1238
def assert_create_tuning_job_request (** kwrags ):
1280
1239
assert (
0 commit comments