Fix multi-output with alternating strategies. (#9933)
--------- Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
@@ -8,6 +8,7 @@ import pytest
|
||||
|
||||
import xgboost as xgb
|
||||
from xgboost import testing as tm
|
||||
from xgboost.testing.updater import ResetStrategy
|
||||
|
||||
dpath = tm.data_dir(__file__)
|
||||
|
||||
@@ -653,11 +654,6 @@ class TestModels:
|
||||
num_parallel_tree = 4
|
||||
num_boost_round = 16
|
||||
|
||||
class ResetStrategy(xgb.callback.TrainingCallback):
|
||||
def after_iteration(self, model, epoch: int, evals_log) -> bool:
|
||||
model.set_param({"multi_strategy": "multi_output_tree"})
|
||||
return False
|
||||
|
||||
booster = xgb.train(
|
||||
{
|
||||
"num_parallel_tree": num_parallel_tree,
|
||||
|
||||
Reference in New Issue
Block a user