Skip to content

Keep labels in Field api #2607

Closed
Closed

Description

@hsz1273327

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

  1. changed the title [-]Keep labels in Filed api[/-] [+]Keep labels in Field api[/+] on Apr 25, 2022
  2. adchia commented on Apr 25, 2022

    @adchia
    Collaborator

    Thanks for giving feedback and nice catch!

  3. achals commented on Apr 25, 2022

    @achals
    Member

    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 tags to more accurately convey the purpose of the field).

  4. kevjumba commented on Apr 26, 2022

    @kevjumba
    Collaborator

    @hsz1273327 If you are planning to switch to Field from Feature, we deprecated the label parameter in place of tags. However, the Feature object still contains the normal label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions