[pyspark] Use quantile dmatrix. (#8284)

This commit is contained in:
Jiaming Yuan
2022-10-12 20:38:53 +08:00
committed by GitHub
parent ce0382dcb0
commit 97a5b088a5
9 changed files with 225 additions and 120 deletions

View File

@@ -20,4 +20,6 @@ from test_spark.test_data import run_dmatrix_ctor
@pytest.mark.skipif(**tm.no_cudf())
def test_qdm_ctor() -> None:
run_dmatrix_ctor(True)
run_dmatrix_ctor(is_dqm=True, on_gpu=True)
with pytest.raises(AssertionError):
run_dmatrix_ctor(is_dqm=False, on_gpu=True)

View File

@@ -188,12 +188,9 @@ def run_gpu_hist(
# See note on `ObjFunction::UpdateTreeLeaf`.
update_leaf = dataset.name.endswith("-l1")
if update_leaf and len(history) == 2:
if update_leaf:
assert history[0] + 1e-2 >= history[-1]
return
if update_leaf and len(history) > 2:
assert history[0] >= history[-1]
return
else:
assert tm.non_increasing(history)