Error in src/examples/pytorch/torch-neuronx/t5-inference-tutorial.ipynb notebook. | AWS Neuron

0

Which version of torch_neuronx is used in the example? This is asked because neither the API Reference at aws website nor torch.jit.trace has the keyword argument input_output_aliases for the trace function. This kwarg is used in the notebook for compiling the decoder model.

Can the authors share all the packages and versions installed in the container so that the notebook can be reproduced?

asked 8 months ago249 views
2 Answers
0

The input_output_aliases argument is not yet added to the torch-neuronx API documentation. But the feature was released as a part of 2.13 release, so any artifacts starting from Neuron 2.13.0 release should work. We will be adding documentation for it soon.

The notebook was tested and can work with the following dependencies,

transformers>=4.31.0 
optimum-neuron>=0.0.8
torch-neuronx>=1.13.1.1.10.0
neuronx-cc>=2.9.0.40
libneuronxla>=0.5.391
answered 8 months ago
  • Thank you for your prompt response. I made a fresh instance with all the updated packages installed as well and have encountered into another error. The script is not able to find the neuronx-cc binary.

    aws-neuronx-runtime-discovery==2.9
    libneuronxla==0.5.440
    neuronx-cc==2.9.0.40+07376825f
    neuronx-distributed==0.3.0
    neuronx-hwm==2.9.0.2+f79d59e7b
    optimum-neuron==0.0.10
    torch-neuronx==1.13.1.1.10.1
    torch-xla==1.13.1+torchneurona
    transformers-neuronx==0.6.106
    

    While I am able to see the version of neuronx-cc via the CLI:

    NeuronX Compiler version 2.9.0.40+07376825f
    
    Python version 3.8.10
    HWM version 2.9.0.2-f79d59e7b
    NumPy version 1.21.6
    
0

Hi Bhuvanesh,

I have checked that this tutorial works as expected on my inf2 instance with Neuron SDK 2.13.2 (same as your versions). Will you follow the following troubleshooting note for Jupyter notebook and select the right kernel in your notebook using menu item "Kernel"->"Change kernel"->(your environment)?

To be sure, in your notebook you can select "Insert"->"Insert cell below" and add "!neuronx-cc -V" to run the check for neuronx-cc directly in your notebook instead of from the command line.

If this still doesn't work for you, could you walk me through the step-by-step setup you did? It can help me troubleshoot your problem.

I have also posted the above respond to: https://github.com/aws-neuron/aws-neuron-sdk/issues/737

answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions