Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'datasets.arrow_dataset.Dataset' do not support numpy.int64 as index? #551

Open
qianyue76 opened this issue Sep 14, 2024 · 1 comment
Open

Comments

@qianyue76
Copy link

When I predict the model
`from setfit import SetFitModel
from datasets import load_dataset
model = SetFitModel.from_pretrained(model_name)

test_dataset = load_dataset("csv", data_files="dataset.csv",split="train")
predictions = model.predict(test_dataset)`

I meet the error
image

I print the type of length_sorted_idx and sentences in the top 2 lines.
And my relevant package version as follows:
setfit 1.1.0.dev0
sentence-transformers 3.1.0
datasets 3.0.0
torch 2.0.1
My question is on the title.

@antrec
Copy link

antrec commented Sep 19, 2024

+1 (Should this not be an issue on the datasets package) ?

EDIT: Has it not been fixed here huggingface/datasets@0ec973d ? Yet you are using datasets 3.0.0 which includes this PR 🤔 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants