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

ReplaceNullableTypes Component #3090

Merged
merged 35 commits into from
Dec 7, 2021
Merged

Conversation

chukarsten
Copy link
Contributor

Addresses #3057

@codecov
Copy link

codecov bot commented Nov 22, 2021

Codecov Report

Merging #3090 (168fa5c) into main (6a82b55) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3090     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        315     317      +2     
  Lines      30547   30679    +132     
=======================================
+ Hits       30447   30579    +132     
  Misses       100     100             
Impacted Files Coverage Δ
evalml/pipelines/components/__init__.py 100.0% <ø> (ø)
...alml/pipelines/components/transformers/__init__.py 100.0% <ø> (ø)
evalml/tests/component_tests/test_utils.py 95.7% <ø> (ø)
.../components/transformers/preprocessing/__init__.py 100.0% <100.0%> (ø)
...ansformers/preprocessing/replace_nullable_types.py 100.0% <100.0%> (ø)
evalml/tests/component_tests/test_components.py 99.0% <100.0%> (ø)
...ts/component_tests/test_nullable_types_replacer.py 100.0% <100.0%> (ø)

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 6a82b55...168fa5c. Read the comment docs.

@@ -85,6 +85,14 @@ installdeps:
pip install --upgrade pip -q
pip install -e . -q

.PHONY: installdeps-min
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A convenience to help people debug the minimum dependency checks we have in CI.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should use this in the CI job? Maybe in a follow-up pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is already done in the github workflows, specifically the min deps CI workflows. I just put it in here so people can build a test environment to run them. If there's a better way that people do it, I can take this out!

@@ -831,7 +832,8 @@ def test_component_has_random_seed():
assert "random_seed" in params


def test_transformer_transform_output_type(X_y_binary):
@pytest.mark.parametrize("component_class", _all_transformers())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just modified this test to move the for-loop to pytest parameters. Made it easier on test failure to understand which transformer component was failing.

type(y),
y.name if isinstance(y, pd.Series) else None,
)
if component_class in [PolynomialDetrender, LogTransformer, LabelEncoder]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should all be de-indenting...


@pytest.mark.parametrize("nullable_types_properly_set", [True, False])
@pytest.mark.parametrize("input_type", ["ww", "pandas"])
def test_replace_nullable_types_integer_target(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially, the boolean and integer target tests were together, but it resulted in too much branch-complexity and ultimately made the tests harder to understand.

@chukarsten chukarsten marked this pull request as ready for review December 2, 2021 16:38
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.

@chukarsten Thank you for this! I think the behavior and testing is solid. I left some minor comments on how to stream-line the implementation.

@@ -85,6 +85,14 @@ installdeps:
pip install --upgrade pip -q
pip install -e . -q

.PHONY: installdeps-min
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use this in the CI job? Maybe in a follow-up pr.

@chukarsten chukarsten merged commit 16e7e67 into main Dec 7, 2021
@chukarsten chukarsten mentioned this pull request Dec 9, 2021
@freddyaboulton freddyaboulton deleted the nullable_types_preprocessing branch May 13, 2022 15:23
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.

None yet

5 participants