Skip to content
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

[Feature Store] Making features/entities optional in feature-set spec #902

Merged
merged 4 commits into from Apr 29, 2021

Conversation

theSaarco
Copy link
Member

@theSaarco theSaarco commented Apr 29, 2021

The code in FeatureSetSpec had features and entities as mandatory lists. This means that if a user does feature_set.save() on an object without them, it will cause failures. This is not the expected behavior.
As a side effect, once they became optional, had to change the way feature_set.dict() behaves and add exclude_none=True, because otherwise the dictionary created would have (for example) {"entities": None}, and various get calls such as entities = feature_set_spec.pop("entities", []) would return None rather than the expected [] since the default value is only used when the key does not exist in the dictionary, not when it is None. Using exclude_none fixes this behaviour.

@Hedingber Hedingber merged commit e272b16 into mlrun:development Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants