Allow passing entities without relationships to CFM#1290
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1290 +/- ##
==========================================
+ Coverage 98.36% 98.38% +0.01%
==========================================
Files 134 134
Lines 14456 14473 +17
==========================================
+ Hits 14220 14239 +19
+ Misses 236 234 -2
Continue to review full report at Codecov.
|
| # handle loading entityset | ||
| from featuretools.entityset.entityset import EntitySet | ||
| if not isinstance(entityset, EntitySet): | ||
| if entities is not None and relationships is not None: |
There was a problem hiding this comment.
Just wondering--why not keep the check for whether entities is not None here? Is there a world in which having no entities wouldn't end up erroring?
If not, it might be nice to catch this with its own error instead of Entity transactions does not exist in entityset, which is where it gets caught in the test below.
There was a problem hiding this comment.
Sure, if we catch there we can give a more descriptive error
Fixes #1287
Before,
calculate_feature_matrixwould check that bothentitiesandrelationshipswere notNonebefore creating an entityset with them, which required passing an empty iterable of relationships in order to work with a single entity. This PR changes that by removing that check and relying on theEntitySetinit method to handle valdiating theentitiesandrelationships