Skip to content

fix: Scalar typetracer after reduction - #529

Open
martindurant wants to merge 2 commits into
dask-contrib:mainfrom
martindurant:scalar-tt
Open

fix: Scalar typetracer after reduction#529
martindurant wants to merge 2 commits into
dask-contrib:mainfrom
martindurant:scalar-tt

Conversation

@martindurant

Copy link
Copy Markdown
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.

meta = op(other, self._meta)
else:
meta = op(self._meta, other)
if meta.ndim:

Copy link
Copy Markdown
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

codecov-commenter commented Jul 29, 2024

Copy link
Copy Markdown

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

Codecov Report

❌ 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 348 commits behind head on main.

Files with missing lines 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 Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

args = tuple(
ak.Array(arg.content) if isinstance(arg, MaybeNone) else arg for arg in args
)
args = tuple(

Copy link
Copy Markdown
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
@lgray lgray closed this Mar 21, 2025
@lgray lgray reopened this Mar 21, 2025
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

3 participants