Unexpected UserWarning: Single-machine scheduler when a distributed client is active might lead to unexpected results
- Dominant language
- Python
- Stars
- 951
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
**What happened**:
Compute calls with `schedule="single-threaded"` while using a distributed client may lead to unexpected results. This needs to be fixed in a few places. So far:
- `dask_ml.datasets.make_classification`
- `dask_ml.cluster.k_means`
However, each of the `:okwarning:` options added in #929 need to be addressed.
Users currently get an unexpected UserWarning:
```
/datasets/vjawa/miniconda3/envs/dask-ml-dev/lib/python3.8/site-packages/dask/base.py:1282: UserWarning: Running on a single-machine scheduler when a distributed client is active might lead to unexpected results.
warnings.warn(
```
**Minimal Complete Verifiable Example**:
```python
from dask.distributed import Client
import dask_ml.datasets
client = Client()
X,y = dask_ml.datasets.make_classification_df(chunks=100)
```
Contributor guide
Assessment
This issue has not been assessed yet.