Skip to content

Commit 087ed69

Browse files
author
YJ Shi
committed
fix lint
1 parent acc3664 commit 087ed69

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/tvm/meta_schedule/cost_model/xgb_model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
from .metric import max_curve
3737

3838

39-
def optional_xgboost_callback(XGBoostCustomCallback):
39+
def optional_xgboost_callback(cls):
40+
"""Decorator for importing TraningCallback from xgboost"""
4041
# pylint:disable = import-outside-toplevel
4142
try:
4243
from xgboost.callback import TrainingCallback # type: ignore
@@ -46,7 +47,7 @@ def optional_xgboost_callback(XGBoostCustomCallback):
4647
class TrainingCallback: # type: ignore
4748
pass
4849

49-
class OptXGBoostCustomCallback(XGBoostCustomCallback, TrainingCallback): # type: ignore
50+
class OptXGBoostCustomCallback(cls, TrainingCallback): # type: ignore
5051
pass
5152

5253
return OptXGBoostCustomCallback

0 commit comments

Comments
 (0)