Description
In some PRs for adding validation to functions: #24924 or #25026, there will be double validation, by the function and another by the estimator. @adrinjalali and I share the same concern about keeping constraints in sync between the function and the estimator: #24924 (comment), #25026 (comment).
The test for validation is very strict about including a constraint for every parameter. I see the purpose of having this strictness is such that when a new parameter is added, then a constraint is also included.
I propose adding a parameters_to_validate
to validate_params
which is a collection of strings that states which parameters should be validated. This way when a new parameter is added, the default is to add a constraint for the new parameter, but it can be ignored by adding it to the parameters_to_validate
list.