Sunny-Island commented on code in PR #12141:
URL: https://github.com/apache/tvm/pull/12141#discussion_r930296373
##########
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:
Hi, I am working on auto_scheduler xgboost upgrade, I have some questions
about your suggestion 1:
Do you mean a unit test is necessary to test this new api, and another test
in Ci to test this new api? Two unit test to test this new api.
--
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]