Skip to content

Commit

Permalink
remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamar Grey committed Mar 15, 2023
1 parent 01dbd68 commit 046857e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def fit(self, X: pd.DataFrame, y: Optional[pd.Series] = None):
Raises:
ValueError: If y was not passed in.
"""
# --> need to call manage woodwork first then handle then fillna
X, y = self._manage_woodwork(X, y)
X, y = self._handle_nullable_types(X, y)
if X is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def fit(self, X, y=None):
X_encoded = self._encode_categories(X, fit=True)
if y is not None:
y = infer_feature_types(y)
# --> dont love calling this after we encode categories
# --> dont love calling this after we encode categories - try putting it first?
X_d, y_d = self._handle_nullable_types(X_encoded, y)
self._component_obj.fit(X_d, y_d)
return self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class TimeSeriesImputer(Transformer):
# Incompatibility: https://github.com/alteryx/evalml/issues/4001
# TODO: Remove when support is added https://github.com/alteryx/evalml/issues/4014
_integer_nullable_incompatibilities = ["X", "y"]
# --> confirm that there isnt a bool nullable incom bc we wont ever pass it in via X to interpolate
_boolean_nullable_incompatibilities = ["y"]

def __init__(
Expand Down Expand Up @@ -178,7 +177,6 @@ def transform(self, X, y=None):
new_ltypes = None

if self._forwards_cols is not None:
# --> ww here is unnecessary and below
X_forward = X[self._forwards_cols]
imputed = X_forward.pad()
imputed.bfill(inplace=True) # Fill in the first value, if missing
Expand Down
2 changes: 1 addition & 1 deletion evalml/tests/component_tests/test_oversampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def test_oversampler_with_nullable_types(
nullable_type_target,
nullable_y_ltype,
):
# --> consider testing with diff params
# --> consider testing with diff params here and in other tests
X = nullable_type_test_data(has_nans=False)
# Oversampler can only handle numeric and boolean columns
X = X.ww.select(include=["numeric", "Boolean", "BooleanNullable"])
Expand Down
4 changes: 0 additions & 4 deletions evalml/tests/component_tests/test_time_series_imputer.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@ def test_imputer_calls_handle_nullable_types(
numeric_impute_strategy,
categorical_impute_strategy,
):
# --> also include other types to see how they play together?
X = imputer_test_data.ww[
["dates", "int col", "float col", "float with nan", "all nan"]
]
Expand All @@ -740,6 +739,3 @@ def test_imputer_calls_handle_nullable_types(

imputer.transform(X, y)
assert mock_handle_nullable_types.call_count == 2


# --> test impute bool null and int null maintain those types

0 comments on commit 046857e

Please sign in to comment.