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 copy_dataframe parameter, update requirements with release of Woodwork v0.0.6 #1478

Merged
merged 6 commits into from Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core-requirements.txt
Expand Up @@ -10,6 +10,6 @@ psutil>=5.6.3
requirements-parser>=0.2.0
shap>=0.35.0
texttable>=1.6.2
woodwork>=0.0.5
woodwork>=0.0.6
featuretools>=0.20.0
nlp-primitives>=1.1.0
1 change: 1 addition & 0 deletions docs/source/release_notes.rst
Expand Up @@ -5,6 +5,7 @@ Release Notes
* Enhancements
* Fixes
* Updated ``Woodwork`` to >=0.0.5 in ``core-requirements.txt`` :pr:`1473`
* Removed ``copy_dataframe`` parameter for ``Woodwork``, updated ``Woodwork`` to >=0.0.6 in ``core-requirements.txt`` :pr:`1478`
* Updated ``detect_problem_type`` to use ``pandas.api.is_numeric_dtype`` :pr:`1476`
* Changes
* Changed ``make clean`` to delete coverage reports as a convenience for developers :pr:`1464`
Expand Down
6 changes: 3 additions & 3 deletions evalml/tests/automl_tests/test_automl.py
Expand Up @@ -1767,7 +1767,7 @@ def test_automl_woodwork_user_types_preserved(mock_binary_fit, mock_binary_score
X['num col'] = pd.Series(new_col)
X['text col'] = pd.Series([f"{num}" for num in range(len(new_col))])
X = ww.DataTable(X, semantic_tags={'cat col': 'category', 'num col': 'numeric'},
logical_types={'cat col': 'Categorical', 'num col': 'WholeNumber', 'text col': 'NaturalLanguage'})
logical_types={'cat col': 'Categorical', 'num col': 'Integer', 'text col': 'NaturalLanguage'})
automl = AutoMLSearch(problem_type=problem_type, max_batches=5)
automl.search(X, y)
for arg in mock_fit.call_args[0]:
Expand All @@ -1776,7 +1776,7 @@ def test_automl_woodwork_user_types_preserved(mock_binary_fit, mock_binary_score
assert arg.semantic_tags['cat col'] == {'category'}
assert arg.logical_types['cat col'] == ww.logical_types.Categorical
assert arg.semantic_tags['num col'] == {'numeric'}
assert arg.logical_types['num col'] == ww.logical_types.WholeNumber
Copy link
Contributor Author

Choose a reason for hiding this comment

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

WholeNumber was removed

assert arg.logical_types['num col'] == ww.logical_types.Integer
assert arg.semantic_tags['text col'] == set()
assert arg.logical_types['text col'] == ww.logical_types.NaturalLanguage
for arg in mock_score.call_args[0]:
Expand All @@ -1785,7 +1785,7 @@ def test_automl_woodwork_user_types_preserved(mock_binary_fit, mock_binary_score
assert arg.semantic_tags['cat col'] == {'category'}
assert arg.logical_types['cat col'] == ww.logical_types.Categorical
assert arg.semantic_tags['num col'] == {'numeric'}
assert arg.logical_types['num col'] == ww.logical_types.WholeNumber
assert arg.logical_types['num col'] == ww.logical_types.Integer
assert arg.semantic_tags['text col'] == set()
assert arg.logical_types['text col'] == ww.logical_types.NaturalLanguage

Expand Down
4 changes: 3 additions & 1 deletion evalml/utils/gen_utils.py
Expand Up @@ -300,9 +300,11 @@ def _convert_to_woodwork_structure(data):
ww_data = pd.DataFrame(ww_data)

# Convert pandas data structures to Woodwork data structures
ww_data = ww_data.copy()
if isinstance(ww_data, pd.Series):
return ww.DataColumn(ww_data)
return ww.DataTable(ww_data, copy_dataframe=True)

return ww.DataTable(ww_data)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, so is DataTable copying implicitly now? The docs for the constructor just say "create datatable"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EDIT: Oops, didn't read your comment thoroughly. It doesn't copies implicitly.

See description for alteryx/woodwork#398!

Copy link
Contributor

Choose a reason for hiding this comment

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



def _convert_woodwork_types_wrapper(pd_data):
Expand Down