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

[Question]: Is predict(sentence, multi_class_prob=True) for TextClassifier still supported? #3545

Closed
mh-n opened this issue Sep 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@mh-n
Copy link

mh-n commented Sep 16, 2024

Question - Is predict(sentence, multi_class_prob=True) for TextClassifier still supported?

Describe the issue
Marked as question, because I can no longer find the functionality to specify multi_class_prob in the text_classification_model.py as referenced in several other past issues #1709 , #2287 , #2376

To reproduce
After initializing and training a TextClassifier that was set to multi_label = True and trying to run something like: classifier.predict(sentence, multi_class_prob = True)

The error I receive is: TypeError: DefaultClassifier.predict() got an unexpected keyword argument 'multi_class_prob'

Expected behavior
There is no issue yielding a single label when I omit multi_class_prob from the function. Is there an alternative to this parameter that we should be using?

Environment
Linux 3.10.0-1127.10.1.el7.x86_64, Python 3.12.2, Flair 0.13.1

Appreciate any help you can provide. Thank you!

@mh-n mh-n added the question Further information is requested label Sep 16, 2024
@helpmefindaname
Copy link
Collaborator

Hi @mh-n the docs for that function can be found here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants