junrushao commented on code in PR #12141:
URL: https://github.com/apache/tvm/pull/12141#discussion_r979108677
##########
python/tvm/meta_schedule/cost_model/xgb_model.py:
##########
@@ -573,22 +592,19 @@ def rmse(ys_pred: np.ndarray, d_train: "xgb.DMatrix"): #
type: ignore # pylint:
def avg_peak_score(ys_pred: np.ndarray, d_train: "xgb.DMatrix"): #
type: ignore # pylint: disable = unused-argument
return self.d_train.average_peak_score(ys_pred,
self.average_peak_n)
+ xgb_custom_callback = XGBoostCustomCallback(
+ early_stopping_rounds=self.early_stopping_rounds,
+ verbose_eval=self.verbose_eval,
+ fevals=[rmse, avg_peak_score],
+ evals=[(self.d_train.dmatrix, "tr")],
+ cvfolds=None,
+ )
Review Comment:
put it back to a few lines below
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]