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

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

Closed
MattDelac opened this issue Nov 23, 2021 · 6 comments
Closed

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

MattDelac opened this issue Nov 23, 2021 · 6 comments

Comments

@MattDelac
Copy link
Collaborator

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

@MattDelac MattDelac added kind/bug priority/p0 Highest priority labels Nov 23, 2021
@adchia adchia added priority/p1 and removed priority/p0 Highest priority labels Nov 24, 2021
@adchia
Copy link
Collaborator

adchia commented Nov 24, 2021

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?

@MattDelac
Copy link
Collaborator Author

MattDelac commented Nov 25, 2021

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",

@felixwang9817
Copy link
Collaborator

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

maybe try pip installing tensorflow-metadata and trying again?

@MattDelac
Copy link
Collaborator Author

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

@MattDelac
Copy link
Collaborator Author

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 ?

@MattDelac
Copy link
Collaborator Author

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
Projects
None yet
Development

No branches or pull requests

3 participants