Repository navigation
Closed
Labels
Description
I found that new api 'Field' will take place of 'Feature' in 0.21+ feast. but Field only have 'name' and 'dtype' parameters. The parameter 'labels' is disappeared.
In my use case 'labels' is very import. 'labels' stores the default value, descriptions,and other things. for example
comic_feature_view = FeatureView(
name="comic_featureV1",
entities=["item_id"],
ttl=Duration(seconds=86400 * 1),
features=[
Feature(name="channel_id", dtype=ValueType.INT32, labels={"default": "14", "desc":"channel"}),
Feature(name="keyword_weight", dtype=ValueType.FLOAT, labels={"default": "0.0", "desc":"keyword's weight"}),
Feature(name="comic_vectorv1", dtype=ValueType.FLOAT, labels={"default": ";".join(["0.0" for i in range(32)]), "desc":"deepwalk vector","faiss_index":"/data/faiss_index/comic_featureV1__comic_vectorv1.index"}),
Feature(name="comic_vectorv2", dtype=ValueType.FLOAT, labels={"default": ";".join(["0.0" for i in range(32)]), "desc":"word2vec vector","faiss_index":"/data/faiss_index/comic_featureV1__comic_vectorv2.index"}),
Feature(name="gender", dtype=ValueType.INT32, labels={"default": "0", "desc":" 0-femal 1-male"}),
Feature(name="pub_time", dtype=ValueType.STRING, labels={"default": "1970-01-01 00:00:00", "desc":"comic's publish time"}),
Feature(name="update_time", dtype=ValueType.STRING, labels={"default": "1970-01-01 00:00:00", "desc":"comic's update time"}),
Feature(name="view_cnt", dtype=ValueType.INT64, labels={"default": "0", "desc":"comic's hot score"}),
Feature(name="collect_cnt", dtype=ValueType.INT64, labels={"default": "0", "desc":"collect count"}),
Feature(name="source_id", dtype=ValueType.INT32, labels={"default": "0", "desc":"comic is from(0-unknown,1-japen,2-usa,3- other)"}),So please keep the parameter 'labels' in Field api
Activity
[-]Keep labels in Filed api[/-][+]Keep labels in Field api[/+]adchia commentedon Apr 25, 2022
Thanks for giving feedback and nice catch!
achals commentedon Apr 25, 2022
Thanks for the feedback @hsz1273327 , this was definitely an oversight. We're planning on adding this back in soon (but we may be possibly changing the name of this field to
tagsto more accurately convey the purpose of the field).kevjumba commentedon Apr 26, 2022
@hsz1273327 If you are planning to switch to Field from Feature, we deprecated the
labelparameter in place oftags. However, theFeatureobject still contains the normallabel.