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

feat: Request all arrays from uproot at once inside dask task #1076

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Disallow broken uproot
  • Loading branch information
nsmith- committed Apr 12, 2024
commit 98a154834e43d8ce7f3acccaf6689233324f4ef2
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ classifiers = [
]
dependencies = [
"awkward>=2.6.3",
"uproot>=5.3.0",
"uproot!=5.3.3,>=5.3.0",
"dask[array]>=2024.3.0;python_version>'3.8'",
"dask[array]>=2023.4.0;python_version<'3.9'",
"dask-awkward>=2024.3.0",
Expand Down
4 changes: 2 additions & 2 deletions src/coffea/nanoevents/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def __getitem__(self, index):

class _OnlySliceableAs:
"""A workaround for how PreloadedSourceMapping works"""

def __init__(self, array, expected_slice):
self._array = array
self._expected_slice = expected_slice
Expand Down Expand Up @@ -163,8 +164,7 @@ def load_buffers(
how=dict,
)
source_arrays = {
k: _OnlySliceableAs(v, slice(start, stop))
for k, v in arrays.items()
k: _OnlySliceableAs(v, slice(start, stop)) for k, v in arrays.items()
}
mapping = PreloadedSourceMapping(
PreloadedOpener(uuidpfn), start, stop, access_log=None
lgray marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading