We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acc3664 commit 087ed69Copy full SHA for 087ed69
python/tvm/meta_schedule/cost_model/xgb_model.py
@@ -36,7 +36,8 @@
36
from .metric import max_curve
37
38
39
-def optional_xgboost_callback(XGBoostCustomCallback):
+def optional_xgboost_callback(cls):
40
+ """Decorator for importing TraningCallback from xgboost"""
41
# pylint:disable = import-outside-toplevel
42
try:
43
from xgboost.callback import TrainingCallback # type: ignore
@@ -46,7 +47,7 @@ def optional_xgboost_callback(XGBoostCustomCallback):
46
47
class TrainingCallback: # type: ignore
48
pass
49
- class OptXGBoostCustomCallback(XGBoostCustomCallback, TrainingCallback): # type: ignore
50
+ class OptXGBoostCustomCallback(cls, TrainingCallback): # type: ignore
51
52
53
return OptXGBoostCustomCallback
0 commit comments