aws-neuron/aws-neuron-sdk

Issue while installing torch-neuronx==2.1.*

bindu-0107 opened this issue · 3 comments

Unable to install torch-neuronx 2.1 version in AWS Notebook instance due to below error can you pls help in debugging this

Python version - 3.10.13


Collecting torch-neuronx==2.1.* Using cached https://pip.repos.neuron.amazonaws.com/torch-neuronx/torch_neuronx-2.1.2.2.1.0-py3-none-any.whl (2.5 MB) Collecting torch==2.1.* (from torch-neuronx==2.1.*) Downloading torch-2.1.2-cp310-cp310-manylinux1_x86_64.whl.metadata (25 kB) INFO: pip is looking at multiple versions of torch-neuronx to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement torch-xla==2.1.2 (from torch-neuronx) (from versions: 1.0, 1.13.1+torchneuron6, 1.13.1+torchneuron7, 1.13.1+torchneuron8, 1.13.1+torchneurona, 1.13.1+torchneuronb, 1.13.1+torchneuronc, 1.13.1+torchneurond, 1.13.1+torchneurone, 2.0.0+torchneuron0) ERROR: No matching distribution found for torch-xla==2.1.2

Hi bindu-0107:

It is possible a pre-existing torch-neuronx 1.13 installation is causing issues. Can you try setting up a fresh environment and install torch-neuronx 2.1 using the following steps?

python -m pip install -U pip 
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com/
python -m pip install neuronx-cc==2.* torch-neuronx==2.1.*

For more information about setting up a torch-neuronx 2.1 environment for your specific OS, you can visit https://awsdocs-neuron.readthedocs-hosted.com/en/latest/general/setup/torch-neuronx.html#setup-torch-neuronx

Hi @hannanjgaws :
Even in new environment still facing the same issue was running this is AWS Sagemaker Notebook

`ERROR: Could not find a version that satisfies the requirement torch-xla==2.1.2 (from torch-neuronx) (from versions: 1.0)

ERROR: No matching distribution found for torch-xla==2.1.2`

Hi @bindu-0107
could you confirm what OS you used and what's the instance type?
For AL2, torch-xla 2.1 has incompatilibity issue with glibc and noted here : https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/torch/torch-neuronx/index.html#glibc-error-on-amazon-linux-2, in which you case you may need to update the OS.
Also, the whls are located at https://pip.repos.neuron.amazonaws.com/torch-xla/torch_xla-2.1.2-cp310-cp310-manylinux_2_28_x86_64.whl, could you try downloading them manually for now while we look at why the dependency failed.