Skip to content

Commit

Permalink
Update example on how to use Dask to do grid search
Browse files Browse the repository at this point in the history
  • Loading branch information
dnouri committed Aug 29, 2019
1 parent 0f12ac2 commit 9f5ef37
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions docs/user/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,24 +208,23 @@ grid search:

.. code-block:: python
{
'grid_search': {
'__factory__': 'palladium.fit.with_parallel_backend',
'estimator': {
'__factory__': 'sklearn.model_selection.GridSearchCV',
'estimator': {'__copy__': 'model'},
'param_grid': {
'C': [0.1, 0.3, 1.0],
},
'n_jobs': -1,
'param_grid': {'__copy__': 'grid_search.param_grid'},
'scoring': {'__copy__': 'scoring'},
},
'backend': 'dask.distributed',
'scheduler_host': '127.0.0.1:8786',
'backend': 'dask',
},

'_init_distributed': {
'__factory__': 'palladium.util.resolve_dotted_name',
'dotted_name': 'distributed.joblib.joblib',
'_init_client': {
'__factory__': 'dask.distributed.Client',
'address': '127.0.0.1:8786',
},
}

To start up the Dask scheduler and workers you can follow the
dask.distributed documentation. Here's an example that runs three
Expand All @@ -236,7 +235,7 @@ workers locally:
$ dask-scheduler
Scheduler started at 127.0.0.1:8786
$ dask-worker 127.0.0.1:8786
$ dask-worker 127.0.0.1:8786 # start each in a new terminal
$ dask-worker 127.0.0.1:8786
$ dask-worker 127.0.0.1:8786
Expand Down

0 comments on commit 9f5ef37

Please sign in to comment.