Skip to content

Commit

Permalink
pylint.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Sep 2, 2022
1 parent 1af5a8a commit 7fadeb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python-package/xgboost/dask.py
Expand Up @@ -1551,7 +1551,7 @@ async def _async_wrap_evaluation_matrices(
"""A switch function for async environment."""

def _dispatch(ref: Optional[DaskDMatrix], **kwargs: Any) -> DaskDMatrix:
if tree_method == "hist" or tree_method == "gpu_hist":
if tree_method in ("hist", "gpu_hist"):
return DaskQuantileDMatrix(
client=client, ref=ref, max_bin=max_bin, **kwargs
)
Expand Down
2 changes: 1 addition & 1 deletion python-package/xgboost/sklearn.py
Expand Up @@ -910,7 +910,7 @@ def _duplicated(parameter: str) -> None:

def _create_dmatrix(self, ref: Optional[DMatrix], **kwargs: Any) -> DMatrix:
# Use `QuantileDMatrix` to save memory.
if self.tree_method == "hist" or self.tree_method == "gpu_hist":
if self.tree_method in ("hist", "gpu_hist"):
try:
return QuantileDMatrix(
**kwargs, ref=ref, nthread=self.n_jobs, max_bin=self.max_bin
Expand Down

0 comments on commit 7fadeb6

Please sign in to comment.