aimet
aimet copied to clipboard
ModuleNotFoundError: No module named 'libpymo'
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.
@quic-bharathr could you please take a look at this.
@clevercool I'm not sure if you have tried the following solution:
https://github.com/quic/aimet/issues/480
@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
- @quic-bharathr
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.
hello, it shows this issue , how to do?
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
@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.
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'
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
Closing this issue due to inactivity. Please re-open it/ create a new issue if you need further help.