Skip to content

Commit

Permalink
doc strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Nov 11, 2024
1 parent 630dbce commit 2358a4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python-package/xgboost/collective.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Config:
timeout : See `dmlc_timeout` in :py:meth:`init`.
tracker_host : See :py:class:`~xgboost.tracker.RabitTracker`.
tracker_port : See :py:class:`~xgboost.tracker.RabitTracker`.
tracker_timeout : See :py:class:`~xgboost.tracker.RabitTracker`.
"""

Expand All @@ -51,6 +52,7 @@ def get_comm_config(self, args: _Args) -> _Args:
return args

def to_dict(self) -> _Args:
"Convert the configuration into a dictionary."
return {
k: getattr(self, k)
for k in (
Expand All @@ -64,6 +66,7 @@ def to_dict(self) -> _Args:

@staticmethod
def from_dict(cfg: _Args) -> "Config":
"Create a configuration from a dictionary."
T = TypeVar("T", str, int)

def to_t(key: str, typ: T) -> Optional[T]:
Expand Down

0 comments on commit 2358a4c

Please sign in to comment.