beir-cellar / beir

A Heterogeneous Benchmark for Information Retrieval. Easy to use, evaluate your models across 15+ diverse IR datasets.
http://beir.ai
Apache License 2.0
1.55k stars 186 forks source link

fix: use np.int64 and np.float64 instead of deprecated np.int and np.float #178

Open viacheslav-dobrynin opened 1 month ago

viacheslav-dobrynin commented 1 month ago

Fixing the following error:

AttributeError: module 'numpy' has no attribute 'int'. np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information. 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

viacheslav-dobrynin commented 1 month ago

@thakur-nandan, please take a look at this fix, without it, some models do not work with new versions of numpy (such as SPARTA).

I attached the error in the description.