Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test get_params in all of our visualizers #1252

Open
bbengfort opened this issue May 21, 2022 · 0 comments
Open

Test get_params in all of our visualizers #1252

bbengfort opened this issue May 21, 2022 · 0 comments

Comments

@bbengfort
Copy link
Member

bbengfort commented May 21, 2022

Describe the issue

In #1232 we discovered that printing out a Visualizer in a notebook with the KElbowVisualizer was failing because calls to get_params were failing with an attribute error. We also experienced this issue with the DroppingCurve visualizer. ModelVisualizers wrap estimator objects and the error messages from get_params -- AttributeError were confusing, so we updated the Wrapper class to return better error messages.

The fix for the KElbow visualizer was to ensure that all hyperparameters pass in __init__ were getting saved on the estimator because of sklearn's metaprogramming. The fix for DroppingCurve was different. However, to make sure that all our visualizer are working in the future, we should add a simple test_get_params for each visualizer as follows:

    def test_get_params(self):
        """
        Ensure dropping curve get params works correctly
        """
        oz = DroppingCurve(MultinomialNB())
        params = oz.get_params()
        assert len(params) > 0
@bbengfort bbengfort mentioned this issue May 21, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant