featuretools icon indicating copy to clipboard operation
featuretools copied to clipboard

Add `series_library` to `PrimitiveBase`

Open sbadithe opened this issue 1 year ago • 5 comments

-- Add series_library instance variable for PrimitiveBase

sbadithe avatar Jul 28 '22 17:07 sbadithe

Codecov Report

Merging #2210 (044a582) into main (45a06f1) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2210   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files         146      146           
  Lines       17585    17599   +14     
=======================================
+ Hits        17461    17475   +14     
  Misses        124      124           
Impacted Files Coverage Δ
featuretools/feature_base/feature_base.py 97.95% <100.00%> (+0.02%) :arrow_up:
featuretools/feature_base/features_deserializer.py 100.00% <100.00%> (ø)
featuretools/primitives/base/primitive_base.py 100.00% <100.00%> (ø)
featuretools/primitives/utils.py 99.52% <100.00%> (+<0.01%) :arrow_up:
...ests/primitive_tests/test_feature_serialization.py 99.61% <100.00%> (+<0.01%) :arrow_up:
.../tests/primitive_tests/test_features_serializer.py 100.00% <100.00%> (ø)
featuretools/utils/gen_utils.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Jul 28 '22 18:07 codecov[bot]

I'm trying to think of a good way to test this.

We need to make sure series is set before we get the function in the feature_set_calculator

dvreed77 avatar Jul 28 '22 18:07 dvreed77

We need to make sure series is set before we get the function in the feature_set_calculator

What if near the start of calculate_feature_matrix we looped through the features and ensured series_library was set to the right library type?

Edit: While this would be very certain, doing it each time cfm is run vs once at feature creation isn't ideal. It might be more useful to iron out any issues with the feature init approach

rwedge avatar Jul 28 '22 19:07 rwedge

What if the primitive was instantiated before the feature was created?

Does the series_library information persist after using ft.save_features and ft.load_features?

Could I test this by adding a test to test_feature_serialization.py?

sbadithe avatar Jul 28 '22 20:07 sbadithe

It seems like you may have to add series_library to the serializer now.

ozzieD avatar Jul 28 '22 21:07 ozzieD

Not sure what happened here...but I didn't intend to do that

sbadithe avatar Aug 23 '22 23:08 sbadithe