File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -574,15 +574,15 @@ def test_xgboost_airflow_config_uploads_data_source_to_s3(
574
574
def test_pytorch_airflow_config_uploads_data_source_to_s3_when_inputs_not_provided (
575
575
sagemaker_session ,
576
576
cpu_instance_type ,
577
- pytorch_training_latest_version ,
578
- pytorch_training_latest_py_version ,
577
+ pytorch_inference_latest_version ,
578
+ pytorch_inference_latest_py_version ,
579
579
):
580
580
with timeout (seconds = AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS ):
581
581
estimator = PyTorch (
582
582
entry_point = PYTORCH_MNIST_SCRIPT ,
583
583
role = ROLE ,
584
- framework_version = pytorch_training_latest_version ,
585
- py_version = pytorch_training_latest_py_version ,
584
+ framework_version = pytorch_inference_latest_version ,
585
+ py_version = pytorch_inference_latest_py_version ,
586
586
instance_count = 2 ,
587
587
instance_type = cpu_instance_type ,
588
588
hyperparameters = {"epochs" : 6 , "backend" : "gloo" },
Original file line number Diff line number Diff line change @@ -55,8 +55,26 @@ def fixture_training_job(
55
55
return pytorch .latest_training_job .name
56
56
57
57
58
+ @pytest .fixture (scope = "module" , name = "pytorch_training_job_with_latest_infernce_version" )
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 ,
64
+ ):
65
+ with timeout (minutes = TRAINING_DEFAULT_TIMEOUT_MINUTES ):
66
+ pytorch = _get_pytorch_estimator (
67
+ sagemaker_session ,
68
+ pytorch_inference_latest_version ,
69
+ pytorch_inference_latest_py_version ,
70
+ cpu_instance_type ,
71
+ )
72
+ pytorch .fit ({"training" : _upload_training_data (pytorch )})
73
+ return pytorch .latest_training_job .name
74
+
75
+
58
76
@pytest .mark .canary_quick
59
- def test_fit_deploy (pytorch_training_job , sagemaker_session , cpu_instance_type ):
77
+ def test_fit_deploy (pytorch_training_job_with_latest_infernce_version , sagemaker_session , cpu_instance_type ):
60
78
endpoint_name = "test-pytorch-sync-fit-attach-deploy{}" .format (sagemaker_timestamp ())
61
79
with timeout_and_delete_endpoint_by_name (endpoint_name , sagemaker_session ):
62
80
estimator = PyTorch .attach (pytorch_training_job , sagemaker_session = sagemaker_session )
You can’t perform that action at this time.
0 commit comments