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

BUG: Failing tests on pyarrow_nightly CI #54650

Closed
2 tasks done
amithkk opened this issue Aug 20, 2023 · 4 comments · Fixed by #54678
Closed
2 tasks done

BUG: Failing tests on pyarrow_nightly CI #54650

amithkk opened this issue Aug 20, 2023 · 4 comments · Fixed by #54678
Labels
Arrow pyarrow functionality CI Continuous Integration Upstream issue Issue related to pandas dependency

Comments

@amithkk
Copy link
Contributor

amithkk commented Aug 20, 2023

Pandas version checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

When running CI against the code currently on the main branch, a couple of tests on the pyarrow_nightly suite seems to be failing:

_______________ TestArrowArray.test_fillna_series[duration[s]] ________________
[gw1] linux -- Python 3.11.4 /home/runner/micromamba/envs/test/bin/python3.11

self = <pandas.tests.extension.test_arrow.TestArrowArray object at 0x7facf9479000>
data_missing = <ArrowExtensionArray>
[<NA>, Timedelta('1 days 00:00:00')]
Length: 2, dtype: duration[s][pyarrow]

    def test_fillna_series(self, data_missing):
        fill_value = data_missing[1]
        ser = pd.Series(data_missing)
    
        result = ser.fillna(fill_value)
        expected = pd.Series(
            data_missing._from_sequence(
                [fill_value, fill_value], dtype=data_missing.dtype
            )
        )
>       tm.assert_series_equal(result, expected)

pandas/tests/extension/base/missing.py:111: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pandas/_testing/asserters.py:777: in assert_extension_array_equal
    _testing.assert_almost_equal(
testing.pyx:55: in pandas._libs.testing.assert_almost_equal
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AssertionError: Series are different
E   
E   Series values are different (50.0 %)
E   [index]: [0, 1]
E   [left]:  [0 days 00:00:00, 1 days 00:00:00]
E   [right]: [1 days 00:00:00, 1 days 00:00:00]
E   At positional index 0, first diff: 0 days 00:00:00 != 1 days 00:00:00

testing.pyx:173: AssertionError
_______________ TestArrowArray.test_fillna_series[duration[ms]] ________________
[gw1] linux -- Python 3.11.4 /home/runner/micromamba/envs/test/bin/python3.11

self = <pandas.tests.extension.test_arrow.TestArrowArray object at 0x7facf94791e0>
data_missing = <ArrowExtensionArray>
[<NA>, Timedelta('1 days 00:00:00')]
Length: 2, dtype: duration[ms][pyarrow]

    def test_fillna_series(self, data_missing):
        fill_value = data_missing[1]
        ser = pd.Series(data_missing)
    
        result = ser.fillna(fill_value)
        expected = pd.Series(
            data_missing._from_sequence(
                [fill_value, fill_value], dtype=data_missing.dtype
            )
        )
>       tm.assert_series_equal(result, expected)

pandas/tests/extension/base/missing.py:111: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pandas/_testing/asserters.py:777: in assert_extension_array_equal
    _testing.assert_almost_equal(
testing.pyx:55: in pandas._libs.testing.assert_almost_equal
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AssertionError: Series are different
E   
E   Series values are different (50.0 %)
E   [index]: [0, 1]
E   [left]:  [0 days 00:00:00, 1 days 00:00:00]
E   [right]: [1 days 00:00:00, 1 days 00:00:00]
E   At positional index 0, first diff: 0 days 00:00:00 != 1 days 00:00:00

testing.pyx:173: AssertionError
________________ TestArrowArray.test_fillna_frame[duration[s]] _________________
[gw1] linux -- Python 3.11.4 /home/runner/micromamba/envs/test/bin/python3.11

self = <pandas.tests.extension.test_arrow.TestArrowArray object at 0x7facf94eb300>
data_missing = <ArrowExtensionArray>
[<NA>, Timedelta('1 days 00:00:00')]
Length: 2, dtype: duration[s][pyarrow]

    def test_fillna_frame(self, data_missing):
        fill_value = data_missing[1]
    
        result = pd.DataFrame({"A": data_missing, "B": [1, 2]}).fillna(fill_value)
    
        expected = pd.DataFrame(
            {
                "A": data_missing._from_sequence(
                    [fill_value, fill_value], dtype=data_missing.dtype
                ),
                "B": [1, 2],
            }
        )
    
>       tm.assert_frame_equal(result, expected)

pandas/tests/extension/base/missing.py:150: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pandas/_testing/asserters.py:777: in assert_extension_array_equal
    _testing.assert_almost_equal(
testing.pyx:55: in pandas._libs.testing.assert_almost_equal
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AssertionError: DataFrame.iloc[:, 0] (column name="A") are different
E   
E   DataFrame.iloc[:, 0] (column name="A") values are different (50.0 %)
E   [index]: [0, 1]
E   [left]:  [0 days 00:00:00, 1 days 00:00:00]
E   [right]: [1 days 00:00:00, 1 days 00:00:00]
E   At positional index 0, first diff: 0 days 00:00:00 != 1 days 00:00:00

testing.pyx:173: AssertionError
________________ TestArrowArray.test_fillna_frame[duration[ms]] ________________
[gw1] linux -- Python 3.11.4 /home/runner/micromamba/envs/test/bin/python3.11

self = <pandas.tests.extension.test_arrow.TestArrowArray object at 0x7facf94eb4e0>
data_missing = <ArrowExtensionArray>
[<NA>, Timedelta('1 days 00:00:00')]
Length: 2, dtype: duration[ms][pyarrow]

    def test_fillna_frame(self, data_missing):
        fill_value = data_missing[1]
    
        result = pd.DataFrame({"A": data_missing, "B": [1, 2]}).fillna(fill_value)
    
        expected = pd.DataFrame(
            {
                "A": data_missing._from_sequence(
                    [fill_value, fill_value], dtype=data_missing.dtype
                ),
                "B": [1, 2],
            }
        )
    
>       tm.assert_frame_equal(result, expected)

pandas/tests/extension/base/missing.py:150: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pandas/_testing/asserters.py:777: in assert_extension_array_equal
    _testing.assert_almost_equal(
testing.pyx:55: in pandas._libs.testing.assert_almost_equal
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   AssertionError: DataFrame.iloc[:, 0] (column name="A") are different
E   
E   DataFrame.iloc[:, 0] (column name="A") values are different (50.0 %)
E   [index]: [0, 1]
E   [left]:  [0 days 00:00:00, 1 days 00:00:00]
E   [right]: [1 days 00:00:00, 1 days 00:00:00]
E   At positional index 0, first diff: 0 days 00:00:00 != 1 days 00:00:00

testing.pyx:173: AssertionError

See logs from a fork I created to verify that this error exists on the main branch

Issue Description

I noticed this initially on a PR that I raised earlier (#54643). Since the PR doesn't touch any functionality that would potentially cause that test to break, I tested it on a copy of the main branch and could reproduce it.

This also seems to be failing on other PR CI Builds that have run today:

Expected Behavior

The tests pass

Installed Versions

Version built from main(9d70a49)

@amithkk amithkk added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 20, 2023
@rsm-23
Copy link
Contributor

rsm-23 commented Aug 21, 2023

+1

@DarthKitten2130
Copy link
Contributor

DarthKitten2130 commented Aug 21, 2023

Thanks for pointing this out I was wondering why my PR for documentation would fail a pyarrow test

@roadswitcher
Copy link
Contributor

Thanks for catching this, I was momentarily confused.

@lithomas1 lithomas1 added Arrow pyarrow functionality CI Continuous Integration Upstream issue Issue related to pandas dependency and removed Needs Triage Issue that has not been reviewed by a pandas team member Bug labels Aug 21, 2023
@amithkk
Copy link
Contributor Author

amithkk commented Aug 22, 2023

Confirmed to be caused by upstream issue apache/arrow#37291 (Thanks! @mroeschke)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality CI Continuous Integration Upstream issue Issue related to pandas dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants