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

Fix failing xgboost test in the cudf.pandas third-party integration tests #17616

Open
wants to merge 4 commits into
base: branch-25.02
Choose a base branch
from
Open
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
14 changes: 13 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- unit-tests-cudf-pandas
- pandas-tests
- pandas-tests-diff
- third-party-integration-tests-cudf-pandas
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- third-party-integration-tests-cudf-pandas
# TODO: Remove this CI job after https://github.com/rapidsai/cudf/issues/17490 is resolved
# - third-party-integration-tests-cudf-pandas

- telemetry-setup
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
Expand Down Expand Up @@ -326,7 +327,18 @@ jobs:
node_type: cpu4
build_type: pull-request
run_script: "ci/cudf_pandas_scripts/pandas-tests/diff.sh"

# TODO: Remove this CI job after https://github.com/rapidsai/cudf/issues/17490 is resolved
third-party-integration-tests-cudf-pandas:
needs: wheel-build-cudf
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
arch: "amd64"
container_image: "rapidsai/ci-conda:latest"
run_script: |
ci/cudf_pandas_scripts/third-party-integration/test.sh python/cudf/cudf_pandas_tests/third_party_integration_tests/dependencies.yaml
telemetry-summarize:
runs-on: ubuntu-latest
needs: pr-builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ def test_with_external_memory(
return predt


@pytest.mark.skip(
reason="TypeError: Implicit conversion to a NumPy array is not allowed. Please use `.get()` to construct a NumPy array explicitly."
)
@pytest.mark.parametrize("device", ["cpu", "cuda"])
def test_predict(device: str) -> np.ndarray:
reg = xgb.XGBRegressor(n_estimators=2, device=device)
Expand All @@ -127,6 +124,11 @@ def test_predict(device: str) -> np.ndarray:
predt0 = reg.predict(X_df)

predt1 = booster.inplace_predict(X_df)
# After https://github.com/dmlc/xgboost/pull/11014, .inplace_predict()
# returns a real cupy array when called on a cudf.pandas proxy dataframe.
# So we need to ensure we have a valid numpy array.
if not isinstance(predt1, np.ndarray):
predt1 = predt1.get()
np.testing.assert_allclose(predt0, predt1)

predt2 = booster.predict(xgb.DMatrix(X_df))
Expand Down
Loading