-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load numpy module in a DALI backend #223
Comments
It occurred to me to try importing sys to check sys.path, and I found:
The only references to numpy in these paths was a collection of .h files:
I threw in a sys.path.append() to add the /usr/local Python installation's path to sys.path, and that seems to have enabled Numpy to load. It threw an error but it appears to have loaded succesfully:
Hopefully it will work as intended in spite of the error. Any idea what might be going on? The message is pretty ambiguous. With respect to Numpy, did I miss a step somewhere? Maybe I need to add Numpy to the DALI backend virtualenv? |
Hey @mvpel images = images / types.Constant(255.0, dtype=types.FLOAT)
# or even better
images = images / 255. |
Nice, thanks! I'm puzzled that the example in the DALI math user guide didn't take that approach. |
I'm using a very close approximation of the https://docs.nvidia.com/deeplearning/dali/user-guide/docs/math.html example to try to scale 0-255 RGB image values to 0.0-1.0 floating point numbers, due to the way our inference models were trained.
I tried running it without an "import numpy as np" line at first, which threw a NameError, but when I added that line, I got a "no module named numpy" error as Triton was working to load the model:
Here's my full pipeline in the dali.py:
I'm testing this under Triton v22.08, due to some program software approval requirements here, using the NGC Triton container.
Thanks for any suggestions you can offer!
The text was updated successfully, but these errors were encountered: