Error running tao_deploy container on google colab

Good morning,
I tried to run the tao-deploy notebook in order to create a TensorRT engine for PeopleNet model. When I try to run the section 7) I got the following error:

/usr/local/lib/python3.8/dist-packages/pycuda/compyte/dtypes.py:120: FutureWarning: In the future np.bool will be defined as the corresponding NumPy scalar.
reg.get_or_register_dtype(“bool”, np.bool)
Traceback (most recent call last):
File “/usr/local/bin/detectnet_v2”, line 8, in
sys.exit(main())
File “”, line 12, in main
File “”, line 196, in launch_job
File “”, line 50, in get_modules
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 848, in exec_module
File “”, line 219, in _call_with_frames_removed
File “</usr/local/lib/python3.8/dist-packages/nvidia_tao_deploy/cv/detectnet_v2/scripts/evaluate.py>”, line 3, in
File “”, line 26, in
File “</usr/local/lib/python3.8/dist-packages/nvidia_tao_deploy/cv/detectnet_v2/inferencer.py>”, line 1, in
File “”, line 50, in
File “</usr/local/lib/python3.8/dist-packages/nvidia_tao_deploy/inferencer/utils.py>”, line 1, in
File “”, line 15, in
File “/usr/local/lib/python3.8/dist-packages/pycuda/autoinit.py”, line 7, in
from pycuda.tools import make_default_context
File “/usr/local/lib/python3.8/dist-packages/pycuda/tools.py”, line 49, in
_fill_dtype_registry(respect_windows=True)
File “/usr/local/lib/python3.8/dist-packages/pycuda/compyte/dtypes.py”, line 221, in _fill_dtype_registry
fill_registry_with_c_types(
File “/usr/local/lib/python3.8/dist-packages/pycuda/compyte/dtypes.py”, line 120, in fill_registry_with_c_types
reg.get_or_register_dtype(“bool”, np.bool)
File “/usr/local/lib/python3.8/dist-packages/numpy/init.py”, line 305, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module ‘numpy’ has no attribute ‘bool’.
np.bool was a deprecated alias for the builtin bool. To avoid this error in existing code, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Any suggestions?

Regards

Could you please share the full log? It is better to save as html file and upload. Thanks.

Hi,
attached is the notebook converted in HTML. Compared to the orignal one’s the only thing I changed is the TensorRT version to 8.5.3.1 since I downloaded the tar from TensorRT 8.5 GA Update 2
Regards

tao_deploy.html (709.4 KB)

Could you refer to python - How to solve AttributeError: module 'numpy' has no attribute 'bool'? - Stack Overflow to use another version of numpy?

I fixed the problem running the following code before conversion

!python3.8 -m pip install numpy==1.23.4

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.