@@ -3192,7 +3192,9 @@ def test_create_model_from_job_with_vpc_config_override(sagemaker_session):
3192
3192
3193
3193
def test_endpoint_from_production_variants (sagemaker_session ):
3194
3194
ims = sagemaker_session
3195
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3195
+ ims .sagemaker_client .describe_endpoint = Mock (
3196
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3197
+ )
3196
3198
pvs = [
3197
3199
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
3198
3200
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -3487,7 +3489,7 @@ def test_endpoint_from_production_variants_with_sagemaker_config_injection(
3487
3489
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT_CONFIG
3488
3490
3489
3491
sagemaker_session .sagemaker_client .describe_endpoint = Mock (
3490
- return_value = {"EndpointStatus" : "InService" }
3492
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3491
3493
)
3492
3494
pvs = [
3493
3495
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
@@ -3555,7 +3557,7 @@ def test_endpoint_from_production_variants_with_sagemaker_config_injection_parti
3555
3557
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT_CONFIG
3556
3558
3557
3559
sagemaker_session .sagemaker_client .describe_endpoint = Mock (
3558
- return_value = {"EndpointStatus" : "InService" }
3560
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3559
3561
)
3560
3562
pvs = [
3561
3563
sagemaker .production_variant ("A" , "ml.g5.xlarge" ),
@@ -3619,7 +3621,7 @@ def test_endpoint_from_production_variants_with_sagemaker_config_injection_no_km
3619
3621
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT_CONFIG
3620
3622
3621
3623
sagemaker_session .sagemaker_client .describe_endpoint = Mock (
3622
- return_value = {"EndpointStatus" : "InService" }
3624
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3623
3625
)
3624
3626
pvs = [
3625
3627
sagemaker .production_variant ("A" , "ml.g5.xlarge" ),
@@ -3726,7 +3728,9 @@ def test_create_endpoint_config_with_explainer_config(sagemaker_session):
3726
3728
3727
3729
def test_endpoint_from_production_variants_with_tags (sagemaker_session ):
3728
3730
ims = sagemaker_session
3729
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3731
+ ims .sagemaker_client .describe_endpoint = Mock (
3732
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3733
+ )
3730
3734
pvs = [
3731
3735
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
3732
3736
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -3757,7 +3761,9 @@ def test_endpoint_from_production_variants_with_combined_sagemaker_config_inject
3757
3761
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT_ENDPOINT_CONFIG_COMBINED
3758
3762
3759
3763
ims = sagemaker_session
3760
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3764
+ ims .sagemaker_client .describe_endpoint = Mock (
3765
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3766
+ )
3761
3767
pvs = [
3762
3768
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
3763
3769
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -3801,7 +3807,9 @@ def test_endpoint_from_production_variants_with_sagemaker_config_injection_tags(
3801
3807
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT
3802
3808
3803
3809
ims = sagemaker_session
3804
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3810
+ ims .sagemaker_client .describe_endpoint = Mock (
3811
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3812
+ )
3805
3813
pvs = [
3806
3814
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
3807
3815
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -3830,7 +3838,9 @@ def test_endpoint_from_production_variants_with_sagemaker_config_injection_tags(
3830
3838
3831
3839
def test_endpoint_from_production_variants_with_accelerator_type (sagemaker_session ):
3832
3840
ims = sagemaker_session
3833
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3841
+ ims .sagemaker_client .describe_endpoint = Mock (
3842
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3843
+ )
3834
3844
pvs = [
3835
3845
sagemaker .production_variant ("A" , "ml.p2.xlarge" , accelerator_type = ACCELERATOR_TYPE ),
3836
3846
sagemaker .production_variant ("B" , "p299.4096xlarge" , accelerator_type = ACCELERATOR_TYPE ),
@@ -3861,7 +3871,9 @@ def test_endpoint_from_production_variants_with_accelerator_type_sagemaker_confi
3861
3871
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT
3862
3872
3863
3873
ims = sagemaker_session
3864
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3874
+ ims .sagemaker_client .describe_endpoint = Mock (
3875
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3876
+ )
3865
3877
pvs = [
3866
3878
sagemaker .production_variant ("A" , "ml.p2.xlarge" , accelerator_type = ACCELERATOR_TYPE ),
3867
3879
sagemaker .production_variant ("B" , "p299.4096xlarge" , accelerator_type = ACCELERATOR_TYPE ),
@@ -3892,7 +3904,9 @@ def test_endpoint_from_production_variants_with_serverless_inference_config(
3892
3904
sagemaker_session ,
3893
3905
):
3894
3906
ims = sagemaker_session
3895
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3907
+ ims .sagemaker_client .describe_endpoint = Mock (
3908
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3909
+ )
3896
3910
pvs = [
3897
3911
sagemaker .production_variant (
3898
3912
"A" , "ml.p2.xlarge" , serverless_inference_config = SERVERLESS_INFERENCE_CONFIG
@@ -3929,7 +3943,9 @@ def test_endpoint_from_production_variants_with_serverless_inference_config_sage
3929
3943
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT
3930
3944
3931
3945
ims = sagemaker_session
3932
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3946
+ ims .sagemaker_client .describe_endpoint = Mock (
3947
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3948
+ )
3933
3949
pvs = [
3934
3950
sagemaker .production_variant (
3935
3951
"A" , "ml.p2.xlarge" , serverless_inference_config = SERVERLESS_INFERENCE_CONFIG
@@ -3964,7 +3980,9 @@ def test_endpoint_from_production_variants_with_serverless_inference_config_sage
3964
3980
3965
3981
def test_endpoint_from_production_variants_with_async_config (sagemaker_session ):
3966
3982
ims = sagemaker_session
3967
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
3983
+ ims .sagemaker_client .describe_endpoint = Mock (
3984
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
3985
+ )
3968
3986
pvs = [
3969
3987
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
3970
3988
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -4000,7 +4018,9 @@ def test_endpoint_from_production_variants_with_async_config_sagemaker_config_in
4000
4018
sagemaker_session .sagemaker_config = SAGEMAKER_CONFIG_ENDPOINT
4001
4019
4002
4020
ims = sagemaker_session
4003
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
4021
+ ims .sagemaker_client .describe_endpoint = Mock (
4022
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
4023
+ )
4004
4024
pvs = [
4005
4025
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
4006
4026
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -4037,7 +4057,9 @@ def test_endpoint_from_production_variants_with_clarify_explainer_config(
4037
4057
sagemaker_session ,
4038
4058
):
4039
4059
ims = sagemaker_session
4040
- ims .sagemaker_client .describe_endpoint = Mock (return_value = {"EndpointStatus" : "InService" })
4060
+ ims .sagemaker_client .describe_endpoint = Mock (
4061
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
4062
+ )
4041
4063
pvs = [
4042
4064
sagemaker .production_variant ("A" , "ml.p2.xlarge" ),
4043
4065
sagemaker .production_variant ("B" , "p299.4096xlarge" ),
@@ -4069,7 +4091,7 @@ def test_endpoint_from_production_variants_with_clarify_explainer_config(
4069
4091
4070
4092
def test_update_endpoint_succeed (sagemaker_session ):
4071
4093
sagemaker_session .sagemaker_client .describe_endpoint = Mock (
4072
- return_value = {"EndpointStatus" : "InService" }
4094
+ return_value = {"EndpointStatus" : "InService" , "EndpointArn" : "arn:aws:sagemaker:" }
4073
4095
)
4074
4096
endpoint_name = "some-endpoint"
4075
4097
endpoint_config = "some-endpoint-config"
@@ -4079,7 +4101,7 @@ def test_update_endpoint_succeed(sagemaker_session):
4079
4101
4080
4102
def test_update_endpoint_no_wait (sagemaker_session ):
4081
4103
sagemaker_session .sagemaker_client .describe_endpoint = Mock (
4082
- return_value = {"EndpointStatus" : "Updating" }
4104
+ return_value = {"EndpointStatus" : "Updating" , "EndpointArn" : "arn:aws:sagemaker:" }
4083
4105
)
4084
4106
endpoint_name = "some-endpoint"
4085
4107
endpoint_config = "some-endpoint-config"
@@ -6136,7 +6158,10 @@ def test_upload_data_default_bucket_and_prefix_combinations(
6136
6158
6137
6159
def test_is_inference_component_based_endpoint_affirmative (sagemaker_session ):
6138
6160
6139
- describe_endpoint_response = {"EndpointConfigName" : "some-endpoint-config" }
6161
+ describe_endpoint_response = {
6162
+ "EndpointConfigName" : "some-endpoint-config" ,
6163
+ "EndpointArn" : "arn:aws:sagemaker:" ,
6164
+ }
6140
6165
describe_endpoint_config_response = {
6141
6166
"ExecutionRoleArn" : "some-role-arn" ,
6142
6167
"ProductionVariants" : [{"VariantName" : "AllTraffic" }],
@@ -6160,7 +6185,10 @@ def test_is_inference_component_based_endpoint_affirmative(sagemaker_session):
6160
6185
6161
6186
def test_is_inference_component_based_endpoint_negative_no_role (sagemaker_session ):
6162
6187
6163
- describe_endpoint_response = {"EndpointConfigName" : "some-endpoint-config" }
6188
+ describe_endpoint_response = {
6189
+ "EndpointConfigName" : "some-endpoint-config" ,
6190
+ "EndpointArn" : "arn:aws:sagemaker:" ,
6191
+ }
6164
6192
describe_endpoint_config_response = {
6165
6193
"ProductionVariants" : [{"VariantName" : "AllTraffic" }],
6166
6194
}
@@ -6183,7 +6211,10 @@ def test_is_inference_component_based_endpoint_negative_no_role(sagemaker_sessio
6183
6211
6184
6212
def test_is_inference_component_based_endpoint_positive_multiple_variants (sagemaker_session ):
6185
6213
6186
- describe_endpoint_response = {"EndpointConfigName" : "some-endpoint-config" }
6214
+ describe_endpoint_response = {
6215
+ "EndpointConfigName" : "some-endpoint-config" ,
6216
+ "EndpointArn" : "arn:aws:sagemaker:" ,
6217
+ }
6187
6218
describe_endpoint_config_response = {
6188
6219
"ExecutionRoleArn" : "some-role-arn" ,
6189
6220
"ProductionVariants" : [{"VariantName" : "AllTraffic1" }, {"VariantName" : "AllTraffic2" }],
@@ -6207,7 +6238,10 @@ def test_is_inference_component_based_endpoint_positive_multiple_variants(sagema
6207
6238
6208
6239
def test_is_inference_component_based_endpoint_negative_no_variants (sagemaker_session ):
6209
6240
6210
- describe_endpoint_response = {"EndpointConfigName" : "some-endpoint-config" }
6241
+ describe_endpoint_response = {
6242
+ "EndpointConfigName" : "some-endpoint-config" ,
6243
+ "EndpointArn" : "arn:aws:sagemaker:" ,
6244
+ }
6211
6245
describe_endpoint_config_response = {
6212
6246
"ExecutionRoleArn" : "some-role-arn" ,
6213
6247
"ProductionVariants" : [],
@@ -6231,7 +6265,10 @@ def test_is_inference_component_based_endpoint_negative_no_variants(sagemaker_se
6231
6265
6232
6266
def test_is_inference_component_based_endpoint_negative_model_name_present (sagemaker_session ):
6233
6267
6234
- describe_endpoint_response = {"EndpointConfigName" : "some-endpoint-config" }
6268
+ describe_endpoint_response = {
6269
+ "EndpointConfigName" : "some-endpoint-config" ,
6270
+ "EndpointArn" : "arn:aws:sagemaker:" ,
6271
+ }
6235
6272
describe_endpoint_config_response = {
6236
6273
"ExecutionRoleArn" : "some-role-arn" ,
6237
6274
"ProductionVariants" : [
0 commit comments