@@ -1163,7 +1163,9 @@ def test_framework_with_disable_framework_metrics(sagemaker_session):
1163
1163
assert "profiler_rule_configs" not in args
1164
1164
1165
1165
1166
- def test_framework_with_disable_framework_metrics_and_update_system_metrics (sagemaker_session ,):
1166
+ def test_framework_with_disable_framework_metrics_and_update_system_metrics (
1167
+ sagemaker_session ,
1168
+ ):
1167
1169
f = DummyFramework (
1168
1170
entry_point = SCRIPT_PATH ,
1169
1171
role = ROLE ,
@@ -1183,7 +1185,9 @@ def test_framework_with_disable_framework_metrics_and_update_system_metrics(sage
1183
1185
assert "profiler_rule_configs" not in args
1184
1186
1185
1187
1186
- def test_framework_with_disable_framework_metrics_and_update_framework_params (sagemaker_session ,):
1188
+ def test_framework_with_disable_framework_metrics_and_update_framework_params (
1189
+ sagemaker_session ,
1190
+ ):
1187
1191
with pytest .raises (ValueError ) as error :
1188
1192
f = DummyFramework (
1189
1193
entry_point = SCRIPT_PATH ,
@@ -3753,7 +3757,6 @@ def test_prepare_init_params_from_job_description_with_training_image_config():
3753
3757
3754
3758
3755
3759
def test_prepare_init_params_from_job_description_with_invalid_training_job ():
3756
-
3757
3760
invalid_job_description = RETURNED_JOB_DESCRIPTION .copy ()
3758
3761
invalid_job_description ["AlgorithmSpecification" ] = {"TrainingInputMode" : "File" }
3759
3762
@@ -3805,7 +3808,9 @@ def test_prepare_for_training_with_name_based_on_algorithm(sagemaker_session):
3805
3808
3806
3809
3807
3810
@patch ("sagemaker.workflow.utilities._pipeline_config" , MOCKED_PIPELINE_CONFIG )
3808
- def test_prepare_for_training_with_pipeline_name_in_s3_path_no_source_dir (pipeline_session ,):
3811
+ def test_prepare_for_training_with_pipeline_name_in_s3_path_no_source_dir (
3812
+ pipeline_session ,
3813
+ ):
3809
3814
# script_uri is NOT provided -> use new cache key behavior that builds path using pipeline name + code_hash
3810
3815
image_uri = "763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-training:1.9.0-gpu-py38"
3811
3816
model_uri = "s3://someprefix2/models/model.tar.gz"
@@ -3993,7 +3998,6 @@ def test_script_mode_estimator(patched_stage_user_code, sagemaker_session):
3993
3998
def test_script_mode_estimator_same_calls_as_framework (
3994
3999
patched_tar_and_upload_dir , sagemaker_session
3995
4000
):
3996
-
3997
4001
patched_tar_and_upload_dir .return_value = UploadedCode (
3998
4002
s3_prefix = "s3://%s/%s" % ("bucket" , "key" ), script_name = "script_name"
3999
4003
)
@@ -4253,7 +4257,6 @@ def test_script_mode_estimator_tags_jumpstart_models_with_no_estimator_js_tags(
4253
4257
def test_all_framework_estimators_add_jumpstart_tags (
4254
4258
patched_repack_model , patched_upload_code , patched_tar_and_upload_dir , sagemaker_session
4255
4259
):
4256
-
4257
4260
sagemaker_session .boto_region_name = REGION
4258
4261
sagemaker_session .sagemaker_client .describe_training_job .return_value = {
4259
4262
"ModelArtifacts" : {"S3ModelArtifacts" : "some-uri" }
@@ -4286,7 +4289,7 @@ def test_all_framework_estimators_add_jumpstart_tags(
4286
4289
}
4287
4290
jumpstart_model_uri = f"s3://{ list (JUMPSTART_BUCKET_NAME_SET )[0 ]} /model_dirs/model.tar.gz"
4288
4291
jumpstart_model_uri_2 = f"s3://{ list (JUMPSTART_BUCKET_NAME_SET )[1 ]} /model_dirs/model.tar.gz"
4289
- for ( framework_estimator_class , kwargs ) in framework_estimator_classes_to_kwargs .items ():
4292
+ for framework_estimator_class , kwargs in framework_estimator_classes_to_kwargs .items ():
4290
4293
estimator = framework_estimator_class (
4291
4294
entry_point = ENTRY_POINT ,
4292
4295
role = ROLE ,
@@ -4392,7 +4395,6 @@ def test_script_mode_estimator_uses_jumpstart_base_name_with_js_models(
4392
4395
def test_all_framework_estimators_add_jumpstart_base_name (
4393
4396
patched_repack_model , patched_upload_code , patched_tar_and_upload_dir , sagemaker_session
4394
4397
):
4395
-
4396
4398
sagemaker_session .boto_region_name = REGION
4397
4399
sagemaker_session .sagemaker_client .describe_training_job .return_value = {
4398
4400
"ModelArtifacts" : {"S3ModelArtifacts" : "some-uri" }
@@ -4425,7 +4427,7 @@ def test_all_framework_estimators_add_jumpstart_base_name(
4425
4427
}
4426
4428
jumpstart_model_uri = f"s3://{ list (JUMPSTART_BUCKET_NAME_SET )[0 ]} /model_dirs/model.tar.gz"
4427
4429
jumpstart_model_uri_2 = f"s3://{ list (JUMPSTART_BUCKET_NAME_SET )[1 ]} /model_dirs/model.tar.gz"
4428
- for ( framework_estimator_class , kwargs ) in framework_estimator_classes_to_kwargs .items ():
4430
+ for framework_estimator_class , kwargs in framework_estimator_classes_to_kwargs .items ():
4429
4431
estimator = framework_estimator_class (
4430
4432
entry_point = ENTRY_POINT ,
4431
4433
role = ROLE ,
0 commit comments