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

Disable default sigmoid function for single label classification Inference API #8259

Closed
Jiaxin-Pei opened this issue Nov 3, 2020 · 6 comments · Fixed by #8328
Closed

Disable default sigmoid function for single label classification Inference API #8259

Jiaxin-Pei opened this issue Nov 3, 2020 · 6 comments · Fixed by #8328
Assignees
Labels

Comments

@Jiaxin-Pei
Copy link
Contributor

🚀 Feature request

Allow people to disable the default sigmoid function in TextClassificationPipeline (maybe via model cards?).

Motivation

When we use the sequence classification model (e.g. RobertaForSequenceClassification) for regression tasks, the output may have different ranges other than [0,1], it would be better to allow configurations for the sigmoid function in TextClassificationPipeline.

@LysandreJik LysandreJik self-assigned this Nov 3, 2020
@LysandreJik
Copy link
Member

Hi! Right now the sigmoid function is applied when the pipeline detects that there is a single label. You would like the option to disable the sigmoid function in that case?

@Jiaxin-Pei
Copy link
Contributor Author

@LysandreJik
Sorry for my late reply.
Yes, cuz when people are doing regression tasks using the single-label SequenceClassification model, the output range depends on the specific task. For example, when predicting age from the text, [0,1] output after a sigmoid function is not a good fit here.

@LysandreJik
Copy link
Member

Indeed, I understand! I'm adding an option to return the raw outputs in #8328

@Jiaxin-Pei
Copy link
Contributor Author

Thank you! I'm also wondering if this will be reflected by the Inference API? The inference API is using the sequence classification pipeline, therefore the API output on my model page is different from the original model output, which might confuse potential users.

@julien-c
Copy link
Member

julien-c commented Nov 5, 2020

@Jiaxin-Pei see discussion in #8328

@stale
Copy link

stale bot commented Jan 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 9, 2021
@stale stale bot closed this as completed Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants