Understanding how Ray "objective" works with the trainer

After some further digging, I can confirm that my first post is correct. If you don’t specify a custom function for compute_objective, the sum of the values of compute_metrics is used. If you do not specify your own compute_metrics, the loss will be used. Note that this is important! You often want to minimize your loss but maximize secondary metrics (like F1, correlation scores, etc.), which is a crucial parameter in hyperparamter_search(direction=["minimize", "maximize"]).

1 Like