Set the network configuration. Parameters ---------- machines : list, set or string Names of machines. local_listen_port : int, optional (default=12400) TCP listen port for local machines. listen_time_out : int, optional (default=120)
(self, machines, local_listen_port=12400,
listen_time_out=120, num_machines=1)
| 1833 | return self |
| 1834 | |
| 1835 | def set_network(self, machines, local_listen_port=12400, |
| 1836 | listen_time_out=120, num_machines=1): |
| 1837 | """Set the network configuration. |
| 1838 | |
| 1839 | Parameters |
| 1840 | ---------- |
| 1841 | machines : list, set or string |
| 1842 | Names of machines. |
| 1843 | local_listen_port : int, optional (default=12400) |
| 1844 | TCP listen port for local machines. |
| 1845 | listen_time_out : int, optional (default=120) |
| 1846 | Socket time-out in minutes. |
| 1847 | num_machines : int, optional (default=1) |
| 1848 | The number of machines for parallel learning application. |
| 1849 | |
| 1850 | Returns |
| 1851 | ------- |
| 1852 | self : Booster |
| 1853 | Booster with set network. |
| 1854 | """ |
| 1855 | _safe_call(_LIB.LGBM_NetworkInit(c_str(machines), |
| 1856 | ctypes.c_int(local_listen_port), |
| 1857 | ctypes.c_int(listen_time_out), |
| 1858 | ctypes.c_int(num_machines))) |
| 1859 | self.network = True |
| 1860 | return self |
| 1861 | |
| 1862 | def free_network(self): |
| 1863 | """Free Booster's network. |
no test coverage detected