aimet icon indicating copy to clipboard operation
aimet copied to clipboard

ModuleNotFoundError: No module named 'libpymo'

Open clevercool opened this issue 3 years ago • 10 comments

Hi, I installed the latest version: version 1.16.2.py37. However, when I run the AdaRound example: https://quic.github.io/aimet-pages/releases/1.16.2/api_docs/torch_adaround.html#api-torch-adaround, there is an error shown below:

Traceback (most recent call last): File "ada.py", line 9, in from aimet_torch.utils import create_fake_data_loader File "/usr/local/lib/python3.7/dist-packages/aimet_torch/utils.py", line 52, in import libpymo ModuleNotFoundError: No module named 'libpymo'

How to solve it? Thanks.

clevercool avatar Aug 14 '21 08:08 clevercool

@quic-bharathr could you please take a look at this.

quic-ssiddego avatar Aug 18 '21 18:08 quic-ssiddego

@clevercool I'm not sure if you have tried the following solution:

https://github.com/quic/aimet/issues/480

LLNLanLeN avatar Aug 19 '21 20:08 LLNLanLeN

@clevercool I'm not sure if you have tried the following solution:

#480

Have tried the above solution but it is not working. I am using AIMET 1.17.0, python3.6.13 and tf 1.15

PaulZhangIsing avatar Dec 01 '21 05:12 PaulZhangIsing

  • @quic-bharathr

quic-ssiddego avatar Dec 07 '21 01:12 quic-ssiddego

None of this works at least explain for us what is libpymo is, no docstring in the whole code. can anyone explain what is libpymo, is it a library written by a team or from a third party. I dive into most of the code, I think this module was not shipped properly with code. I tried every single method for installing and all of them failed, Docker, Colab, and my Linux with the same error. I'm sure I did the variable right and everything was explained as a way to solve this problem but I still have the same issue.

Silk760 avatar Dec 15 '21 18:12 Silk760

image hello, it shows this issue , how to do?

hisrg avatar Jan 25 '22 04:01 hisrg

Thanks for the reply. I have solved this issue with the following solution.

@clevercool I'm not sure if you have tried the following solution:

#480

clevercool avatar Jan 25 '22 04:01 clevercool

@Silk760 libpymo refers to AIMET CPP backend. Could you please elaborate on the steps you tried and share a snippet of your error? Tagging @quic-bharathr for further analysis on this issue.

quic-ssiddego avatar Jan 25 '22 19:01 quic-ssiddego

I just encountered the same error. I've used a docker image with TF 1.15 (/prj/corp/crd/morpheus/sandiego/aimet/others/aimet.conf aimet-dev-tf-gpu-tf115) I've installed AIMET 1.13 (which is the version matching the TF SRGAN: https://github.com/quic/aimet-model-zoo/blob/develop/zoo_tensorflow/Docs/SRGAN.md) And when I try to run python $WORKSPACE/aimet-model-zoo/zoo_tensorflow/examples/srgan_quanteval.py weights/srgan/ /Set5/image_SRF_4/ I get the same error: ModuleNotFoundError: No module named 'libpymo'

schmitzmatheus avatar Jul 07 '22 20:07 schmitzmatheus

Update, I resolved it by running find $WORKSPACE/ | grep "libpymo" to find the location of libpymo, and then adding it to my python path via export PYTHONPATH=$WORKSPACE/aimet/TrainingExtensions/tensorflow/test/python/:$WORKSPACE/build/artifacts/:$WORKSPACE/build/staging/universal/lib/x86_64-linux-gnu:$PYTHONPATH

  • In my case I've added all the three paths found by the find query: $WORKSPACE/aimet/TrainingExtensions/tensorflow/test/python/test_libpymo.py $WORKSPACE/build/artifacts/libpymo.so $WORKSPACE/build/staging/universal/lib/x86_64-linux-gnu/libpymo.so

  • WORKSPACE is a variable pointing to the directory where I have all files related to the SRGAN I'm working with, and its also where I installed aimet and aimet-model-zoo

schmitzmatheus avatar Jul 07 '22 20:07 schmitzmatheus

Closing this issue due to inactivity. Please re-open it/ create a new issue if you need further help.

quic-mangal avatar Apr 04 '23 16:04 quic-mangal