Skip to content

⚠️ Upstream CI failed ⚠️ #12178

Closed

Description

@github-actions

Workflow Run URL

Python 3.12 Test Summary
dask/dataframe/io/tests/test_parquet.py::test_append_with_partition: KeyError: 13
dask/dataframe/dask_expr/tests/test_reductions.py::test_value_counts_sort: AssertionError: Series.index are different

Series.index values are different (53.33333 %)
[left]:  Index([1, 2, 3, 5, 4, 6, 7, 11, 8, 9, 10, 13, 12, 0, 14], dtype='int64', name='y')
[right]: Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 14], dtype='int64', name='y')

Activity

  1. TomAugspurger commented on Dec 3, 2025

    @TomAugspurger
    Member

    I've started looking at these and will have a PR up tonight or tomorrow for some.

    The failures in dask/dataframe/tests/test_dataframe.py::test_to_timedelta (and probably to_datetime)) boil down to pandas 3.x's support for non-ns resolution datetime / timedelta and value-dependent parsing to support that. For example:

    In [9]: values = ["1", "2", "1 day 2 hours"]
    
    In [10]: pd.to_timedelta(s[:2])
    Out[10]: 
    0   0 days 00:00:00.000000001
    1   0 days 00:00:00.000000002
    dtype: timedelta64[ns]
    
    In [11]: pd.to_timedelta(s[2:])
    Out[11]: 
    2   1 days 02:00:00
    dtype: timedelta64[us]

    Note that the dtype is ns for parsing just the first two, but us for the 3rd on. This is a problem for dask, since we want to know the dtype of the array without looking at the values: you don't want to infer different dtypes for different divisions.

    There is an API to cast to a different unit:

    In [18]: pd.to_timedelta(s[:2]).dt.as_unit("ns")
    Out[18]: 
    0   0 days 00:00:00.000000001
    1   0 days 00:00:00.000000002
    dtype: timedelta64[ns]
    
    In [19]: pd.to_timedelta(s[2:]).dt.as_unit("ns")
    Out[19]: 
    2   1 days 02:00:00
    dtype: timedelta64[ns]

    Which might work. But it'd be preferable to have that in the to_timedelta API (in both dask and pandas). I might raise that on pandas unless I find a workaround.

  2. TomAugspurger commented on Dec 4, 2025

    @TomAugspurger
    Member

    I thikn the resample errors are caused by pandas-dev/pandas#63262. I'll defer those for now.

  3. TomAugspurger commented on Dec 10, 2025

    @TomAugspurger
    Member

    There's just one remaining error, which I'm not able to reproduce locally:

    dask/dataframe/dask_expr/tests/test_reductions.py::test_value_counts_sort: AssertionError: Series.index are different
    
    Series.index values are different (53.33333 %)
    [left]:  Index([1, 2, 3, 5, 4, 6, 7, 11, 8, 9, 10, 13, 12, 0, 14], dtype='int64', name='y')
    [right]: Index([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 14], dtype='int64', name='y')
    

    I notice that the counts are mostly the same:

    (Pdb) pp pdf.y.value_counts()
    y
    1     7
    2     7
    3     7
    4     7
    5     7
    6     7
    7     7
    8     7
    9     7
    10    7
    11    7
    12    7
    13    7
    0     3
    14    2
    

    so this looks like a sort stability issue, at least on some platforms?

    Oh, https://pandas.pydata.org/docs/dev/reference/api/pandas.Series.value_counts.html#pandas.Series.value_counts mentions that as of 3.0 this is a stable sort.

  4. TomAugspurger commented on Dec 14, 2025

    @TomAugspurger
    Member

    I think this was closed by #12191

  5. jrbourbeau commented on Dec 15, 2025

    @jrbourbeau
    Member

    Thanks for tracking / handling @TomAugspurger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions