WW 0.2.0: Update Data Checks#2182
Conversation
Codecov Report
@@ Coverage Diff @@
## 2035-use-ww-accessor #2182 +/- ##
======================================================
+ Coverage 20.8% 27.4% +6.6%
======================================================
Files 295 295
Lines 24335 24336 +1
======================================================
+ Hits 5057 6657 +1600
+ Misses 19278 17679 -1599
Continue to review full report at Codecov.
|
1f71e50 to
6039340
Compare
angela97lin
left a comment
There was a problem hiding this comment.
Amazing, looks like this update was nice and clean! 🥂
| y = ww.DataColumn(y) | ||
| y_long = ww.DataColumn(y_long) | ||
| y_balanced = ww.DataColumn(y_balanced) | ||
| X.ww.init() |
There was a problem hiding this comment.
O interesting, do we need to set X = X.ww.init() here?
There was a problem hiding this comment.
(Just wondering between the difference between this and line 114)
There was a problem hiding this comment.
+1, my guess is that the assignment in X = X.ww.init() is redundant but harmless
There was a problem hiding this comment.
Great question! We can't assign the result of ww.init to anything because ww.init returns None. Just fixed a typo about this in this file that I missed.
There was a problem hiding this comment.
interesting that ww.init() modifies in place while the equivalent for series returns a new series
There was a problem hiding this comment.
Got it, thanks for the explanation!
There was a problem hiding this comment.
Great question! We can't assign the result of
ww.initto anything becauseww.initreturnsNone. Just fixed a typo about this in this file that I missed.
@freddyaboulton So, I'm a little late to the party here, but I'm wondering if we should actually return self from our Woodwork init method. If I'm thinking about this correctly, doing so would allow for chaining operations like df.ww.init().ww.describe() and also make the re-assignment situation valid. Thoughts?
| pytest evalml -n 4 --cov=evalml --junitxml=test-reports/junit.xml --doctest-continue-on-failure \ | ||
| --ignore evalml/tests/component_tests \ | ||
| --ignore evalml/tests/pipeline_tests --ignore evalml/tests/automl_tests --ignore evalml/tests/data_checks_tests \ | ||
| --ignore evalml/tests/pipeline_tests --ignore evalml/tests/automl_tests \ |
| id_cols = {col: 0.95 for col in cols_named_id} | ||
|
|
||
| X = X.select(include=['Integer', 'Categorical']) | ||
| X = _convert_woodwork_types_wrapper(X.to_dataframe()) |
bchen1116
left a comment
There was a problem hiding this comment.
Looks good! Left a couple of questions, but great job cranking this out so quickly!
| @@ -1,6 +1,5 @@ | |||
| import numpy as np | |||
| import pandas as pd | |||
| import woodwork as ww | |||
There was a problem hiding this comment.
Question, but why do we no longer need to import woodwork, even if we're using ww.init() and other ww methods?
There was a problem hiding this comment.
Great observation! This is something I hadn't noticed actually.
In order to use the accessor, woodwork needs to be present in the namespace but it doesn't need to be imported in the same file that you use it. Since our evaml/__init__.py file imports ww by way of importing our submodules, ww is imported when our tests run so we can use the accessor.
I suspect I originally kept the import but then deleted it because of lint since it's not "needed".
There was a problem hiding this comment.
Oh that's interesting. Thanks for the clarification!
* WW Accessor: Update demo datasets, preprocessing, and utils (#2172) * Update demos, utils, and preprocessing * Updating make test commands * Update ww requirement * Add test that infer_feature_types preserves schema * Add test that infer_feature_types raises errors with invalid schema * load_data always returns woodwork info. Deleted return_pandas * Updating docstrings * Release notes for first PR * Deleting redundant tests * update test name * WW 0.2.0: Update Data Checks (#2182) * Updating data checks * Undo accidental edit * Fixing typo where we assign to ww.init * WW Accessor: Updating objectives (#2185) * Updating objectives * Deleting superfluous pd.Series * WW Accessor: Updating Components (#2191) * Update components - first commit * Update delayed_features_transformer to not use assign * Fixing tests * Skipping Boolean with Nan test in imputers * Fixing base sampler _prepare_data * Fixing target imputer null bool test * Fix test skips * Addressing comments * Clean up sampler tests * Editing docstrings * Update to ww 0.3.0 * Fixing components that didn't have merge conflicts * WW 0.2.0 Update: Updating pipelines (#2205) * Updating pipelines * Fixing docstrings * Fix stacked test * Add tests to check input data not modified * Use rename in component graph * WW Accessor: Update model understanding (#2247) * Update model understanding module * Removing unused import * WW Accessor: Update Automl (#2243) * Updating pipelines * Fixing docstrings * Fix stacked test * Update automl * Update to preserve schema * Preserve schema in train_pipelines/score_pipelines * No ww drop * Update standard scaler * Use weak ref feture branch * Add tests to check input data not modified * Use weak-ref branch * Use weak ref branch * Fixing tests * Set ww back to 0.3.0 * Adding objective tests that use automl * Add back minimal-dependencies-flag * Fix test command * Updating docstrings adding dask test to check schema is sent * Fixing import order in test_dask_engine * Fixing last remaining docstrings * Fix typo in ignore command * Use ww init series * No doctest modules yet * Fix docstrings & use schemas stored in automl_config * WW Update: Update docs and docstrings (#2292) * Fixing docs and docstrings * Update docstring in highly_null_data_check * Delete warning from init * Remove print(X.ww) * Fixing notebook python version :( * Update release notes * Delete _convert_woodwork_types_wrapper completely * Fixing coverage * Add back standard scaler try * Remove _convert_woodwork_types_wrapper from docs' * Linting docs * Merging main * Fix release notes

Pull Request Description
Update data checks to use the new woodwork accessor
After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of
docs/source/release_notes.rstto include this pull request by adding :pr:123.