Fix model slicing. (#7149)

* Use correct pointer.
* Remove best_iteration/best_score.
This commit is contained in:
Jiaming Yuan
2021-08-03 11:51:56 +08:00
committed by GitHub
parent 36346f8f56
commit d080b5a953
6 changed files with 37 additions and 5 deletions

View File

@@ -114,7 +114,8 @@ def run_data_iterator(
if tree_method != "gpu_hist":
rtol = 1e-1 # flaky
else:
np.testing.assert_allclose(it_predt, arr_predt, rtol=1e-3)
# Model can be sensitive to quantiles, use 1e-2 to relax the test.
np.testing.assert_allclose(it_predt, arr_predt, rtol=1e-2)
rtol = 1e-6
np.testing.assert_allclose(