How to specify which metric to use for earlystopping?

For example, I define a custom compute_metrics which returns a dict including rouge and bleu. How to tell early stopping callback to stop training based on bleu?

Thank you!

You can specifiy in the field metric_for_best_model (should be the name of the key in the dictionary returned by your compiute_metrics).

1 Like

Thank you! I will give it a try.