aws / aws/amazon-sagemaker-examples
Running pytorch_extending_our_containers notebook leads to "missing 1 required positional argument: 'image_uri'" error
- 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/master/advanced_functionality/pytorch_extending_our_containers/pytorch_extending_our_containers.ipynb
**Describe the bug**
Going through the cells in sequential order, arriving at this cell:
```python
from sagemaker.estimator import Estimator
hyperparameters = {"epochs": 1}
estimator = Estimator(
role=role,
train_instance_count=1,
train_instance_type=instance_type,
image_name="pytorch-extending-our-containers-cifar10-example:latest",
hyperparameters=hyperparameters,
)
estimator.fit("file:///tmp/pytorch-example/cifar-10-data")
predictor = estimator.deploy(1, instance_type)
```
Produces the following error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in
8 train_instance_type=instance_type,
9 image_name="pytorch-extending-our-containers-cifar10-example:latest",
---> 10 hyperparameters=hyperparameters,
11 )
12
TypeError: __init__() missing 1 required positional argument: 'image_uri'
```
**To reproduce**
Start a new SageMaker notebook instance and clone the examples repo. Open `pytorch_extending_our_containers.ipynb`, and Shift + Enter your way down one cell at a time until you arrive at the cell I mention above.
**Logs**
_Other than the error message I don't think there are any other logs to attach_.
Contributor guide
Research direction
Open advanced_functionality/pytorch_extending_our_containers/pytorch_extending_our_containers.ipynb and run the cells sequentially through the Estimator construction cell. Check the current SageMaker Estimator requirements around image_uri and compare them with the notebook's image_name usage. Done means the notebook proceeds past estimator creation without the missing image_uri error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter-notebook, python, pytorch
- Domain
- cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100