Skip to content

Commit 9ac908e

Browse files
kwwaikarkwwaikar
and
kwwaikar
authored
fixing Model Package ARNs and removing region specific dependency (aws#1611)
* fixing Model Package ARNs and removing region specific dependency * Adding a disclaimer on reference notebooks Co-authored-by: kwwaikar <[email protected]>
1 parent a58920c commit 9ac908e

File tree

6 files changed

+23
-32
lines changed

6 files changed

+23
-32
lines changed

aws_marketplace/creating_marketplace_products/Bring_Your_Own-Creating_Algorithm_and_Model_Package.ipynb

+3-21
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@
258258
"\n",
259259
"# Get the region defined in the current configuration (default to us-west-2 if none defined)\n",
260260
"region=$(aws configure get region)\n",
261-
"# specifically setting to us-east-2 since during the pre-release period, we support only that region.\n",
262-
"region=${region:-us-east-2}\n",
263261
"\n",
264262
"fullname=\"${account}.dkr.ecr.${region}.amazonaws.com/${algorithm_name}:latest\"\n",
265263
"\n",
@@ -595,14 +593,6 @@
595593
"Now that you have verified that the algorithm code works for training, live inference and batch inference in the above sections, you can start packaging it up as an Amazon SageMaker Algorithm."
596594
]
597595
},
598-
{
599-
"cell_type": "markdown",
600-
"metadata": {},
601-
"source": [
602-
"#### Region Limitation\n",
603-
"Seller onboarding is limited to us-east-2 region (CMH) only. The client we are creating below will be hard-coded to talk to our us-east-2 endpoint only."
604-
]
605-
},
606596
{
607597
"cell_type": "code",
608598
"execution_count": null,
@@ -611,7 +601,7 @@
611601
"source": [
612602
"import boto3\n",
613603
"\n",
614-
"smmp = boto3.client('sagemaker', region_name='us-east-2', endpoint_url=\"https://sagemaker.us-east-2.amazonaws.com\")"
604+
"smmp = boto3.client('sagemaker')"
615605
]
616606
},
617607
{
@@ -807,21 +797,13 @@
807797
"A Model Package is a reusable model artifacts abstraction that packages all ingredients necessary for inference. It consists of an inference specification that defines the inference image to use along with an optional model weights location.\n"
808798
]
809799
},
810-
{
811-
"cell_type": "markdown",
812-
"metadata": {},
813-
"source": [
814-
"#### Region Limitation\n",
815-
"Seller onboarding is limited to us-east-2 region (CMH) only. The client we are creating below will be hard-coded to talk to our us-east-2 endpoint only. (Note: You may have previous done this step in Part 3. Repeating here to keep Part 4 self contained.)"
816-
]
817-
},
818800
{
819801
"cell_type": "code",
820802
"execution_count": null,
821803
"metadata": {},
822804
"outputs": [],
823805
"source": [
824-
"smmp = boto3.client('sagemaker', region_name='us-east-2', endpoint_url=\"https://sagemaker.us-east-2.amazonaws.com\")"
806+
"smmp = boto3.client('sagemaker')"
825807
]
826808
},
827809
{
@@ -982,7 +964,7 @@
982964
"name": "python",
983965
"nbconvert_exporter": "python",
984966
"pygments_lexer": "ipython3",
985-
"version": "3.6.5"
967+
"version": "3.6.10"
986968
}
987969
},
988970
"nbformat": 4,

aws_marketplace/curating_aws_marketplace_listing_and_sample_notebook/Algorithm/Sample_Notebook_Template/title_of_your_product-Algorithm.ipynb

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"\n",
1414
"This sample notebook shows you how to train a custom ML model using <font color='red'> For Seller to update:[Title_of_your_Algorithm](Provide link to your marketplace listing of your product)</font> from AWS Marketplace.\n",
1515
"\n",
16+
"> **Note**: This is a reference notebook and it cannot run unless you make changes suggested in the notebook.\n",
1617
"\n",
1718
"#### Pre-requisites:\n",
1819
"1. **Note**: This notebook contains elements which render correctly in Jupyter interface. Open this notebook from an Amazon SageMaker Notebook Instance or Amazon SageMaker Studio.\n",
@@ -844,9 +845,9 @@
844845
],
845846
"metadata": {
846847
"kernelspec": {
847-
"display_name": "Python 3",
848+
"display_name": "conda_python3",
848849
"language": "python",
849-
"name": "python3"
850+
"name": "conda_python3"
850851
},
851852
"language_info": {
852853
"codemirror_mode": {
@@ -858,7 +859,7 @@
858859
"name": "python",
859860
"nbconvert_exporter": "python",
860861
"pygments_lexer": "ipython3",
861-
"version": "3.8.4"
862+
"version": "3.6.10"
862863
}
863864
},
864865
"nbformat": 4,

aws_marketplace/curating_aws_marketplace_listing_and_sample_notebook/ModelPackage/Sample_Notebook_Template/title_of_your_product-Model.ipynb

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"\n",
1212
"This sample notebook shows you how to deploy <font color='red'> For Seller to update:[Title_of_your_ML Model](Provide link to your marketplace listing of your product)</font> using Amazon SageMaker.\n",
1313
"\n",
14+
"> **Note**: This is a reference notebook and it cannot run unless you make changes suggested in the notebook.\n",
1415
"\n",
1516
"#### Pre-requisites:\n",
1617
"1. **Note**: This notebook contains elements which render correctly in Jupyter interface. Open this notebook from an Amazon SageMaker Notebook Instance or Amazon SageMaker Studio.\n",
@@ -416,9 +417,9 @@
416417
],
417418
"metadata": {
418419
"kernelspec": {
419-
"display_name": "Python 3",
420+
"display_name": "conda_python3",
420421
"language": "python",
421-
"name": "python3"
422+
"name": "conda_python3"
422423
},
423424
"language_info": {
424425
"codemirror_mode": {
@@ -430,7 +431,7 @@
430431
"name": "python",
431432
"nbconvert_exporter": "python",
432433
"pygments_lexer": "ipython3",
433-
"version": "3.8.4"
434+
"version": "3.6.10"
434435
}
435436
},
436437
"nbformat": 4,

aws_marketplace/using_model_packages/auto_insurance/src/model_package_arns.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def get_vehicle_damage_detection_model_package_arn(current_region):
2727
def get_vehicle_recognition_model_package_arn(current_region):
2828
mapping = {
2929
"us-east-1" : "arn:aws:sagemaker:us-east-1:865070037744:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
30+
"us-east-2" : "arn:aws:sagemaker:us-east-2:057799348421:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
31+
3032
"ap-northeast-1" : "arn:aws:sagemaker:ap-northeast-1:977537786026:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
3133
"ap-northeast-2" : "arn:aws:sagemaker:ap-northeast-2:745090734665:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
3234
"ap-southeast-1" : "arn:aws:sagemaker:ap-southeast-1:192199979996:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
@@ -35,6 +37,9 @@ def get_vehicle_recognition_model_package_arn(current_region):
3537
"ap-south-1": "arn:aws:sagemaker:ap-south-1:077584701553:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
3638
"ca-central-1":"arn:aws:sagemaker:ca-central-1:470592106596:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
3739
"eu-west-1" : "arn:aws:sagemaker:eu-west-1:985815980388:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
38-
"eu-west-2" : "arn:aws:sagemaker:eu-west-2:856760150666:model-package/vehicle-5bbb43353155de115c9fabdde5167c06"
40+
"eu-west-2" : "arn:aws:sagemaker:eu-west-2:856760150666:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
41+
"us-west-2" : "arn:aws:sagemaker:us-west-2:594846645681:model-package/vehicle-5bbb43353155de115c9fabdde5167c06",
42+
"us-west-1" : "arn:aws:sagemaker:us-west-1:382657785993:model-package/vehicle-5bbb43353155de115c9fabdde5167c06"
43+
3944
}
4045
return mapping[current_region]

aws_marketplace/using_model_packages/generic_sample_notebook/A_generic_sample_notebook_to_perform_inference_on_ML_model_packages_from_AWS_Marketplace.ipynb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cells": [
33
{
4+
"attachments": {},
45
"cell_type": "markdown",
56
"metadata": {},
67
"source": [
@@ -10,6 +11,7 @@
1011
"\n",
1112
"If such a sample notebook does not exist and you want to deploy and try an ML model package via code written in python language, this generic notebook can guide you on how to deploy and perform inference on an ML model package from AWS Marketplace.\n",
1213
"\n",
14+
"> **Note**: This is a reference notebook and it cannot run unless you make changes suggested in the notebook.\n",
1315
"\n",
1416
"> **Note**:If you are facing technical issues while trying an ML model package from AWS Marketplace and need help, please open a support ticket or write to the team on [email protected] for additional assistance.\n",
1517
"\n",
@@ -935,7 +937,7 @@
935937
"name": "python",
936938
"nbconvert_exporter": "python",
937939
"pygments_lexer": "ipython3",
938-
"version": "3.6.5"
940+
"version": "3.6.10"
939941
}
940942
},
941943
"nbformat": 4,

aws_marketplace/using_model_packages/improving_industrial_workplace_safety/src/model_package_arns.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def get_construction_worker_model_package_arn(current_region):
1313
"eu-west-1": "arn:aws:sagemaker:eu-west-1:985815980388:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
1414
"eu-west-2": "arn:aws:sagemaker:eu-west-2:856760150666:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
1515
"us-east-1": "arn:aws:sagemaker:us-east-1:865070037744:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
16-
"us-east-2": "arn:aws:sagemaker:us-west-1:382657785993:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
17-
"us-west-1": "arn:aws:sagemaker:us-west-2:594846645681:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
18-
"us-west-2": "arn:aws:sagemaker:us-east-2:057799348421:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2"}
16+
"us-east-2": "arn:aws:sagemaker:us-east-2:057799348421:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
17+
"us-west-1": "arn:aws:sagemaker:us-west-1:382657785993:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2",
18+
"us-west-2": "arn:aws:sagemaker:us-west-2:594846645681:model-package/construction-worker-v1-copy-06-3f94f03fae021ca61cb609d42d0118c2"}
1919
return mapping[current_region]
2020
@staticmethod
2121
def get_machine_detection_model_package_arn(current_region):

0 commit comments

Comments
 (0)