shingjan commented on code in PR #12141:
URL: https://github.com/apache/tvm/pull/12141#discussion_r930542012
##########
python/tvm/meta_schedule/cost_model/xgb_model.py:
##########
@@ -763,3 +768,162 @@ def callback(env: "xgb.core.CallbackEnv"):
raise EarlyStopException(best_iteration)
return callback
+
+
+class XGBoostCallback(TrainingCallback):
+ """Base class for XGBoost callbacks."""
+
+ def __call__(self, env: "xgb.core.CallbackEnv"):
+ # Compatibility with xgboost < 1.3
+ return self.after_iteration(env.model, env.iteration,
env.evaluation_result_list)
Review Comment:
Unit test is added @zxybazh @Sunny-Island . One thing that we need to pay
attention to is that we may need to remove this test while we bump the xgboost
version in CI. Integration test is on its way.
--
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]