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

Keep labels in Field api #2607

Closed
hsz1273327 opened this issue Apr 25, 2022 · 3 comments · Fixed by #2610
Closed

Keep labels in Field api #2607

hsz1273327 opened this issue Apr 25, 2022 · 3 comments · Fixed by #2610
Assignees
Labels
kind/feature New feature or request priority/p1

Comments

@hsz1273327
Copy link

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

@hsz1273327 hsz1273327 added the kind/feature New feature or request label Apr 25, 2022
@adchia adchia changed the title Keep labels in Filed api Keep labels in Field api Apr 25, 2022
@adchia
Copy link
Collaborator

adchia commented Apr 25, 2022

Thanks for giving feedback and nice catch!

@achals
Copy link
Member

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

@kevjumba
Copy link
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
Labels
kind/feature New feature or request priority/p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants