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

uproot not compatible with dask>=2025 #1366

Open
kratsg opened this issue Jan 24, 2025 · 1 comment
Open

uproot not compatible with dask>=2025 #1366

kratsg opened this issue Jan 24, 2025 · 1 comment
Labels
bug (unverified) The problem described would be a bug, but needs to be triaged

Comments

@kratsg
Copy link
Contributor

kratsg commented Jan 24, 2025

>>> up.dask({path: "CollectionTree"}, library='ak')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/uproot/_dask.py", line 277, in dask
    return _get_dak_array(
           ^^^^^^^^^^^^^^^
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/uproot/_dask.py", line 1403, in _get_dak_array
    dask_awkward = uproot.extras.dask_awkward()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/uproot/extras.py", line 317, in dask_awkward
    import dask_awkward
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask_awkward/__init__.py", line 3, in <module>
    import dask_awkward.lib.core as core
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask_awkward/lib/__init__.py", line 1, in <module>
    import dask_awkward.lib.str as str
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask_awkward/lib/str.py", line 10, in <module>
    from dask_awkward.lib.core import Array, map_partitions
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask_awkward/lib/core.py", line 48, in <module>
    from dask_awkward.layers import (
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask_awkward/layers/__init__.py", line 1, in <module>
    from dask_awkward.layers.layers import (
  File "/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask_awkward/layers/layers.py", line 10, in <module>
    from dask.layers import DataFrameTreeReduction
ImportError: cannot import name 'DataFrameTreeReduction' from 'dask.layers' (/home/kratsg/athena-dev/venv/lib/python3.11/site-packages/dask/layers.py)

This is because DataFrameTreeReduction got removed in dask/dask#11606 . So to be compatible, one needs

python -m pip install 'dask[array,distributed]<2025'
@kratsg kratsg added the bug (unverified) The problem described would be a bug, but needs to be triaged label Jan 24, 2025
@kratsg
Copy link
Contributor Author

kratsg commented Jan 24, 2025

will be resolved by dask-contrib/dask-awkward#566

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (unverified) The problem described would be a bug, but needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant