Closed ImSuMyatNoe closed 1 year ago
I have the same problem
This issue is caused by a version mismatch of numpy, as numpy deleted np.float after version 1.24. I resolved this issue by switching numpy version to 1.23.5
Which platform are you running under ? linux or windows?
windows
Just write 'export HYDRA_FULL_ERROR=1' in your command prompt before running the predict.py code and the error should be solved.
raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'float'.
np.float
was a deprecated alias for the builtinfloat
. To avoid this error in existing code, usefloat
by itself. Doing this will not modify any behavior and is safe. If you specifi cally wanted the numpy scalar type, usenp.float64
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#deprecationsSet the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Although I have used your updated "predict.py" code, but the same error occur. I have tested both on my desktop PC and Laptop? Do u have any idea how to solve this?