|
None | __init__ (self, str host_ip, int n_workers, int port=0, bool use_logger=False, str sortby="host") |
|
None | __del__ (self) |
|
Dict[str, Union[str, int]] | worker_envs (self) |
|
List[int] | find_share_ring (self, _TreeMap tree_map, Dict[int, int] parent_map, int rank) |
|
_RingMap | get_ring (self, _TreeMap tree_map, Dict[int, int] parent_map) |
|
Tuple[_TreeMap, Dict[int, int], _RingMap] | get_link_map (self, int n_workers) |
|
None | accept_workers (self, int n_workers) |
|
None | start (self, int n_workers) |
|
None | join (self) |
|
bool | alive (self) |
|
|
| port |
|
| sock |
|
| host_ip |
|
| n_workers |
|
| thread |
|
|
Tuple[_TreeMap, Dict[int, int]] | _get_tree (self, int n_workers) |
|
List[WorkerEntry] | _sort_pending (self, List[WorkerEntry] pending) |
|
|
List[int] | _get_neighbor (int rank, int n_workers) |
|
◆ __init__()
None xgboost.tracker.RabitTracker.__init__ |
( |
|
self, |
|
|
str |
host_ip, |
|
|
int |
n_workers, |
|
|
int |
port = 0 , |
|
|
bool |
use_logger = False , |
|
|
str |
sortby = "host" |
|
) |
| |
A Python implementation of RABIT tracker.
Parameters
..........
use_logger:
Use logging.info for tracker print command. When set to False, Python print
function is used instead.
sortby:
How to sort the workers for rank assignment. The default is host, but users
can set the `DMLC_TASK_ID` via RABIT initialization arguments and obtain
deterministic rank assignment. Available options are:
- host
- task
◆ accept_workers()
None xgboost.tracker.RabitTracker.accept_workers |
( |
|
self, |
|
|
int |
n_workers |
|
) |
| |
Wait for all workers to connect to the tracker.
◆ alive()
bool xgboost.tracker.RabitTracker.alive |
( |
|
self | ) |
|
Wether the tracker thread is alive
◆ find_share_ring()
List[int] xgboost.tracker.RabitTracker.find_share_ring |
( |
|
self, |
|
|
_TreeMap |
tree_map, |
|
|
Dict[int, int] |
parent_map, |
|
|
int
|
rank |
|
) |
| |
get a ring structure that tends to share nodes with the tree
return a list starting from rank
◆ get_link_map()
Tuple[_TreeMap, Dict[int, int], _RingMap] xgboost.tracker.RabitTracker.get_link_map |
( |
|
self, |
|
|
int |
n_workers |
|
) |
| |
get the link map, this is a bit hacky, call for better algorithm
to place similar nodes together
◆ get_ring()
_RingMap xgboost.tracker.RabitTracker.get_ring |
( |
|
self, |
|
|
_TreeMap |
tree_map, |
|
|
Dict[int, int] |
parent_map |
|
) |
| |
get a ring connection used to recover local data
◆ join()
None xgboost.tracker.RabitTracker.join |
( |
|
self | ) |
|
Wait for the tracker to finish.
◆ start()
None xgboost.tracker.RabitTracker.start |
( |
|
self, |
|
|
int |
n_workers |
|
) |
| |
Strat the tracker, it will wait for `n_workers` to connect.
◆ worker_envs()
Dict[str, Union[str, int]] xgboost.tracker.RabitTracker.worker_envs |
( |
|
self | ) |
|
get environment variables for workers
can be passed in as args or envs
The documentation for this class was generated from the following file:
- External/xgboost/python-package/xgboost/tracker.py