Unverified Commit 337103d3 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[dask] run one training task on each worker (#4132)

* [dask] run one training task on each worker

* add comment on pure

* missing ticks

* empty commit
parent 9cab93a9
......@@ -380,6 +380,13 @@ def _train(
num_machines = len(worker_address_to_port)
# Tell each worker to train on the parts that it has locally
#
# This code treates ``_train_part()`` calls as not "pure" because:
# 1. there is randomness in the training process unless parameters ``seed``
# and ``is_deterministic`` are set
# 2. even with those parameters set, the output of one ``_train_part()`` call
# relies on global state (it and all the other LightGBM training processes
# coordinate with each other)
futures_classifiers = [
client.submit(
_train_part,
......@@ -391,6 +398,9 @@ def _train(
num_machines=num_machines,
time_out=params.get('time_out', 120),
return_model=(worker == master_worker),
workers=[worker],
allow_other_workers=False,
pure=False,
**kwargs
)
for worker, list_of_parts in worker_map.items()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment