You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by sy...@apache.org on 2024/07/18 13:49:50 UTC

(tvm) branch main updated: [Meta Schedule][XGBoost] enable custom callback func test with xgboost>=1.6.0 (#17168)

This is an automated email from the ASF dual-hosted git repository.

syfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 70d86e3fb7 [Meta Schedule][XGBoost] enable custom callback func test with xgboost>=1.6.0 (#17168)
70d86e3fb7 is described below

commit 70d86e3fb7adf2afc05797e749b62a1d9c6c788a
Author: Masahiro Hiramori <Hi...@ct.MitsubishiElectric.co.jp>
AuthorDate: Thu Jul 18 22:49:45 2024 +0900

    [Meta Schedule][XGBoost] enable custom callback func test with xgboost>=1.6.0 (#17168)
    
    enable callback func test with xgboost>=1.6.0
---
 .../meta_schedule/test_meta_schedule_cost_model.py | 25 ++++++----------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/tests/python/meta_schedule/test_meta_schedule_cost_model.py b/tests/python/meta_schedule/test_meta_schedule_cost_model.py
index 0e1b2f6421..dadedcf601 100644
--- a/tests/python/meta_schedule/test_meta_schedule_cost_model.py
+++ b/tests/python/meta_schedule/test_meta_schedule_cost_model.py
@@ -257,17 +257,6 @@ def test_meta_schedule_xgb_model_reupdate():
     model.predict(TuneContext(), [_dummy_candidate() for i in range(predict_sample_count)])
 
 
-def xgb_version_check():
-
-    # pylint: disable=import-outside-toplevel
-    import xgboost as xgb
-    from packaging import version
-
-    # pylint: enable=import-outside-toplevel
-    return version.parse(xgb.__version__) >= version.parse("1.6.0")
-
-
-@unittest.skipIf(xgb_version_check(), "test not supported for xgboost version after 1.6.0")
 def test_meta_schedule_xgb_model_callback_as_function():
     # pylint: disable=import-outside-toplevel
     from itertools import chain as itertools_chain
@@ -330,14 +319,12 @@ def test_meta_schedule_xgb_model_callback_as_function():
             num_boost_round=10000,
             obj=obj,
             callbacks=[
-                partial(
-                    _get_custom_call_back(
-                        early_stopping_rounds=model.early_stopping_rounds,
-                        verbose_eval=model.verbose_eval,
-                        fevals=[rmse, avg_peak_score],
-                        evals=[(d_train.dmatrix, "tr")],
-                        cvfolds=None,
-                    )
+                _get_custom_call_back(
+                    early_stopping_rounds=model.early_stopping_rounds,
+                    verbose_eval=model.verbose_eval,
+                    fevals=[rmse, avg_peak_score],
+                    evals=[(d_train.dmatrix, "tr")],
+                    cvfolds=None,
                 )
             ],
         )