-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove Dask single-threaded setting in tests #7489
Conversation
cc @dcherian |
Oh hmm that was trivial. Is this a regression though? The test has a xarray/xarray/tests/test_distributed.py Lines 104 to 116 in d385e20
but it seems like xarray/xarray/backends/locks.py Lines 71 to 106 in d385e20
|
Hmm I'm not able to reproduce with this example using the latest In [1]: import dask
In [2]: dask.utils.show_versions()
{
"Python": "3.10.4",
"Platform": "Darwin",
"dask": "2023.1.1+3.gdb5b2178a",
"distributed": "2023.1.1",
"numpy": "1.24.1",
"pandas": "2.0.0.dev0+1309.g7f2aa8f46a",
"cloudpickle": "2.0.0",
"fsspec": "2023.1.0+5.g012816b",
"bokeh": "2.4.3",
"fastparquet": "2022.12.1.dev6",
"pyarrow": "11.0.0.dev316",
"zarr": "2.4.1.dev528"
}
In [3]: from distributed import Client
In [4]: type(dask.base.get_scheduler())
Out[4]: NoneType
In [5]: c = Client()
In [6]: dask.base.get_scheduler()
Out[6]: <bound method Client.get of <Client: 'tcp://127.0.0.1:61659' processes=4 threads=8, memory=16.00 GiB>> |
I've not looked super deeply, so please let me know if I'm missing something, but I think that these lines in Previously, I think the problem here is, with the previous config-based behavior, the I'd argue the new behavior is actually what we want, but I see what you're saying about it being a change in behavior. I think in this case though it's just a tests-related issue. Does that sounds right? Or was setting the |
Just checking in, @dcherian does this look okay to you? Happy to continue iterating if you see a problem with just removing this config option |
Yup, after thinking about it for a while, this seems like an edge case that's not common in user code. Thanks @jrbourbeau ! |
Thanks @dcherian. Feel free to let me know if you or others run into this issue elsewhere. I also think it's an edge case the vast majority of users won't encounter (this is the first occurrence I've seen outside of the dask test suite), but if that turns out to not be the case then we can make adjustments upstream in dask 👍 |
* upstream/main: (291 commits) Update error message when saving multiindex (pydata#7475) DOC: cross ref the groupby tutorial (pydata#7555) [pre-commit.ci] pre-commit autoupdate (pydata#7543) supress namespace_package deprecation warning (doctests) (pydata#7548) [skip-ci] Add PDF of Xarray logo (pydata#7530) Support complex arrays in xr.corr (pydata#7392) clarification for thresh arg of dataset.dropna() (pydata#7481) [pre-commit.ci] pre-commit autoupdate (pydata#7524) Require to explicitly defining optional dimensions such as hue and markersize (pydata#7277) Use plt.rc_context for default styles (pydata#7318) Update HOW_TO_RELEASE.md (pydata#7512) Update whats-new for dev (pydata#7511) Fix whats-new for 2023.02.0 (pydata#7506) Update apply_ufunc output_sizes error message (pydata#7509) Zarr: drop "source" and "original_shape" from encoding (pydata#7500) [pre-commit.ci] pre-commit autoupdate (pydata#7507) Whats-new for 2023.03.0 Add `inclusive` argument to `cftime_range` and `date_range` and deprecate `closed` argument (pydata#7373) Make text match code example (pydata#7499) Remove Dask single-threaded setting in tests (pydata#7489) ...
I'm not totally sure why
single-threaded
was being set to begin with, so I might be missing some important context hereCloses #7483