Deprecation warning for default value of boundary kwarg in map_overlap#8397
Deprecation warning for default value of boundary kwarg in map_overlap#8397
Conversation
|
cc @jakirkham |
|
There are a number of tests that are failing because of the FutureWarning added here. I've updated the tests to explicitly specify what |
jakirkham
left a comment
There was a problem hiding this comment.
Thanks Genevieve! This looks good 😄
Had a couple comments on the warning message. Otherwise LGTM
dask/array/overlap.py
Outdated
| # Default boundary value is set in the function named "coerce_boundary" | ||
| warnings.warn( | ||
| "Default 'boundary' argument value will change from 'reflect' " | ||
| "to 'none' in future versions. " |
There was a problem hiding this comment.
Should we specify a version here?
There was a problem hiding this comment.
I think it can be relatively soon. Maybe February?
There was a problem hiding this comment.
I'd like to specify a version.
February seems too early though, lots of people will be on holiday in December and January, so it's quite likely people won't see this at all before it changes. (Although I'm sure plenty of scientists have code they run infrequently, like once every six months or so on a new dataset, so maybe it's impractical to wait a huge amount of time.)
Mind you, the only visible differences should be at the very outer edges of a Dask array, so the impact of the change is pretty small. Maybe it's ok to change it soon and have people's first introduction be a pleasant surprise things are running faster.
There was a problem hiding this comment.
We can always change the version if we don't feel ready. But I tend to agree that I don't think this will negatively impact many people. From the responses on this, the FutureWarning won't really hit them either since they set this kwarg. So I'm fine with whatever you choose.
There was a problem hiding this comment.
Ok, I'll say March then, 2021.03.0
It's an arbitrary choice, but we should pick something.
Co-authored-by: jakirkham <jakirkham@gmail.com>
|
Ok, latest commits should fix up those doctest errors (doctests were not explicitly specifying |
|
...I don't really understand why the macOS tests are failing here. Something's a bit weird. I'm going to investigate on my personal laptop & see if I can reproduce it. Locally on a Mac, nothing fails when I run I've tried with both python 3.8 and python 3.9 environments, and with the I see the CI test suite passing for other recent PRs, so I don't think anything is broken on the main branch. I might try merging main into this branch, to see if that helps. I don't see why it would, but worth a shot. |
|
I should add - the kinds of test errors I'm seeing on my laptop are not the same event loop errors that are happening in the CI. Here's hoping those are just a bit of a fluke. |
jsignell
left a comment
There was a problem hiding this comment.
This looks great! Thanks for being so thorough!
|
I've just scheduled an email that should hopefully remind me to make a follow up PR to this in the last week of February (when we should actually change the kwarg default value). Fingers crossed the reminder works! |
|
Whoa. I've never thought of doing something like that. |
…8743) Followup to PR #8397 We've had a FutureWarning up for a few months about an upcoming change to the default 'boundary' kwarg value in `map_overlap`, so now is the time to change it. Previous default was `"reflect"`, new default will be "None". The reason for this change is that it makes the code run a lot faster, and for most people the overlap depth is sufficient and they should not require additional boundary handling. See #8391 for a full discussion.
This PR is the first step in updating the default
boundarykwarg value in Dask'smap_overlapfunction. The current default value is"reflect", in future this will be changed to"none".We want to do this primarily for performance reasons, as discussed here: #8391
Questions:
FutureWarningcorrect to use here? This seems the most commonly used in the Dask codebase, although there is also aPendingDeprecationWarningused a handful of times, so I thought I should check.Tests added / passedpre-commit run --all-files