-
Notifications
You must be signed in to change notification settings - Fork 215
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
When label mapping aren't provided - we get a crash #416
Comments
Hello @jondot , The label mapping is loaded from the I'd be in favor of keeping the current set-up to encourage user to provide a valid configuration, maybe additional documentation/hints for the error thrown would be helpful? |
As opposed to transformers where labels are generated ad-hoc
To resolve, we might want to add label mapping into
SequenceClassificationConfig
with some defaults, but it might be a change that's too radicalAnother possible fix is to do the same thing as
transformers
and go:instead of
And then
num_labels
when no mapping specified, is... magic number 2https://github.com/huggingface/transformers/blob/95b374952dc27d8511541d6f5a4e22c9ec11fb24/src/transformers/configuration_utils.py#L331
Well not so much magic if you assume a classifier with no other information provided is binary always which is what the python lib seems to do.
Any thoughts?
The text was updated successfully, but these errors were encountered: