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

Remove SimpleImputer DeprecationWarning #1018

Merged
merged 7 commits into from Aug 5, 2020
Merged

Conversation

angela97lin
Copy link
Contributor

@angela97lin angela97lin commented Aug 4, 2020

Closes #999

After discussion with @dsherry, we decided that it was fine to keep the SimpleImputer in place, even if we've updated the . The PerColumnImputer currently uses the SimpleImputer in its implementation, and updating it to use our new Imputer would make the API more hairy to use. This PR will now simply remove the DeprecationWarning added in v0.12.0.

@angela97lin angela97lin added this to the August 2020 milestone Aug 4, 2020
@angela97lin angela97lin self-assigned this Aug 4, 2020
@angela97lin angela97lin changed the title Remove SimpleImputer Remove SimpleImputer DeprecationWarning Aug 4, 2020
@codecov
Copy link

codecov bot commented Aug 4, 2020

Codecov Report

Merging #1018 into main will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1018      +/-   ##
==========================================
+ Coverage   99.86%   99.90%   +0.04%     
==========================================
  Files         181      181              
  Lines        9628     9631       +3     
==========================================
+ Hits         9615     9622       +7     
+ Misses         13        9       -4     
Impacted Files Coverage Δ
...components/transformers/imputers/simple_imputer.py 100.00% <ø> (ø)
...valml/tests/component_tests/test_simple_imputer.py 100.00% <ø> (ø)
...ml/tests/component_tests/test_feature_selectors.py 100.00% <100.00%> (ø)
...transformers/feature_selection/feature_selector.py 100.00% <0.00%> (+11.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6749c3c...fdbf50e. Read the comment docs.

@@ -55,10 +52,7 @@ def fit_transform(self, X, y=None):
else:
self.input_feature_names = range(X.shape[1])

try:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing because these lines are not covered by codecov, and our implementation override of Transformer's fit_transform/transform should mean that we're not checking this here... alternatively I could add in a fake mocked feature selector and add tests?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have anything to do with the SimpleImputer though right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freddyaboulton Nope, but removing the warning lines decreased the total number of lines and hence decreased the overall codecov, causing codecov to fail :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angela97lin is it possible to do this change in a separate PR? Its not required to remove the deprecation warning, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you needed to remove this in order to get codecov green, I'd say let's either add a couple quick unit tests for these cases, or ignore codecov and handle this separately.

@angela97lin angela97lin marked this pull request as ready for review August 4, 2020 20:58
Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angela97lin Looks good to me!

@@ -55,10 +52,7 @@ def fit_transform(self, X, y=None):
else:
self.input_feature_names = range(X.shape[1])

try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have anything to do with the SimpleImputer though right?

Copy link
Contributor

@dsherry dsherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, pending resolution of discussion about the changes in feature_selector.py -- which I think we shouldn't handle in this PR

@@ -55,10 +52,7 @@ def fit_transform(self, X, y=None):
else:
self.input_feature_names = range(X.shape[1])

try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angela97lin is it possible to do this change in a separate PR? Its not required to remove the deprecation warning, right?

@@ -55,10 +52,7 @@ def fit_transform(self, X, y=None):
else:
self.input_feature_names = range(X.shape[1])

try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you needed to remove this in order to get codecov green, I'd say let's either add a couple quick unit tests for these cases, or ignore codecov and handle this separately.

@angela97lin angela97lin merged commit e63c32f into main Aug 5, 2020
@angela97lin angela97lin deleted the 999_remove_simple branch August 5, 2020 02:56
This was referenced Aug 6, 2020
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

Successfully merging this pull request may close these issues.

Remove SimpleImputer DeprecationWarning in 0.13.0
3 participants