ENH Better error message needed when accidentall…#16861
Merged
thomasjpfan merged 1 commit intoscikit-learn:masterfrom Apr 10, 2020
Merged
ENH Better error message needed when accidentall…#16861thomasjpfan merged 1 commit intoscikit-learn:masterfrom
thomasjpfan merged 1 commit intoscikit-learn:masterfrom
Conversation
Modified the def test_grid_search_bad_param_grid function in test_search.py to accept the changes made in _search.py.
thomasjpfan
approved these changes
Apr 10, 2020
Member
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you @MichaelShoemaker !
gio8tisu
pushed a commit
to gio8tisu/scikit-learn
that referenced
this pull request
May 15, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue: #12640
Modified the error message wording to explicitly state that single values must be wrapped in a list.
Former Message:
ValueError: Parameter values for parameter (booster) need to be a sequence(but not a string) or np.ndarray.
Updated Message:
ValueError: Parameter grid for parameter (colsample_bytree) needs to be a list or numpy array, but got (<class 'int'>). Single values need to be wrapped in a list with one element.