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

GridSearchCV does not pick up default Client #249

Closed
mrocklin opened this issue Jun 29, 2018 · 0 comments
Closed

GridSearchCV does not pick up default Client #249

mrocklin opened this issue Jun 29, 2018 · 0 comments

Comments

@mrocklin
Copy link
Member

from dask.distributed import Client
client = Client()

import numpy as np
from sklearn.linear_model import SGDClassifier

model = SGDClassifier(    
    max_iter=1.0, 
)

X = np.random.random((1000, 10))
y = np.random.randint(0, 10, size=(1000,))

from dask_ml.model_selection import GridSearchCV
params = {'alpha': np.logspace(-4, 1, num=20)}
grid = GridSearchCV(model, params, return_train_score=True)
_ = grid.fit(X, y)

assert client.cluster.scheduler.transition_log

My guess is that this changed in the 0.18.0 Dask update. The right function to use today is maybe

https://github.com/dask/dask/blob/master/dask/base.py#L841-L853

mrocklin added a commit to mrocklin/dask-ml that referenced this issue Jul 2, 2018
This removes the _normalize_scheduler function from dask_searchcv and
some of the scheduling names (threaded, sequential) and replaces them
with the Dask logic.

This both unifies logic across projects and also lets the distributed
scheduler take over when it is set as default.

Fixes dask#249
TomAugspurger pushed a commit that referenced this issue Jul 3, 2018
* Use default scheduler sniffing logic from dask

This removes the _normalize_scheduler function from dask_searchcv and
some of the scheduling names (threaded, sequential) and replaces them
with the Dask logic.

This both unifies logic across projects and also lets the distributed
scheduler take over when it is set as default.

Fixes #249
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

No branches or pull requests

1 participant