question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FeatureSet.from_yaml and FeatureSet.from_dict resulting in blank feature sets

See original GitHub issue

Expected 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:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
woopcommented, Feb 2, 2020

Hi @lgvital I have created this issue to track the documentation and development of that functionality https://github.com/gojek/feast/issues/455

0reactions
lgvitalcommented, Feb 1, 2020

That does work, thank you! Does an example in the docs somewhere or in a notebook make sense (if it doesn’t already exist)?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found