3636)
3737from tests .integ .sagemaker .jumpstart .utils import (
3838 get_sm_session ,
39- get_training_dataset_for_model_and_version
39+ get_training_dataset_for_model_and_version ,
4040)
4141
4242from sagemaker .jumpstart .utils import get_jumpstart_content_bucket
@@ -81,13 +81,13 @@ def test_jumpstart_hub_estimator(setup, add_model_references):
8181 )
8282
8383 estimator .fit (
84- inputs = {
84+ inputs = {
8585 "training" : f"s3://{ get_jumpstart_content_bucket (JUMPSTART_DEFAULT_REGION_NAME )} /"
8686 f"{ get_training_dataset_for_model_and_version (model_id , model_version )} " ,
8787 }
8888 )
8989
90- # test that we can create a JumpStartEstimator from existing job with `attach`
90+ # test that we can create a JumpStartEstimator from existing job with `attach`
9191 estimator = JumpStartEstimator .attach (
9292 training_job_name = estimator .latest_training_job .name ,
9393 model_id = model_id ,
@@ -121,14 +121,13 @@ def test_jumpstart_hub_estimator_with_default_session(setup, add_model_reference
121121 )
122122
123123 estimator .fit (
124- inputs = {
124+ inputs = {
125125 "training" : f"s3://{ get_jumpstart_content_bucket (JUMPSTART_DEFAULT_REGION_NAME )} /"
126126 f"{ get_training_dataset_for_model_and_version (model_id , model_version )} " ,
127127 }
128128 )
129129
130-
131- # test that we can create a JumpStartEstimator from existing job with `attach`
130+ # test that we can create a JumpStartEstimator from existing job with `attach`
132131 estimator = JumpStartEstimator .attach (
133132 training_job_name = estimator .latest_training_job .name ,
134133 model_id = model_id ,
@@ -138,7 +137,7 @@ def test_jumpstart_hub_estimator_with_default_session(setup, add_model_reference
138137 # uses ml.p3.2xlarge instance
139138 predictor = estimator .deploy (
140139 tags = [{"Key" : JUMPSTART_TAG , "Value" : os .environ [ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID ]}],
141- role = get_sm_session ().get_caller_identity_arn ()
140+ role = get_sm_session ().get_caller_identity_arn (),
142141 )
143142
144143 response = predictor .predict (["hello" , "world" ])
@@ -159,10 +158,10 @@ def test_jumpstart_hub_gated_estimator_with_eula(setup, add_model_references):
159158
160159 estimator .fit (
161160 accept_eula = True ,
162- inputs = {
161+ inputs = {
163162 "training" : f"s3://{ get_jumpstart_content_bucket (JUMPSTART_DEFAULT_REGION_NAME )} /"
164163 f"{ get_training_dataset_for_model_and_version (model_id , model_version )} " ,
165- }
164+ },
166165 )
167166
168167 estimator = JumpStartEstimator .attach (
@@ -196,14 +195,13 @@ def test_jumpstart_hub_gated_estimator_without_eula(setup, add_model_references)
196195 )
197196 with pytest .raises (Exception ):
198197 estimator .fit (
199- inputs = {
198+ inputs = {
200199 "training" : f"s3://{ get_jumpstart_content_bucket (JUMPSTART_DEFAULT_REGION_NAME )} /"
201200 f"{ get_training_dataset_for_model_and_version (model_id , model_version )} " ,
202201 }
203202 )
204203
205204
206-
207205def test_instantiating_estimator (setup , add_model_references ):
208206
209207 model_id = "catboost-regression-model"
0 commit comments