FIX allow to output error_score if a scoring failure happen #18343
Conversation
- If a scorer fails during the model selection, set score to error_score similar to the fit failing scenario - Modify scorer fail test cases to expect warning messages instead of a ValueError exception
- If a scorer fails during the model selection, set score to error_score similar to the fit failing scenario - Modify scorer fail test cases to expect warning messages instead of a ValueError exception
- Tests are mofified to catch warnings instead of assert_warns - UserWarning is thrown now when scoring fails, instead of reusing the FitFailedWarning which is misleading
Also handle the case, when MultiMetric scorer fails and throws an exception.
This needs a whats new entry. Otherwise LGTM. |
Small API improvement suggestion but otherwise LGTM: |
Co-authored-by: Olivier Grisel <[email protected]>
7dcb1ac
into
scikit-learn:master
21 checks passed
21 checks passed
scikit-learn.scikit-learn (Linux pylatest_pip_openblas_pandas)
Linux pylatest_pip_openblas_pandas succeeded
Details
scikit-learn.scikit-learn (Linux32 py36_ubuntu_atlas_32bit)
Linux32 py36_ubuntu_atlas_32bit succeeded
Details
scikit-learn.scikit-learn (Linux_Runs pylatest_conda_mkl)
Linux_Runs pylatest_conda_mkl succeeded
Details
scikit-learn.scikit-learn (Windows py36_pip_openblas_32bit)
Windows py36_pip_openblas_32bit succeeded
Details
scikit-learn.scikit-learn (macOS pylatest_conda_mkl_no_openmp)
macOS pylatest_conda_mkl_no_openmp succeeded
Details
Thanks @dsandeep0138 and @glemaitre! |
amrcode
added a commit
to amrcode/scikit-learn
that referenced
this pull request
Oct 19, 2020
…learn#18343) Co-authored-by: Devi Sandeep Endluri <[email protected]> Co-authored-by: Olivier Grisel <[email protected]>
jayzed82
added a commit
to jayzed82/scikit-learn
that referenced
this pull request
Oct 22, 2020
…learn#18343) Co-authored-by: Devi Sandeep Endluri <[email protected]> Co-authored-by: Olivier Grisel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Supersedes and closes #17617
Fixes #17589
Move scoring within try/except to give an error score instead of failing.