Skip to content

Commit

Permalink
[AutoTVM] Compatibility improvement with XGBoost v1.3.0 (apache#7076)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangfu authored and trevor-m committed Jan 21, 2021
1 parent c3ca260 commit de52398
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/tvm/autotvm/tuner/xgboost_cost_model.py
Expand Up @@ -469,7 +469,11 @@ def custom_callback(
# pylint: disable=import-outside-toplevel
from xgboost.core import EarlyStopException
from xgboost.callback import _fmt_metric
from xgboost.training import aggcv

try:
from xgboost.training import aggcv
except ImportError:
from xgboost.callback import _aggcv as aggcv

state = {}
metric_shortname = metric.split("-")[1]
Expand Down

0 comments on commit de52398

Please sign in to comment.