Fixing coverage in TextFeaturizer - #1842
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1842 +/- ##
========================================
+ Coverage 99.9% 100.0% +0.1%
========================================
Files 255 255
Lines 20655 20658 +3
========================================
+ Hits 20633 20650 +17
+ Misses 22 8 -14
Continue to review full report at Codecov.
|
chukarsten
left a comment
There was a problem hiding this comment.
Cool, took me a second to understand what was going on, but cool.
| if pipeline_class == LinearPipelineWithTextFeatures: | ||
| X = X.set_types(logical_types={'provider': 'NaturalLanguage'}) | ||
|
|
There was a problem hiding this comment.
Just for my edification, is the reason this test covers those lines because the change in logical types forces a derivation of the provenance?
There was a problem hiding this comment.
Yea the provenance is only computed if the text featurizer creates features. If you run it on a dataset without text features, the provenance will always be an empty dict. Since the text featurizer will (now) only compute features on columns of logical type NaturalLanguage, we have to create one for the component to be able to do its thing.
Pull Request Description
With the removal of
text_columnsin #1652, the_get_feature_provenancemethod ofTextFeaturizerandLSAwas no longer being covered because the test dataset doesn't have any text features and the text features were specified withtext_columns.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.