Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pyspark] eval_result is not working #8352

Closed
wbo4958 opened this issue Oct 18, 2022 · 1 comment · Fixed by #8355
Closed

[pyspark] eval_result is not working #8352

wbo4958 opened this issue Oct 18, 2022 · 1 comment · Fixed by #8355

Comments

@wbo4958
Copy link
Contributor

wbo4958 commented Oct 18, 2022

    @wbo4958 @WeichenXu123 

Hi guys, sorry for my late response to this thread. I finally had the chance to try the new code and it works well!!

I just had one problem when I am trying to get the training loss by using this:

results = {}
xgb_classifier = SparkXGBClassifier(**xgb_parms, validation_indicator_col='isVal', evals_result=results, verbose_eval=25, num_workers=16, n_estimators=250, early_stopping_rounds=25, label_col=name)

Then I got this error:

TypeError: train() got multiple values for keyword argument 'evals_result'

It seems that the evals_result is already set within SparkXGBClassifier, but then how can I retrieve the results? I couldn't find anything in the documentation, then I tried some options myself, but none of them works. Thanks!

Originally posted by @faaany in #8221 (comment)

@wbo4958
Copy link
Contributor Author

wbo4958 commented Oct 18, 2022

I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant