Mitigate flaky data iter test. (#8244)
- Reduce the number of batches. - Verify labels.
This commit is contained in:
@@ -92,6 +92,12 @@ def run_data_iterator(
|
||||
assert non_increasing(results_from_it["Train"]["rmse"])
|
||||
|
||||
X, y, w = it.as_arrays()
|
||||
if use_cupy:
|
||||
_y = y.get()
|
||||
else:
|
||||
_y = y
|
||||
np.testing.assert_allclose(Xy.get_label(), _y)
|
||||
|
||||
Xy = xgb.DMatrix(X, y, weight=w)
|
||||
assert Xy.num_row() == n_samples_per_batch * n_batches
|
||||
assert Xy.num_col() == n_features
|
||||
|
||||
Reference in New Issue
Block a user