Skip to content
Merged
Changes from 1 commit
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
106 changes: 29 additions & 77 deletions python/cudf/cudf/pandas/scripts/pandas-testing-plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@ def patch_testing_functions():
pytest.raises = replace_kwargs({"match": None})(pytest.raises)


# Node ids (matched by substring) whose only discrepancy from pandas is
# GPU-vs-CPU floating-point drift in transcendental numpy ufuncs. cuDF
# evaluates these on the GPU (libcudf / cupy), whose results differ from
# NumPy's CPU results by ~1 ULP, while ``tm.assert_index_equal`` compares
Comment thread
galipremsagar marked this conversation as resolved.
Outdated
# Index values exactly (``check_exact=True``) by default. For these tests we
# relax the comparison to a tolerant one (NumPy/pandas default rtol/atol) so
# the numerically-correct GPU results are accepted instead of being xfailed.
Comment thread
galipremsagar marked this conversation as resolved.
Outdated
TOLERANT_INDEX_COMPARE_SUBSTRINGS = ("test_numpy_ufuncs_basic",)


@pytest.fixture(autouse=True)
def relax_exact_index_compare(request):
if not any(
s in request.node.nodeid for s in TOLERANT_INDEX_COMPARE_SUBSTRINGS
):
Comment thread
galipremsagar marked this conversation as resolved.
Outdated
yield
return
import pandas._testing as tm

original = tm.assert_index_equal
tm.assert_index_equal = replace_kwargs({"check_exact": False})(original)
try:
yield
finally:
tm.assert_index_equal = original


# Dictionary to store function call counts
function_call_counts = defaultdict(lambda: defaultdict(int)) # type: ignore[var-annotated]

Expand Down Expand Up @@ -3127,72 +3154,8 @@ def pytest_unconfigure(config):
"tests/indexes/test_indexing.py::TestGetIndexer::test_get_indexer_base[multi]": "TODO: Add a reason for failure",
"tests/indexes/test_indexing.py::TestGetIndexer::test_get_indexer_base[tuples]": "TODO: Add a reason for failure",
"tests/indexes/test_indexing.py::TestTake::test_take_indexer_type": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-arccos]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-arccosh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-arcsin]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-arcsinh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-arctan]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-arctanh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-cos]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-cosh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-exp2]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-exp]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-expm1]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-log10]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-log1p]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-log2]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-log]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-sin]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-sinh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-tan]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-tanh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-arccos]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-arccosh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-arcsin]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-arcsinh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-arctan]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-arctanh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-cos]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-cosh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-exp2]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-exp]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-expm1]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-log10]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-log1p]": "GPU complex64 precision differs from CPU",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-log2]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-log]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-sin]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-sinh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-tan]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-tanh]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-arccosh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-arcsinh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-cos]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-exp]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-expm1]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-log10]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-rad2deg]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-sin]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-sinh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-tan]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-arcsinh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-arctan]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-cos]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-log10]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-log2]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-sin]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-tan]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-tanh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-arccosh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-arcsinh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-cos]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-exp]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-expm1]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-log10]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-rad2deg]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-sin]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-sinh]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-tan]": "AssertionError: Index are different",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex128-log2]": "GPU log2(0+0j) yields -inf+nanj vs CPU -inf+0j (structural nan-vs-0, not a tolerance difference)",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[complex64-log2]": "GPU log2(0+0j) yields -inf+nanj vs CPU -inf+0j (structural nan-vs-0, not a tolerance difference)",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_out[multi]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_out[tuples]": "TODO: Add a reason for failure",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_reductions[multi-maximum]": "TODO: Add a reason for failure",
Expand Down Expand Up @@ -5960,17 +5923,6 @@ def pytest_unconfigure(config):
"tests/indexes/test_base.py::TestIndex::test_empty_fancy[bool-int64]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_base.py::TestIndex::test_empty_fancy[bool-uint32]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_base.py::TestIndex::test_empty_fancy[bool-uint64]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-arctan]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-cosh]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_float-log2]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-arccosh]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-cosh]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-expm1]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-log1p]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_int-sinh]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-arctan]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-cosh]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_numpy_compat.py::test_numpy_ufuncs_basic[nullable_uint-log2]": "Flaky/version-sensitive cudf.pandas dispatch",
"tests/indexes/test_old_base.py::TestBase::test_copy_shares_cache[simple_index0]": "Asserts private APIs",
"tests/indexes/test_old_base.py::TestBase::test_copy_shares_cache[simple_index13]": "Asserts private APIs",
"tests/indexes/test_old_base.py::TestBase::test_copy_shares_cache[simple_index1]": "Asserts private APIs",
Expand Down
Loading