Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 76 additions & 2 deletions src/sagemaker/image_uri_config/pytorch.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"1.11": "1.11.0",
"1.12": "1.12.1",
"1.13": "1.13.1",
"2.0": "2.0.0"
"2.0": "2.0.1"
},
"versions": {
"0.4.0": {
Expand Down Expand Up @@ -893,6 +893,44 @@
"us-west-2": "763104351884"
},
"repository": "pytorch-inference"
},
"2.0.1": {
"py_versions": [
"py310"
],
"registries": {
"af-south-1": "626614931356",
"il-central-1": "780543022126",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"cn-north-1": "727897471807",
"cn-northwest-1": "727897471807",
"eu-central-1": "763104351884",
"eu-north-1": "763104351884",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"eu-south-1": "692866216735",
"me-south-1": "217643126080",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-gov-east-1": "446045086412",
"us-gov-west-1": "442386744353",
"us-iso-east-1": "886529160074",
"us-isob-east-1": "094389454867",
"us-west-1": "763104351884",
"us-west-2": "763104351884"
},
"repository": "pytorch-inference"
}
}
},
Expand All @@ -902,7 +940,7 @@
],
"version_aliases": {
"1.12": "1.12.1",
"2.0": "2.0.0"
"2.0": "2.0.1"
},
"versions": {
"1.12.1": {
Expand Down Expand Up @@ -982,6 +1020,42 @@
},
"repository": "pytorch-inference-graviton",
"container_version": {"cpu": "ubuntu20.04"}
},
"2.0.1": {
"py_versions": [
"py310"
],
"registries": {
"af-south-1": "626614931356",
"il-central-1": "780543022126",
"ap-east-1": "871362719292",
"ap-northeast-1": "763104351884",
"ap-northeast-2": "763104351884",
"ap-northeast-3": "364406365360",
"ap-south-1": "763104351884",
"ap-south-2": "772153158452",
"ap-southeast-1": "763104351884",
"ap-southeast-2": "763104351884",
"ap-southeast-3": "907027046896",
"ap-southeast-4": "457447274322",
"ca-central-1": "763104351884",
"eu-central-1": "763104351884",
"eu-central-2": "380420809688",
"eu-north-1": "763104351884",
"eu-west-1": "763104351884",
"eu-west-2": "763104351884",
"eu-west-3": "763104351884",
"eu-south-1": "692866216735",
"eu-south-2": "503227376785",
"me-south-1": "217643126080",
"sa-east-1": "763104351884",
"us-east-1": "763104351884",
"us-east-2": "763104351884",
"us-west-1": "763104351884",
"us-west-2": "763104351884"
},
"repository": "pytorch-inference-graviton",
"container_version": {"cpu": "ubuntu20.04"}
}
}
},
Expand Down
5 changes: 5 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ def pytorch_inference_py_version(pytorch_inference_version, request):
return request.param


@pytest.fixture(scope="module", params=["py2", "py3"])
def pytorch_inference_latest_major_minor(pytorch_inference_latest_version, request):
return f"{Version(pytorch_inference_latest_version).major}.{Version(pytorch_inference_latest_version).minor}"


@pytest.fixture(scope="module")
def huggingface_pytorch_training_version(huggingface_training_version):
return _huggingface_base_fm_version(
Expand Down
4 changes: 2 additions & 2 deletions tests/integ/test_airflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,14 @@ def test_xgboost_airflow_config_uploads_data_source_to_s3(
def test_pytorch_airflow_config_uploads_data_source_to_s3_when_inputs_not_provided(
sagemaker_session,
cpu_instance_type,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
with timeout(seconds=AIRFLOW_CONFIG_TIMEOUT_IN_SECONDS):
estimator = PyTorch(
entry_point=PYTORCH_MNIST_SCRIPT,
role=ROLE,
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
instance_count=2,
instance_type=cpu_instance_type,
Expand Down
6 changes: 4 additions & 2 deletions tests/integ/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@

@pytest.mark.local_mode
def test_github(
sagemaker_local_session, pytorch_inference_latest_version, pytorch_inference_latest_py_version
sagemaker_local_session,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
script_path = "mnist.py"
git_config = {"repo": GIT_REPO, "branch": BRANCH, "commit": COMMIT}
Expand All @@ -60,7 +62,7 @@ def test_github(
entry_point=script_path,
role="SageMakerRole",
source_dir="pytorch",
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
instance_count=1,
instance_type="local",
Expand Down
22 changes: 12 additions & 10 deletions tests/integ/test_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def fixture_training_job(
@pytest.fixture(scope="module", name="pytorch_training_job_with_latest_infernce_version")
def fixture_training_job_with_latest_inference_version(
sagemaker_session,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
cpu_instance_type,
):
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
pytorch = _get_pytorch_estimator(
sagemaker_session,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
cpu_instance_type,
)
Expand Down Expand Up @@ -148,12 +148,14 @@ def test_fit_deploy(

@pytest.mark.local_mode
def test_local_fit_deploy(
sagemaker_local_session, pytorch_inference_latest_version, pytorch_inference_latest_py_version
sagemaker_local_session,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
pytorch = PyTorch(
entry_point=MNIST_SCRIPT,
role="SageMakerRole",
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
instance_count=1,
instance_type="local",
Expand All @@ -177,7 +179,7 @@ def test_deploy_model(
pytorch_training_job,
sagemaker_session,
cpu_instance_type,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
endpoint_name = unique_name_from_base("test-pytorch-deploy-model")
Expand All @@ -191,7 +193,7 @@ def test_deploy_model(
model_data,
"SageMakerRole",
entry_point=MNIST_SCRIPT,
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
sagemaker_session=sagemaker_session,
)
Expand All @@ -207,7 +209,7 @@ def test_deploy_model(
def test_deploy_packed_model_with_entry_point_name(
sagemaker_session,
cpu_instance_type,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
endpoint_name = unique_name_from_base("test-pytorch-deploy-model")
Expand All @@ -218,7 +220,7 @@ def test_deploy_packed_model_with_entry_point_name(
model_data,
"SageMakerRole",
entry_point="mnist.py",
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
sagemaker_session=sagemaker_session,
)
Expand Down Expand Up @@ -269,7 +271,7 @@ def test_deploy_model_with_serverless_inference_config(
pytorch_training_job,
sagemaker_session,
cpu_instance_type,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
endpoint_name = unique_name_from_base("test-pytorch-deploy-model-serverless")
Expand All @@ -283,7 +285,7 @@ def test_deploy_model_with_serverless_inference_config(
model_data,
"SageMakerRole",
entry_point=MNIST_SCRIPT,
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
sagemaker_session=sagemaker_session,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/integ/test_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def test_attach_transform_kmeans(sagemaker_session, cpu_instance_type):

def test_transform_pytorch_vpc_custom_model_bucket(
sagemaker_session,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
cpu_instance_type,
custom_bucket_name,
Expand All @@ -338,7 +338,7 @@ def test_transform_pytorch_vpc_custom_model_bucket(
model_data=model_data,
entry_point=os.path.join(data_dir, "mnist.py"),
role="SageMakerRole",
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
sagemaker_session=sagemaker_session,
vpc_config={"Subnets": subnet_ids, "SecurityGroupIds": [security_group_id]},
Expand Down
4 changes: 2 additions & 2 deletions tests/integ/test_tuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ def test_tuning_chainer(
def test_attach_tuning_pytorch(
sagemaker_session,
cpu_instance_type,
pytorch_inference_latest_version,
pytorch_inference_latest_major_minor,
pytorch_inference_latest_py_version,
):
mnist_dir = os.path.join(DATA_DIR, "pytorch_mnist")
Expand All @@ -868,7 +868,7 @@ def test_attach_tuning_pytorch(
entry_point=mnist_script,
role="SageMakerRole",
instance_count=1,
framework_version=pytorch_inference_latest_version,
framework_version=pytorch_inference_latest_major_minor,
py_version=pytorch_inference_latest_py_version,
instance_type=cpu_instance_type,
sagemaker_session=sagemaker_session,
Expand Down