diff --git a/src/sagemaker/image_uri_config/autogluon.json b/src/sagemaker/image_uri_config/autogluon.json index a5576f30e4..40d7e1fdfb 100644 --- a/src/sagemaker/image_uri_config/autogluon.json +++ b/src/sagemaker/image_uri_config/autogluon.json @@ -3,7 +3,7 @@ "processors": ["cpu", "gpu"], "version_aliases": { "0.3": "0.3.2", - "0.4": "0.4.0" + "0.4": "0.4.2" }, "versions": { "0.3.1": { @@ -92,14 +92,42 @@ }, "repository": "autogluon-training", "py_versions": ["py38"] + }, + "0.4.2": { + "registries": { + "af-south-1": "626614931356", + "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", + "ca-central-1": "763104351884", + "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-west-1": "442386744353", + "us-iso-east-1": "886529160074", + "us-west-1": "763104351884", + "us-west-2": "763104351884" + }, + "repository": "autogluon-training", + "py_versions": ["py38"] } } }, "inference": { - "processors": ["cpu"], "version_aliases": { "0.3": "0.3.2", - "0.4": "0.4.0" + "0.4": "0.4.2" }, "versions": { "0.3.1": { @@ -131,6 +159,7 @@ "us-west-2": "763104351884" }, "repository": "autogluon-inference", + "processors": ["cpu"], "py_versions": ["py37"] }, "0.3.2": { @@ -162,6 +191,7 @@ "us-west-2": "763104351884" }, "repository": "autogluon-inference", + "processors": ["cpu"], "py_versions": ["py38"] }, "0.4.0": { @@ -193,6 +223,39 @@ "us-west-2": "763104351884" }, "repository": "autogluon-inference", + "processors": ["cpu"], + "py_versions": ["py38"] + }, + "0.4.2": { + "registries": { + "af-south-1": "626614931356", + "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", + "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-west-1": "442386744353", + "us-iso-east-1": "886529160074", + "us-west-1": "763104351884", + "us-west-2": "763104351884" + }, + "repository": "autogluon-inference", + "processors": ["cpu", "gpu"], "py_versions": ["py38"] } } diff --git a/tests/unit/sagemaker/image_uris/test_autogluon.py b/tests/unit/sagemaker/image_uris/test_autogluon.py index 02c3b657b6..8ce12ec670 100644 --- a/tests/unit/sagemaker/image_uris/test_autogluon.py +++ b/tests/unit/sagemaker/image_uris/test_autogluon.py @@ -42,30 +42,53 @@ "us-west-1": "763104351884", "us-west-2": "763104351884", } -VERSIONS = ["0.3.1", "0.3.2", "0.4.0", "0.3", "0.4"] +VERSIONS = ["0.3.1", "0.3.2", "0.4.0", "0.4.2", "0.3", "0.4"] +SCOPES = ["training", "inference"] +PROCESSORS = ["cpu", "gpu"] @pytest.mark.parametrize("version", VERSIONS) -def test_valid_uris(version): +@pytest.mark.parametrize("scope", SCOPES) +@pytest.mark.parametrize("processor", PROCESSORS) +def test_valid_uris_training(version, scope, processor): + instance_type = "ml.c4.xlarge" if processor == "cpu" else "ml.p2.xlarge" py_version = "py37" if version == "0.3.1" else "py38" - for region in ACCOUNTS.keys(): - uri = image_uris.retrieve( - "autogluon", - region=region, - version=version, - py_version=py_version, - image_scope="training", - instance_type="ml.c4.xlarge", - ) + if ( + scope == "inference" + and processor == "gpu" + and version in ["0.3.1", "0.3.2", "0.4.0", "0.3"] + ): + with pytest.raises(ValueError) as e: + image_uris.retrieve( + "autogluon", + region="us-west-2", + version=version, + py_version=py_version, + image_scope=scope, + instance_type=instance_type, + ) - expected = expected_uris.framework_uri( - "autogluon-training", - version, - ACCOUNTS[region], - py_version=py_version, - region=region, - ) - assert uri == expected + assert "Unsupported processor: gpu." in str(e.value) + else: + for region in ACCOUNTS.keys(): + uri = image_uris.retrieve( + "autogluon", + region=region, + version=version, + py_version=py_version, + image_scope=scope, + instance_type=instance_type, + ) + + expected = expected_uris.framework_uri( + f"autogluon-{scope}", + version, + ACCOUNTS[region], + py_version=py_version, + region=region, + processor=processor, + ) + assert uri == expected @pytest.mark.parametrize("version", VERSIONS) @@ -81,17 +104,3 @@ def test_py3_error(version): ) assert "Unsupported Python version: py3." in str(e.value) - - -@pytest.mark.parametrize("version", VERSIONS) -def test_gpu_error(version): - with pytest.raises(ValueError) as e: - image_uris.retrieve( - "autogluon", - region="us-west-2", - version=version, - image_scope="inference", - instance_type="ml.p2.xlarge", - ) - - assert "Unsupported processor: gpu." in str(e.value)