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

fix: cast indices tensor to int to fix bug #3601

Merged

Conversation

MattGPT-ai
Copy link
Contributor

This fixes a bug where index_select is expecting an int type:

scores = torch.index_select(scores, 0, torch.tensor(filtered_indices, device=flair.device))

RuntimeError: index_select(): Expected dtype int32 or int64 for index

@MattGPT-ai MattGPT-ai force-pushed the mattb.fix.classifier-score-index-bug branch from 2a2580f to 32c875b Compare January 25, 2025 08:58
@alanakbik
Copy link
Collaborator

Thanks for fixing this!

@alanakbik alanakbik merged commit e2865f7 into flairNLP:master Jan 27, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants