You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/07/26 18:34:15 UTC

[GitHub] [tvm] Sunny-Island commented on a diff in pull request #12141: [Meta Schedule][XGBoost] Update the custom callback function of xgboost in meta schedule

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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org