-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Speech Commands v2 dataset doesn't match AST-v2 config #6446
Comments
You can use Regarding the number of labels, only the special PS: You should create a discussion on a model/dataset repo (on the Hub) for these kinds of questions |
Thanks, will keep that in mind. But I tried running
My guess is that the dataset |
Replacing So, the full code to align the labels with the model config is as follows: from datasets import load_dataset
from transformers import AutoFeatureExtractor, AutoModelForAudioClassification
# extractor = AutoFeatureExtractor.from_pretrained("MIT/ast-finetuned-speech-commands-v2")
model = AutoModelForAudioClassification.from_pretrained("MIT/ast-finetuned-speech-commands-v2")
ds = load_dataset("speech_commands", "v0.02")
ds = ds.filter(lambda label: label != ds["train"].features["label"].str2int("_silence_"), input_columns="label")
ds = ds.align_labels_with_mapping(model.config.label2id, "label") |
Describe the bug
According to
MIT/ast-finetuned-speech-commands-v2
, the model was trained on the Speech Commands v2 dataset. However, while the model config says the model should have 35 class labels, the dataset itself has 36 class labels. Moreover, the class labels themselves don't match between the model config and the dataset. It is difficult to reproduce the data used to fine tuneMIT/ast-finetuned-speech-commands-v2
.Steps to reproduce the bug
If you try to explore the dataset itself, you can see that the id to label does not match what is provided by
model.config.id2label
.Expected behavior
The labels should match completely and there should be the same number of label classes between the model config and the dataset itself.
Environment info
datasets = 2.14.6, transformers = 4.33.3
The text was updated successfully, but these errors were encountered: