isdeniz / roberta-0906

0 stars 0 forks source link

ValueError: Target is multiclass but average='binary'. #1

Open isdeniz opened 1 week ago

isdeniz commented 1 week ago

I get below error when i am trying to calculate performance metrics for a multi-class classification model.

ValueError: Target is multiclass but average='binary'. Please choose another average setting, one of [None, 'micro', 'macro', 'weighted'].

There are 3 classes in train and test sets. I am getting error at below step:

results, model_outputs, wrong_pred = model.eval_model(test, verbose=True, **metrics_recom)

I am able to fine-tune the model and get predictions without any problem.

nebuchadnezzarai commented 1 week ago

I faced the exact same problem and downgrading to 0.64.3 helped! pip install simpletransformers==0.64.3 Can you try this way?