huggingface / huggingface/setfit

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

Open
#551 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
2.8k
Forks
267
Avg merge
36m
Merged PRs (30d)
5

Description

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](https://github.com/user-attachments/assets/2c511a4f-57ba-4294-9203-d70569f39fea)

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.