-
Notifications
You must be signed in to change notification settings - Fork 883
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
Fix relationship path deserialization #665
Conversation
Codecov Report
@@ Coverage Diff @@
## master #665 +/- ##
==========================================
+ Coverage 97.42% 97.42% +<.01%
==========================================
Files 118 118
Lines 9539 9547 +8
==========================================
+ Hits 9293 9301 +8
Misses 246 246
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #665 +/- ##
==========================================
+ Coverage 97.42% 97.42% +<.01%
==========================================
Files 118 118
Lines 9539 9547 +8
==========================================
+ Hits 9293 9301 +8
Misses 246 246
Continue to review full report at Codecov.
|
@@ -605,3 +608,11 @@ def pd_top3(x): | |||
else: | |||
for i1, i2 in zip(true_results.iloc[i], df.iloc[i]): | |||
assert (pd.isnull(i1) and pd.isnull(i2)) or (i1 == i2) | |||
|
|||
|
|||
def _assert_agg_feats_equal(f1, f2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would just checking f1.unique_name() == f2.unique_name()
be enough given the what the method is supposed to do? i don't see any harm in adding the other stuff but unique name should have all this info below included if it is working properly, i think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally that should be enough, but in this case that would be True
even if one of relationship_path
s is a list
and the other is a RelationshipPath
. RelationshipPath
mostly behaves like a list so most of the logic still works, and the line which triggered the error is only hit under specific conditions:
https://github.com/Featuretools/featuretools/blob/a3966fa3b3f078d237f0f27465d56c5f27778395/featuretools/feature_base/feature_base.py#L617-L621
I could just compare unique_name
and relationship_path
– I added the other comparisons to be careful but they don't seem necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. we can leave it as is for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -605,3 +608,11 @@ def pd_top3(x): | |||
else: | |||
for i1, i2 in zip(true_results.iloc[i], df.iloc[i]): | |||
assert (pd.isnull(i1) and pd.isnull(i2)) or (i1 == i2) | |||
|
|||
|
|||
def _assert_agg_feats_equal(f1, f2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. we can leave it as is for now
We were deserializing the
AggregationFeatures.relationship_path
as alist
instead of aRelationshipPath
.Fixes #657