Skip to content

Commit

Permalink
fix docs for machine_list_filename param (#3863)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored Jan 28, 2021
1 parent b4b1b75 commit 8ef874b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/Parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,8 @@ Network Parameters

- each line contains one IP and one port for one machine. The format is ``ip port`` (space as a separator)

- **Note**: can be used only in CLI version

- ``machines`` :raw-html:`<a id="machines" title="Permalink to this parameter" href="#machines">&#x1F517;&#xFE0E;</a>`, default = ``""``, type = string, aliases: ``workers``, ``nodes``

- list of machines in the following format: ``ip1:port1,ip2:port2``
Expand Down
1 change: 1 addition & 0 deletions include/LightGBM/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ struct Config {
// alias = machine_list_file, machine_list, mlist
// desc = path of file that lists machines for this parallel learning application
// desc = each line contains one IP and one port for one machine. The format is ``ip port`` (space as a separator)
// desc = **Note**: can be used only in CLI version
std::string machine_list_filename = "";

// alias = workers, nodes
Expand Down
4 changes: 0 additions & 4 deletions python-package/lightgbm/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@ class _ConfigAliases:
"local_listen_port": {"local_listen_port",
"local_port",
"port"},
"machine_list_filename": {"machine_list_filename",
"machine_list_file",
"machine_list",
"mlist"},
"machines": {"machines",
"workers",
"nodes"},
Expand Down
3 changes: 1 addition & 2 deletions python-package/lightgbm/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,9 @@ def _train(client, data, label, params, model_factory, sample_weight=None, group

# Some passed-in parameters can be removed:
# * 'machines': constructed automatically from Dask worker list
# * 'machine_list_filename': not relevant for the Dask interface
# * 'num_machines': set automatically from Dask worker list
# * 'num_threads': overridden to match nthreads on each Dask process
for param_alias in _ConfigAliases.get('machines', 'machine_list_filename', 'num_machines', 'num_threads'):
for param_alias in _ConfigAliases.get('machines', 'num_machines', 'num_threads'):
params.pop(param_alias, None)

# Split arrays/dataframes into parts. Arrange parts into dicts to enforce co-locality
Expand Down

0 comments on commit 8ef874b

Please sign in to comment.