You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assigned a validation dataset in the training arguments and set the following in the TrainingArguments:
eval_strategy="steps", # Enables evaluation
eval_steps=2, # Frequency of evaluation
load_best_model_at_end=True, # Load the best model at the end
metric_for_best_model="eval_loss", # Monitor this metric
I didn't make nay changes except these to the finetuning code. But the eval_loss is not being calculated. And showing me this error:
KeyError: "The metric_for_best_model training argument is set to 'eval_loss', which is not found in the evaluation metrics. The available evaluation metrics are: []. Please ensure that the compute_metrics function returns a dictionary that includes 'eval_loss' or consider changing the metric_for_best_model via the TrainingArguments."
How can I fix this ? Any leads will be helpful.
The text was updated successfully, but these errors were encountered:
I assigned a validation dataset in the training arguments and set the following in the TrainingArguments:
I didn't make nay changes except these to the finetuning code. But the eval_loss is not being calculated. And showing me this error:
KeyError: "The
metric_for_best_model
training argument is set to 'eval_loss', which is not found in the evaluation metrics. The available evaluation metrics are: []. Please ensure that thecompute_metrics
function returns a dictionary that includes 'eval_loss' or consider changing themetric_for_best_model
via the TrainingArguments."How can I fix this ? Any leads will be helpful.
The text was updated successfully, but these errors were encountered: