Disable callback and ES on random forest. (#7236)

This commit is contained in:
Jiaming Yuan
2021-09-17 18:21:17 +08:00
committed by GitHub
parent c311a8c1d8
commit c735c17f33
3 changed files with 123 additions and 8 deletions

View File

@@ -402,6 +402,10 @@ def run_boston_housing_rf_regression(tree_method):
labels = y[test_index]
assert mean_squared_error(preds, labels) < 35
rfreg = xgb.XGBRFRegressor()
with pytest.raises(NotImplementedError):
rfreg.fit(X, y, early_stopping_rounds=10)
def test_boston_housing_rf_regression():
run_boston_housing_rf_regression("hist")