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

Incompatibility with dask 2024.12.0 #1230

Open
toicca opened this issue Dec 12, 2024 · 1 comment
Open

Incompatibility with dask 2024.12.0 #1230

toicca opened this issue Dec 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@toicca
Copy link

toicca commented Dec 12, 2024

In Dask 2024.12.0 there were changes to Blockwise class (specifically here) which causes at least NanoEventsFactory.from_root().events() to give

Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/eos/home-n/ntoikka/BTVNanoCommissioning/coff_test/lib/python3.11/site-packages/coffea/nanoevents/factory.py", line 715, in events
    events = self._mapping(form_mapping=self._schema)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/eos/home-n/ntoikka/BTVNanoCommissioning/coff_test/lib/python3.11/site-packages/uproot/_dask.py", line 296, in dask
    return _get_dak_array_delay_open(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/eos/home-n/ntoikka/BTVNanoCommissioning/coff_test/lib/python3.11/site-packages/uproot/_dask.py", line 1665, in _get_dak_array_delay_open
    return dask_awkward.from_map(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/eos/home-n/ntoikka/BTVNanoCommissioning/coff_test/lib/python3.11/site-packages/dask_awkward/lib/io/io.py", line 637, in from_map
    dsk = AwkwardInputLayer(name=name, inputs=inputs, io_func=io_func)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/eos/home-n/ntoikka/BTVNanoCommissioning/coff_test/lib/python3.11/site-packages/dask_awkward/layers/layers.py", line 163, in __init__
    super().__init__(
TypeError: Blockwise.__init__() got an unexpected keyword argument 'dsk'

This can be tested and reproduced with the documentations basic example

import awkward as ak
from coffea.nanoevents import NanoEventsFactory, NanoAODSchema

NanoAODSchema.warn_missing_crossrefs = False

fname = "https://raw.githubusercontent.com/CoffeaTeam/coffea/master/tests/samples/nano_dy.root"
events = NanoEventsFactory.from_root(
    {fname: "Events"},
    schemaclass=NanoAODSchema,
    metadata={"dataset": "DYJets"},
).events()

I tested with Python 3.11.9, coffea 2024.11.0, and Dask 2024.12.0

@toicca toicca added the bug Something isn't working label Dec 12, 2024
@ikrommyd
Copy link
Collaborator

This is a known issue. CI caught it. There was an internal breaking change on the dask side. It's being worked on dask-contrib/dask-awkward#556 with input from the dask team as well.
Also reported in dask-contrib/dask-awkward#557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants