Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
YJ Shi authored and Ubuntu committed Sep 14, 2022
1 parent 79599af commit 918ea89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/tvm/meta_schedule/cost_model/xgb_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
from .metric import max_curve


def optional_xgboost_callback(XGBoostCustomCallback):
def optional_xgboost_callback(cls):
"""Decorator for importing TraningCallback from xgboost"""
# pylint:disable = import-outside-toplevel
try:
from xgboost.callback import TrainingCallback # type: ignore
Expand All @@ -46,7 +47,7 @@ def optional_xgboost_callback(XGBoostCustomCallback):
class TrainingCallback: # type: ignore
pass

class OptXGBoostCustomCallback(XGBoostCustomCallback, TrainingCallback): # type: ignore
class OptXGBoostCustomCallback(cls, TrainingCallback): # type: ignore
pass

return OptXGBoostCustomCallback
Expand Down

0 comments on commit 918ea89

Please sign in to comment.