Skip to content

Commit

Permalink
Revert trying to make distributed a soft dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
stsievert committed Feb 20, 2019
1 parent 159ee67 commit 3574b0d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 34 deletions.
12 changes: 1 addition & 11 deletions dask_ml/model_selection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@
These estimators will operate in parallel. Their scalability depends
on the underlying estimators being used.
"""
from warnings import warn

from ._search import GridSearchCV, RandomizedSearchCV, compute_n_splits, check_cv
from ._split import ShuffleSplit, KFold, train_test_split
try:
import distributed
except ImportError:
warn(
"The Dask Distributed library has not been found. The IncrementalSearchCV"
"class and it's children depend on it. For installation instructions, "
"see http://docs.dask.org/en/latest/install.html", ImportWarning
)


__all__ = [
Expand All @@ -32,5 +22,5 @@
from ._incremental import IncrementalSearchCV # noqa: F401

__all__.extend(["IncrementalSearchCV"])
except ImportError as e:
except ImportError:
pass
5 changes: 1 addition & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
import dask.dataframe as dd
import numpy as np
import pytest
try:
from distributed.utils_test import cluster
except ImportError:
pass
from distributed.utils_test import cluster

from dask_ml.datasets import (
make_blobs,
Expand Down
5 changes: 0 additions & 5 deletions tests/model_selection/test_incremental.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@
import dask.array as da
import numpy as np
import toolz

from dask.distributed import Future
from distributed.utils_test import cluster, gen_cluster, loop # noqa: F401

import pytest
from sklearn.base import BaseEstimator
from sklearn.cluster import MiniBatchKMeans
from sklearn.linear_model import SGDClassifier
from sklearn.model_selection import ParameterGrid, ParameterSampler
from tornado import gen
import pytest

from dask_ml.datasets import make_classification
from dask_ml.model_selection import IncrementalSearchCV
from dask_ml.model_selection._incremental import _partial_fit, _score, fit
import dask_ml.model_selection


@gen_cluster(client=True, timeout=500)
Expand Down
14 changes: 0 additions & 14 deletions tests/model_selection/test_no_distributed.py

This file was deleted.

0 comments on commit 3574b0d

Please sign in to comment.