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

Avoid count_nonzero calls #20

Open
pfackeldey opened this issue Oct 17, 2024 · 1 comment
Open

Avoid count_nonzero calls #20

pfackeldey opened this issue Oct 17, 2024 · 1 comment

Comments

@pfackeldey
Copy link

pfackeldey commented Oct 17, 2024

We should be able to purely load data with this trick:

import dask_awkward as dak

def load_columns(events, columns):
  for col in columns:
    _ = events[col]
  return events

dak.map_partitions(load_columns, events, [("Jet", "pt"), ("Jet", "eta"), ...])

This way we avoid using unnecessary ak.count_nonzero calls in materialize_branches.ipynb

@alexander-held
Copy link
Member

This might also help keep memory requirements low, looks like a good setup to try out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants