Weighted loss functions

How are weight used in XGBoost? Are they only applied to gradients or are they also used in the eval_metric?

Weights affect both the gradients and hessians and thus affect the optimal split.

Yes, agreed, they affect the optimal split. But are they also used when computing the early stopping metric?

They could theoretically be used for choosing the optimal split but not for the metric used for early stopping. This is what my testing suggests, but I’m not 100% sure.

All my testing to date suggests they are used in the evaluation metrics as well.