aws / aws/amazon-sagemaker-examples
BYO MME example notebook failing due to MXNet retirement
- Dominant language
- Jupyter Notebook
- Stars
- 11k
- Forks
- 7k
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 8
Description
**Link to the notebook**
https://github.com/aws/amazon-sagemaker-examples/blob/main/advanced_functionality/multi_model_bring_your_own/multi_model_endpoint_bring_your_own.ipynb
**Describe the bug**
Running the first code cell in the "Upload model artifacts to S3" section produces an error that reads, "AssertionError: failed to open http://data.mxnet.io/models/imagenet/resnet/18-layers/resnet-18-0000.params". Browsing to https://mxnet.apache.org, I see that the project was retired in September 2023.
**To reproduce**
Run the notebook in a SageMaker Notebook Instance
**Logs**
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[7], line 7
3 import tarfile
5 model_path = "http://data.mxnet.io/models/imagenet/"
----> 7 mx.test_utils.download(
8 model_path + "resnet/18-layers/resnet-18-0000.params", None, "data/resnet_18"
9 )
10 mx.test_utils.download(
11 model_path + "resnet/18-layers/resnet-18-symbol.json", None, "data/resnet_18"
12 )
13 mx.test_utils.download(model_path + "synset.txt", None, "data/resnet_18")
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/mxnet/test_utils.py:1812, in download(url, fname, dirname, overwrite, retries)
1810 retries -= 1
1811 if retries <= 0:
-> 1812 raise e
1814 print("download failed, retrying, {} attempt{} left"
1815 .format(retries, 's' if retries > 1 else ''))
1816 logging.info("downloaded %s into %s successfully", url, fname)
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/mxnet/test_utils.py:1803, in download(url, fname, dirname, overwrite, retries)
1801 try:
1802 r = requests.get(url, stream=True)
-> 1803 assert r.status_code == 200, "failed to open %s" % url
1804 with open(fname, 'wb') as f:
1805 for chunk in r.iter_content(chunk_size=1024):
AssertionError: failed to open http://data.mxnet.io/models/imagenet/resnet/18-layers/resnet-18-0000.params
Contributor guide
Research direction
Open advanced_functionality/multi_model_bring_your_own/multi_model_endpoint_bring_your_own.ipynb and reproduce the failure in the first cell of the “Upload model artifacts to S3” section using a SageMaker Notebook Instance. Trace the three model-artifact downloads, replace the retired dependency path as appropriate, and verify that the cell completes and the rest of the notebook can use the downloaded artifacts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter-notebook, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100