diff --git a/doc/tutorials/custom_metric_obj.rst b/doc/tutorials/custom_metric_obj.rst index cf81019ad..5633ae20a 100644 --- a/doc/tutorials/custom_metric_obj.rst +++ b/doc/tutorials/custom_metric_obj.rst @@ -45,6 +45,7 @@ namely prediction and labels. For implementing ``SLE``, we define: import numpy as np import xgboost as xgb + from typing import Tuple def gradient(predt: np.ndarray, dtrain: xgb.DMatrix) -> np.ndarray: '''Compute the gradient squared log error.'''