Skip to content

feast apply broken with 0.15.* if the registry already exists #2086

Closed

Description

@MattDelac

Expected Behavior

Running feast apply twice in a row should work as expected

Current Behavior

The second time we run feast apply, it will break with feast v0.15.*

Steps to reproduce

  • install Feast 0.15.1
  • Add a local config
project: local
registry: tmp/registry.db
provider: local
offline_store:
    type: bigquery
    dataset: scratch
online_store:
    type: sqlite
    path: tmp/database.db
  • feast apply ✅ if the registry does not exist
  • feast apply 🔴

image

From Slack > And interestingly, it does not always fail on the same FeatureView being applied > And I can successfully print feature_view_proto.spec.entities right before it fails

Specifications

  • Version:
  • Platform:
  • Subsystem:

Possible Solution

Activity

  1. adchia commented on Nov 24, 2021

    @adchia
    Collaborator

    There was a fix shipped to better handle entityless feature views, but seems like we're having trouble reproducing this bug.

    Can you try again at HEAD and see if this still reproduces?

  2. MattDelac commented on Nov 25, 2021

    @MattDelac
    CollaboratorAuthor

    There was a fix shipped to better handle entityless feature views, but seems like we're having trouble reproducing this bug.

    Can you try again at HEAD and see if this still reproduces?

    I get another issue that does not seem relevant to this ticket
    image

    Was using the following commit 54d0f3a1842c7613aaffcd67512e08ab9b688740

    "feast[gcp] @ git+https://github.com/feast-dev/feast.git@54d0f3a1842c7613aaffcd67512e08ab9b688740#subdirectory=sdk/python&egg=feast",

  3. felixwang9817 commented on Nov 25, 2021

    @felixwang9817
    Collaborator

    hey @MattDelac, this issue looks like it might be related to #2038 and #2063

    maybe try pip installing tensorflow-metadata and trying again?

  4. MattDelac commented on Nov 29, 2021

    @MattDelac
    CollaboratorAuthor

    hey @MattDelac, this issue looks like it might be related to #2038 and #2063

    maybe try pip installing tensorflow-metadata and trying again?

    It was already installed tensorflow-metadata==1.4.0, so it did not change anything

  5. MattDelac commented on Dec 1, 2021

    @MattDelac
    CollaboratorAuthor

    hey @MattDelac, this issue looks like it might be related to #2038 and #2063

    maybe try pip installing tensorflow-metadata and trying again?

    I tried all versions of tensorflow-metadata from 1.2.0 to 1.5.0

    Always get the same error. Would today be a good time to pair on this issue ?

  6. MattDelac commented on Dec 2, 2021

    @MattDelac
    CollaboratorAuthor

    So the problem is that I create a child class from the Feast FeatureView class. I do so in order to add Shopify specifics.

    Since feast==0.15.0, the cls argument passed to the classmethod from_proto() was the child class instead of the parent class. Thus, the from_proto() method was broken when it was trying to create a new FeatureView object.

    The solution is to override this method class and explicitly return the one coming from the parent class (see code below)

    from feast.feature_view import FeatureView as FeastFeatureView
    
    class FeatureView(FeastFeatureView):
        def __init__(
            self,
            name: str,
            entity: str,
            owner: str,
            features: List[Feature],
            batch_source: CustomSource,
            ttl: Optional[timedelta] = None,
        ):
            super().__init__(
                name=name,
                entities=[entity],
                features=features,
                batch_source=batch_source,
                ttl=ttl,
                tags={...}
            )
    
        @classmethod
        def from_proto(self, feature_view_proto):
            return FeastFeatureView.from_proto(feature_view_proto)
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