Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Stop Windows pipeline upon a failing pytest #10003

Merged
merged 5 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/data/device_adapter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,10 @@ bool NoInfInData(AdapterBatchT const& batch, IsValidFunctor is_valid) {
auto counting = thrust::make_counting_iterator(0llu);
auto value_iter = dh::MakeTransformIterator<bool>(counting, [=] XGBOOST_DEVICE(std::size_t idx) {
auto v = batch.GetElement(idx).value;
if (!is_valid(v)) {
// discard the invalid elements.
return true;
if (is_valid(v) && isinf(v)) {
return false;
}
// check that there's no inf in data.
return !std::isinf(v);
return true;
});
dh::XGBCachingDeviceAllocator<char> alloc;
// The default implementation in thrust optimizes any_of/none_of/all_of by using small
Expand Down
4 changes: 2 additions & 2 deletions src/data/ellpack_page.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019-2023 by XGBoost contributors
* Copyright 2019-2024, XGBoost contributors
*/
#include <thrust/iterator/discard_iterator.h>
#include <thrust/iterator/transform_output_iterator.h>
Expand All @@ -13,7 +13,7 @@
#include "../common/hist_util.cuh"
#include "../common/transform_iterator.h" // MakeIndexTransformIter
#include "./ellpack_page.cuh"
#include "device_adapter.cuh" // for HasInfInData
#include "device_adapter.cuh" // for NoInfInData
#include "ellpack_page.h"
#include "gradient_index.h"
#include "xgboost/data.h"
Expand Down
4 changes: 2 additions & 2 deletions src/data/simple_dmatrix.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019-2023 by XGBoost Contributors
* Copyright 2019-2024, XGBoost Contributors
* \file simple_dmatrix.cuh
*/
#ifndef XGBOOST_DATA_SIMPLE_DMATRIX_CUH_
Expand All @@ -11,7 +11,7 @@

#include "../common/device_helpers.cuh"
#include "../common/error_msg.h" // for InfInData
#include "device_adapter.cuh" // for HasInfInData
#include "device_adapter.cuh" // for NoInfInData

namespace xgboost::data {

Expand Down
2 changes: 2 additions & 0 deletions tests/buildkite/test-win64-gpu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Foreach-Object {

Write-Host "--- Run Python tests"
python -X faulthandler -m pytest -v -s -rxXs --fulltrace tests/python
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
Write-Host "--- Run Python tests with GPU"
python -X faulthandler -m pytest -v -s -rxXs --fulltrace -m "(not slow) and (not mgpu)"`
tests/python-gpu
if ($LASTEXITCODE -ne 0) { throw "Last command failed" }
1 change: 1 addition & 0 deletions tests/python-gpu/test_gpu_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def test_sklearn(self):

@pytest.mark.parametrize("device", ["cpu", "cuda"])
@pytest.mark.skipif(**tm.no_cupy())
@pytest.mark.skipif(**tm.no_cudf())
def test_inplace_predict_device_type(self, device: str) -> None:
"""Test inplace predict with different device and data types.

Expand Down
2 changes: 1 addition & 1 deletion tests/python-gpu/test_gpu_with_sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def wrong_shape_3(labels, predt):
clf.fit(X, y)


@pytest.mark.skipif(**tm.no_pandas())
@pytest.mark.skipif(**tm.no_cudf())
def test_ranking_qid_df():
import cudf

Expand Down
Loading