[pyspark] Filter out the unsupported train parameters (#8355)

This commit is contained in:
Bobby Wang
2022-10-18 23:26:02 +08:00
committed by GitHub
parent 3901f5d9db
commit 76f95a6667
2 changed files with 13 additions and 1 deletions

View File

@@ -1126,3 +1126,7 @@ class XgboostLocalTest(SparkTestCase):
classifier = SparkXGBClassifier(early_stopping_rounds=1)
with pytest.raises(ValueError, match="early_stopping_rounds"):
classifier.fit(self.cls_df_train)
def test_unsupported_params(self):
with pytest.raises(ValueError, match="evals_result"):
SparkXGBClassifier(evals_result={})