Closed swidi closed 3 years ago
Yes,I found the same error! i doubt if the author of fast_bert update the code ? And have you solved the question ? Yours sincerely! @swidi
@swidi @shaoniana1997 Please add the following function in the metrics.py :
def accuracy_jaccord(y_pred: Tensor, y_true: Tensor, thresh: float = CLASSIFICATION_THRESHOLD, sigmoid: bool = True):
if sigmoid:
y_pred = y_pred.sigmoid()
return jaccard_score(y_pred > thresh, y_true.bool(), average='samples')
I am closing this issue for now. Feel free to reopen.
thank you for your timely reply!
when i use the accuracy_jaccord to evaluate ,if always reminds the information : TypeError: accuracy_jaccord() got an unexpected keyword argument 'labels' can you give me some useful advice? @fabrahman
I installed fast_bert as described but there is one particular import that is not working:
This leads to
run_bert_classifier.py
failing.Do you know if a very specific version of fast_bert or sklearn are required? No version is specified in fast_berts' requirements.txt