-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Update eval_metric validation to support list of strings #8826
Update eval_metric validation to support list of strings #8826
Conversation
Did you test this pull request on your machine? |
Yes, I have tested it. It works well. After deleting these three lines, I am able to train a SparkXGB model with multiple eval_metrics. |
@mzzhang95 Seems eval_metric can accept str or list[str], could you add the list[str] support instead of getting rid of the validation? |
Validate if eval_metric is a string or a list of strings.
I added the check back. Now it will check both str and List[str] for eval_metric. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix! Could you please help add a simple test in
class TestPySparkLocal: |
We use pytest
for running python tests.
I added two unit tests for string type and list type And when could this PR be merged? Will there be a release in recent? Thank! |
I should be able to merge it once all tests pass.
Patch release for critical bug fixes only. The next major release will take some time. |
Hey guys, I find that SparkXGB estimators do not support multiple evaluation metric because of param validation.
In this PR, I deleted the param validation for eval_metrics.