Closed alihashaam closed 5 months ago
Added this pull request https://github.com/avidale/compress-fasttext/pull/24 to fix this issue.
In the meantime you can use this fork: https://github.com/michelecafagna26/compress-fasttext
Finally merged it and updated the package on PyPI. Thanks @alihashaam for raising the issue and @michelecafagna26 for fixing it!
While compressing the models, I get following error because of usage of numpy.float in pq_encoder_light.py:
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 specifically 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#deprecations