alexa / xlgen-eacl-2023

MIT No Attribution
11 stars 1 forks source link

ValueError: Only sparse matrices with 32-bit integer indices are accepted. Got int64 indices #2

Open houghtonweihu opened 3 months ago

houghtonweihu commented 3 months ago

When I ran: bash cluster/run_cluster.sh EUR-Lex t5-base I got this error:
ValueError: Only sparse matrices with 32-bit integer indices are accepted. Got int64 indices. Please do report a minimal reproducer on scikit-learn issue tracker so that support for your use-case can be studied by maintainers. See: https://scikit-learn.org/dev/developers/minimal_reproducer.html

from loading Y.trn.npz by File "/xlgen-eacl-2023/cluster/cluster.py", line 38, in Y = XLinearModel.load_label_matrix(args.y_trn) File "/python3.10/site-packages/pecos/xmc/xlinear/model.py", line 465, in load_label_matrix feat_mat = smat_util.load_matrix(src) File "/python3.10/site-packages/pecos/utils/smat_util.py", line 117, in load_matrix mat = np.load(src)

theejung commented 2 months ago

Did you use python 3.6.5 and pip install -r requirements.txt ? May this issue happens due to the incompatibility of python version

houghtonweihu commented 2 months ago

Yes, it works now. Thanks!