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

Add missing meta keyword arguments on all dask map_blocks calls #556

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Nov 17, 2023

Without the meta= keyword argument to da.map_blocks dask will call the mapped function with fake/representative arguments to try to determine what the returned array and dtype are. This PR adds this kwarg to avoid this unnecessary execution of the function.

This very likely won't have any effect on performance, but it helps with debugging and is an unnecessary call if you forget it.

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Passes git diff origin/main **/*py | flake8 --diff
  • Fully documented

@djhoese djhoese added the bug label Nov 17, 2023
@djhoese djhoese requested review from mraspaud and pnuu November 17, 2023 19:17
@djhoese djhoese self-assigned this Nov 17, 2023
Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa3771b) 93.99% compared to head (9ef274f) 93.99%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #556   +/-   ##
=======================================
  Coverage   93.99%   93.99%           
=======================================
  Files          92       92           
  Lines       13777    13777           
=======================================
  Hits        12950    12950           
  Misses        827      827           
Flag Coverage Δ
unittests 93.99% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@coveralls
Copy link

Coverage Status

coverage: 93.656%. remained the same
when pulling 9ef274f on djhoese:bugfix-dask-meta
into fedb680 on pytroll:main.

@djhoese djhoese merged commit 1a36458 into pytroll:main Feb 14, 2024
25 of 27 checks passed
@djhoese djhoese deleted the bugfix-dask-meta branch February 14, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants