@@ -57,10 +57,10 @@ def fixture_training_job(
57
57
58
58
@pytest .fixture (scope = "module" , name = "pytorch_training_job_with_latest_infernce_version" )
59
59
def fixture_training_job_with_latest_inference_version (
60
- sagemaker_session ,
61
- pytorch_inference_latest_version ,
62
- pytorch_inference_latest_py_version ,
63
- cpu_instance_type ,
60
+ sagemaker_session ,
61
+ pytorch_inference_latest_version ,
62
+ pytorch_inference_latest_py_version ,
63
+ cpu_instance_type ,
64
64
):
65
65
with timeout (minutes = TRAINING_DEFAULT_TIMEOUT_MINUTES ):
66
66
pytorch = _get_pytorch_estimator (
@@ -74,10 +74,14 @@ def fixture_training_job_with_latest_inference_version(
74
74
75
75
76
76
@pytest .mark .canary_quick
77
- def test_fit_deploy (pytorch_training_job_with_latest_infernce_version , sagemaker_session , cpu_instance_type ):
77
+ def test_fit_deploy (
78
+ pytorch_training_job_with_latest_infernce_version , sagemaker_session , cpu_instance_type
79
+ ):
78
80
endpoint_name = "test-pytorch-sync-fit-attach-deploy{}" .format (sagemaker_timestamp ())
79
81
with timeout_and_delete_endpoint_by_name (endpoint_name , sagemaker_session ):
80
- estimator = PyTorch .attach (pytorch_training_job , sagemaker_session = sagemaker_session )
82
+ estimator = PyTorch .attach (
83
+ pytorch_training_job_with_latest_infernce_version , sagemaker_session = sagemaker_session
84
+ )
81
85
predictor = estimator .deploy (1 , cpu_instance_type , endpoint_name = endpoint_name )
82
86
data = numpy .zeros (shape = (1 , 1 , 28 , 28 ), dtype = numpy .float32 )
83
87
predictor .predict (data )
0 commit comments