Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

grid_search error log should be more specific #53

Closed
idomic opened this issue Oct 26, 2022 · 6 comments · Fixed by #291
Closed

grid_search error log should be more specific #53

idomic opened this issue Oct 26, 2022 · 6 comments · Fixed by #291
Assignees

Comments

@idomic
Copy link
Contributor

idomic commented Oct 26, 2022

The exception log is saying som_param_rf_n_estimators is not a valid parameter, it should imply what are the valid parameters and how the user can move on with the evaluation.

@idomic
Copy link
Contributor Author

idomic commented Oct 26, 2022

plot.grid_search(clf.cv_results_, change='n_estimators', kind='bar'), same happens with unsupported kind

@idomic
Copy link
Contributor Author

idomic commented Jan 10, 2023

@edublancas how can we make the error explicit and informative? Probably we'd also want to offer a solution/path to success here

@edublancas
Copy link
Contributor

I wrote this code many years ago but I think this:

The exception log is saying som_param_rf_n_estimators is not a valid parameter, it should imply what are the valid parameters and how the user can move on with the evaluation.

means the passed parameter does not exist. so we could change to "X does not exist, valid params are Y, and Z"

Same here:

lot.grid_search(clf.cv_results_, change='n_estimators', kind='bar'), same happens with unsupported kind

we could say:

bar is not a valid value for the "kind" parameter, valid values are X, Y, Z.

These are pretty common validations, I suggest we add them to ploomber-core so we can run them in any package. I wrote some of these functions already in ploomber, we can migrate them from there.

@idomic
Copy link
Contributor Author

idomic commented Jan 12, 2023

Sure let's take this approach.

@edublancas
Copy link
Contributor

took a look at ploomber's codebase. Looks like this is the only validation function we have. we can migrate it to ploomber-core, then use it here

@idomic
Copy link
Contributor Author

idomic commented Jan 30, 2023

We should use the built-in python typo functionality as part of this issue.

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

Successfully merging a pull request may close this issue.

3 participants