aws / aws/amazon-sagemaker-examples
[Bug Report] cn-north-west-1 needs to be added into sagemaker/jumpstart/constants.py
- Dominant language
- Jupyter Notebook
- Stars
- 11k
- Forks
- 7k
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 8
Description
**Link to the notebook**
Add the link to the notebook.
https://github.com/aws/amazon-sagemaker-examples/blob/main/introduction_to_amazon_algorithms/autogluon_tabular/Amazon_Tabular_Regression_AutoGluon.ipynb
**Describe the bug**
A clear and concise description of what the bug is.
**In cn-north-west-1 region, Error shows up as below:**
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/sagemaker/jumpstart/utils.py:85, in get_jumpstart_content_bucket(region)
84 try:
---> 85 return constants.JUMPSTART_REGION_NAME_TO_LAUNCHED_REGION_DICT[region].content_bucket
86 except KeyError:
KeyError: 'cn-northwest-1'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
Cell In[11], line 12
9 train_model_uri = 's3://jumpstart-cache-prod-cn-northwest-1/autogluon-training/train-autogluon-regression-ensemble.tar.gz'
11 #Retrieve the docker image
---> 12 train_image_uri = image_uris.retrieve(
13 region='cn-northwest-1',
14 framework=None,
15 model_id=train_model_id,
16 model_version=train_model_version,
17 image_scope=train_scope,
18 instance_type=training_instance_type,
19 )
20 #Retrieve the training script
21 train_source_uri = script_uris.retrieve(
22 model_id=train_model_id, model_version=train_model_version, script_scope=train_scope
23 )
**when running code as below:**
#Retrieve the docker image
train_image_uri = image_uris.retrieve(
region=None,
framework=None,
model_id=train_model_id,
model_version=train_model_version,
image_scope=train_scope,
instance_type=training_instance_type,
)
#Retrieve the training script
train_source_uri = script_uris.retrieve(
model_id=train_model_id, model_version=train_model_version, script_scope=train_scope
)
#Retrieve the pre-trained model tarball to further fine-tune. In tabular case, however, the pre-trained model tarball is dummy and fine-tune means training from scratch.
train_model_uri = model_uris.retrieve(
model_id=train_model_id, model_version=train_model_version, model_scope=train_scope
)
**To reproduce**
A clear, step-by-step set of instructions to reproduce the bug.
In cn-north-west-1 region, run the https://github.com/aws/amazon-sagemaker-examples/blob/main/introduction_to_amazon_algorithms/autogluon_tabular/Amazon_Tabular_Regression_AutoGluon.ipynb one by one cell.
**Logs**
If applicable, add logs to help explain your problem.
You may also attach an `.ipynb` file to this issue if it includes relevant logs or output.
Contributor guide
Research direction
Start with sagemaker/jumpstart/constants.py and the linked Amazon_Tabular_Regression_AutoGluon.ipynb notebook. Verify the cn-north-west-1 region string and reproduce the lookup that raises the KeyError; done means the region is recognized and the notebook progresses past image retrieval without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter-notebook, python
- Domain
- cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100