Properly reset dask.config scheduler and shuffle when closing the client#2475
Properly reset dask.config scheduler and shuffle when closing the client#2475mrocklin merged 1 commit intodask:masterfrom gsakkis:master
Conversation
| with self._set_config: | ||
| pass | ||
| if self.get == dask.config.get('get', None): | ||
| del dask.config.config['get'] |
There was a problem hiding this comment.
What if the user had specified something prior to starting the scheduler, like
dask.config.set(scheduler='threads')
with Client():
pass
assert dask.config.get('scheduler') == 'threads'There was a problem hiding this comment.
Just tested it, the assertion passes; the with self._set_config restores the previous settings at exit.
There was a problem hiding this comment.
OK, you're right. That's a nice solution.
|
This looks good to me. It looks like there is a test failure though. You might have to slightly modify that test. |
|
I fixed the related test, the others that fail randomly are probably irrelevant ( |
|
Thanks @gsakkis ! Merging. |
|
Also, I notice that this is your first code contribution to this repository. Welcome! |
Fixes #2473