FeatureSet.from_yaml and FeatureSet.from_dict resulting in blank feature sets
See original GitHub issueExpected Behavior
>>> fs_dict = {'name': 'customer_transactions', 'kind': 'feature_set', 'entities': [{'name': 'customer_id', 'valueType': 'INT64'}], 'features': [{'name': 'daily_transactions', 'valueType': 'FLOAT'}, {'name': 'total_transactions', 'valueType': 'FLOAT', 'maxAge': '3600s'}]}`
>>> fs = FeatureSet.from_dict(fs_dict)
>>> fs.name
'customer_transactions'
Current Behavior
>>> fs_dict = {'name': 'customer_transactions', 'kind': 'feature_set', 'entities': [{'name': 'customer_id', 'valueType': 'INT64'}], 'features': [{'name': 'daily_transactions', 'valueType': 'FLOAT'}, {'name': 'total_transactions', 'valueType': 'FLOAT', 'maxAge': '3600s'}]}`
>>> fs = FeatureSet.from_dict(fs_dict)
>>> fs.name
''
>>> fs.features
[]
The same thing happens with yaml and from_yaml
.
Steps to reproduce
from feast import FeatureSet
fs_dict = {'name': 'customer_transactions', 'kind': 'feature_set', 'entities': [{'name': 'customer_id', 'valueType': 'INT64'}], 'features': [{'name': 'daily_transactions', 'valueType': 'FLOAT'}, {'name': 'total_transactions', 'valueType': 'FLOAT', 'maxAge': '3600s'}]}`
fs = FeatureSet.from_dict(fs_dict)
Specifications
- Version: 0.4.4
- Platform: OSX
- Subplatform: Python 3.7.6 (using local machine’s CLI)
protobuf==3.11.2
Possible Solution
feature_set_proto = json_format.ParseDict(
fs_dict, FeatureSetProto(), ignore_unknown_fields=True
)
Seems related to this line since this ends up blank when run manually–perhaps a protobuf
version issue, or something is off with FeatureSetProto()
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Source code for ml_collections.config_dict.config_dict
This file defines the classes `ConfigDict` and `FrozenConfigDict`, which are "dict-like" data structures with Lua-like access and some other nice features.
Read more >python - dataframe from dict resulting in empty ...
I think part of your issue is that you are using the keyword 'dict', assuming it is a variable. make a dictionary in...
Read more >Building A Flexible Configuration System For Deep Learning ...
Experiments is where we store the trained models, model backups, as well as the results and configurations for a given experiment. We use...
Read more >Models — gammapy vX.Y.Z
Raise IndexError if list is empty or index is out of range. ... Read from YAML file. ... Set bounds for the selected...
Read more >jarvis-bot - Python Package Health Analysis
Fix existing features on Windows OS; Add an unsupported message for ... Set robinhood_token dict to an empty string; Remove unnecessary path appends ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @lgvital I have created this issue to track the documentation and development of that functionality https://github.com/gojek/feast/issues/455
That does work, thank you! Does an example in the docs somewhere or in a notebook make sense (if it doesn’t already exist)?