aws / aws/amazon-sagemaker-examples

pytorch_torchvision_neo.ipynb Issues: Pip Install Hard Coded Path not Working

Open
#1,775 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

Tested the NB in SageMaker Studio and got the following errors

NB: https://github.com/aws/amazon-sagemaker-examples/blob/master/sagemaker_neo_compilation_jobs/pytorch_torchvision/pytorch_torchvision_neo.ipynb

## Issue

```
!~/anaconda3/envs/pytorch_p36/bin/pip install torch==1.4.0 torchvision==0.5.0
!~/anaconda3/envs/pytorch_p36/bin/pip install --upgrade sagemaker

/bin/sh: 1: /root/anaconda3/envs/pytorch_p36/bin/pip: not found
```

## How to fix:
Please replace above with these:

```
import sys
!{sys.executable} -m pip install torch==1.4.0 torchvision==0.5.0
!{sys.executable} -m pip install --upgrade sagemaker

```

Contributor guide

Open the contributing guide

Research direction

Open sagemaker_neo_compilation_jobs/pytorch_torchvision/pytorch_torchvision_neo.ipynb and inspect the two pip-install cells using the hard-coded pytorch_p36 path. Update them to invoke pip through the active notebook interpreter as shown in the issue, then confirm the installation cells run successfully in SageMaker Studio.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.