No module named 'optimum.neuron'; 'optimum' is not a package
I am trying to use Optimum for Neuron on an AWS Inf2 instance.I installed optimum:python3 -m pip install git+https://github.com/huggingface/optimum.git#egg=optimum[neuron]Everything seems to be installed correctly but when I try to import optimum.neuron I get “ModuleNotFoundError”:from optimum.neuron import NeuronModelForCausalLMModuleNotFoundError: No module named ‘optimum.neuron’; ‘optimum’ is not a packageAnyone know what is the correct way to import the package?
2023-07-21T06:48:17Z
Hi@ria14313, I cannot reproduce your issue. But maybe you can try following the installation instructions provided in the documentation:Installation
2023-07-21T07:20:25Z
regisss:InstallationHi@ria14313,If you are using inf2, the extra for installing optimum-neuron package should beneuronxinstead ofneuron(for inf1).Normally theneuronxextra will help you to install theneuronx-cccompiler, if not you can follow theguide of neuronx installation from AWS.Make sure that you have the following requirements:neuronx driver and runtimeneuronx-cc==2.* torch-neuronxThen you can install optimum with theinstallation guide.