Skip to content

[ENH] test for get_test_params, and reserved parameters#4279

Merged
fkiraly merged 8 commits intomainfrom
reserved_params
Mar 11, 2023
Merged

[ENH] test for get_test_params, and reserved parameters#4279
fkiraly merged 8 commits intomainfrom
reserved_params

Conversation

@fkiraly
Copy link
Copy Markdown
Collaborator

@fkiraly fkiraly commented Mar 2, 2023

This PR introduces:

  • an interface test for the get_test_params method of BaseObject descendants. It tests whether the return has the expected type.
  • introduces the concept of "reserved parameters", i.e., constructor parameters that are not object parameters but type modifying and therefore cannot be tested in the same way as ordinary parameters. Examples are the existing multioutput and multilevel parameters, which change the logical type of the metric. This is implemented as a tag reserved_params.
  • adds the reserved_params tag in the base metric classes

@fkiraly fkiraly added enhancement Adding new functionality module:base-framework BaseObject, registry, base framework labels Mar 2, 2023
@fkiraly fkiraly requested a review from RNKuhns as a code owner March 2, 2023 23:09
@fkiraly fkiraly merged commit fcfc826 into main Mar 11, 2023
@fkiraly fkiraly deleted the reserved_params branch March 11, 2023 19:30
fkiraly added a commit that referenced this pull request Aug 12, 2023
In order to test parameter settings for estimators properly, each
important parameter should have been set to a non-default.
This PR introduces a test which checks that there are at least two test
parameter sets (if the estimator has at least one parameter), and
correctness of these sets.

Requires:
* #4279 for the general test for
`get_test_params` (no specific number assumed)
* #2835 as it uses
the parameter name interface
* #3428 to pass the
`no-softdeps` step.

Current estimators are not tested due to differential testing.

If diff testing is turned off, helps tracking down the estimators that
do not yet have two parameter sets, see #3429.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adding new functionality module:base-framework BaseObject, registry, base framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant