Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WeichenXu123 committed Sep 23, 2022
1 parent 5b3666d commit afbd986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python-package/xgboost/spark/core.py
Expand Up @@ -295,7 +295,7 @@ def _validate_params(self):
if not isinstance(self.getOrDefault(self.eval_metric), str):
raise ValueError("Only string type 'eval_metric' param is allowed.")

if self.isDefined(self.early_stopping_rounds):
if self.getOrDefault(self.early_stopping_rounds) is not None:
if not (
self.isDefined(self.validationIndicatorCol) and self.getOrDefault(self.validationIndicatorCol)
):
Expand Down

0 comments on commit afbd986

Please sign in to comment.