zxybazh commented on code in PR #12141:
URL: https://github.com/apache/tvm/pull/12141#discussion_r930315114


##########
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, thanks for keeping me updated, to clarify the unit test requirement:
   1. In CI we have xgboost in a certain version (1.4.2), which should support 
both the new api and the old api.
   2. The current unit tests will test the xgboost model using the new api here 
because it's after version 1.3.
   3. I would like to suggest another stand alone unit test to make sure the 
old api works fine as well. For example, directly calling the class as a 
function to show it can work with earlier versions.
   4. Other than unit tests, I also suggested @shingjan to conduct local 
integration test.
   
   Thanks again for paying close attention! We are prioritizing meta schedule 
so that when we review the auto scheduler we would be aligned on how the tests 
are done and how it impacts the tuning system. On AS side, I would suggest the 
same unit tests to demonstrate its compatibility. AS's cost model unit test 
have a simple regression quality test which should be enough as the test with 
new api.
   
   For integration test, we usually don't put that in CI because it might take 
a lot of time. Let me know if you are interested in how to conduct local tuning 
and integration test, that might take a bit longer but would be fun. We can 
also conduct some local integration test to verify your PR for you if you got 
limited time to work on that : )



-- 
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]

Reply via email to