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

Revert unproject_layout's action; use shape_touched in column optimization. #317

Closed

Conversation

douglasdavis
Copy link
Collaborator

@douglasdavis douglasdavis commented Jul 12, 2023

Should fix #314 and #313.

This reverts the action that unproject_layout and plugs the hole left behind by using the shape_touched attribute of the typetracer report. The only negative side-effect we have is converting to dask.array.Array is failing in tests because of a mismatch between a regular numpy array and a masked numpy array.

@@ -95,6 +95,7 @@ def test_json_bytes_no_delim_defined(ndjson_points_file: str) -> None:


def test_to_and_from_dask_array(daa: dak.Array) -> None:
daa = dak.from_awkward(daa.compute(), npartitions=3)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the normal daa fixture is an array that comes from parquet, and the form ends up getting a mask when we do column selection. We avoid the mask by going ahead and computing the parquet-originating collection and creating a new collection from the concrete result via from_awkward. A bit roundabout but we still test what we mean to test here.

@@ -273,6 +274,8 @@ def test_from_lists(caa_p1: ak.Array) -> None:
def test_to_dask_array(daa: dak.Array, caa: dak.Array) -> None:
from dask.array.utils import assert_eq as da_assert_eq

daa = dak.from_awkward(daa.compute(), npartitions=4)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@douglasdavis douglasdavis marked this pull request as ready for review July 12, 2023 17:24
@douglasdavis
Copy link
Collaborator Author

douglasdavis commented Jul 12, 2023

@lgray would you be able to do your torture test with this PR on top of the latest awkward and uproot releases? (I'm seeing #313 and #314 fixed with awkward==2.3.1, uproot==5.0.10, and this PR)

@lgray
Copy link
Collaborator

lgray commented Jul 12, 2023

Busy with other things today - but I can give it a shot later.

@douglasdavis
Copy link
Collaborator Author

Busy with other things today - but I can give it a shot later.

of course always no rush :)

@codecov-commenter
Copy link

Codecov Report

Merging #317 (b7f3b69) into main (67e84fc) will decrease coverage by 1.49%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   92.31%   90.82%   -1.49%     
==========================================
  Files          21       21              
  Lines        2564     2562       -2     
==========================================
- Hits         2367     2327      -40     
- Misses        197      235      +38     
Impacted Files Coverage Δ
src/dask_awkward/lib/optimize.py 93.99% <100.00%> (ø)
src/dask_awkward/lib/unproject_layout.py 12.50% <100.00%> (-32.59%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@lgray
Copy link
Collaborator

lgray commented Jul 13, 2023

@douglasdavis so this gets coffea tests to pass again but overtouching is has run rampant again in my usual torture tests, compared to dask-awkward 2023.7.0 + uproot 5.0.10 (where in my test with this branch I'm running this branch with uproot 5.0.10).

@douglasdavis
Copy link
Collaborator Author

Closing in favor of #319

@douglasdavis douglasdavis deleted the revert-unproject-layout branch July 25, 2023 19:02
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

Successfully merging this pull request may close these issues.

dak.ones_like / zeros_like fails
3 participants