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

fix: Scalar typetracer after reduction #529

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

martindurant
Copy link
Collaborator

Fixes #528

This appears to fix the linked issue, but I'm not really sure why a typetracer object is being passed around rather than a high-level Array.

@@ -532,6 +530,11 @@ def f(self, other):
meta = op(other, self._meta)
else:
meta = op(self._meta, other)
if meta.ndim:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This applies to the scenario, which apparently we hadn't anticipated, that an operation on a scalar produces an array.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.91%. Comparing base (8cb8994) to head (1f4e79d).
Report is 116 commits behind head on main.

Files Patch % Lines
src/dask_awkward/lib/core.py 88.88% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #529      +/-   ##
==========================================
- Coverage   93.06%   92.91%   -0.16%     
==========================================
  Files          23       23              
  Lines        3290     3389      +99     
==========================================
+ Hits         3062     3149      +87     
- Misses        228      240      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -570,6 +573,15 @@ def f(*args):
args = tuple(
ak.Array(arg.content) if isinstance(arg, MaybeNone) else arg for arg in args
)
args = tuple(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here we account for getting the low-level typetracer through during column optimisation. This is the questionable part.

@martindurant martindurant changed the title Scalar typetracer after reduction fix: Scalar typetracer after reduction Aug 6, 2024
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.

Left- vs right-multiplying array by Dask scalar
2 participants