1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Issue with Fetching Feature Values from GCP Feature Online Store

Discussão em 'Python' iniciado por Stack, Setembro 11, 2024.

  1. Stack

    Stack Membro Participativo

    I've created a function to fetch data from a feature online store view that I created from a BigQuery table sync. Below is the code I'm using:

    from google.cloud.aiplatform_v1 import FeatureOnlineStoreServiceClient
    from google.cloud.aiplatform_v1.types.feature_online_store_service import (
    FetchFeatureValuesRequest,
    FeatureViewDataKey,
    FeatureViewDataFormat,
    )


    def get_feature_view_from_feature_store(
    project_id: str,
    location: str,
    feature_online_store: str,
    feature_view_name: str,
    entity_id: str,
    ):
    """Retrieve feature data from GCP Feature Store for a given entity ID."""

    # Initialize the AI Platform client for featurestore
    client_options = {"api_endpoint": f"{location}-aiplatform.googleapis.com"}
    client = FeatureOnlineStoreServiceClient(client_options=client_options)

    feature_view = (
    f"projects/{project_id}/locations/{location}/"
    f"featureOnlineStores/{feature_online_store}/featureViews/{feature_view_name}"
    )

    request = FetchFeatureValuesRequest(
    feature_view=feature_view,
    data_key=FeatureViewDataKey(key=entity_id),
    data_format=FeatureViewDataFormat.KEY_VALUE,
    )

    values = client.fetch_feature_values(request=request)

    return values



    When I invoke this function, I receive the following errors:

    _InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.INTERNAL
    details = "Internal error encountered."
    debug_error_string = "UNKNOWN:Error received from peer ipv4:<ip_address> {created_time:"<time_stamp>", grpc_status:13, grpc_message:"Internal error encountered."}"
    >


    And:

    The above exception was the direct cause of the following exception: InternalServerError: 500 Internal error encountered.


    Troubleshooting steps so far:


    1. Parameter verification: I've checked the parameters used in the function, and they all match the expected values.


    2. Documentation reference: My code is largely based on what is written in the official documentation.


    3. SDK version: I'm using the latest version of google-cloud-aiplatform (1.66.0) as of this post.


    4. Data sync: I've already synced the feature store data to the online store as described in this documentation.

    Despite these checks, I am still encountering the errors mentioned above. Could someone guide me on how to resolve this issue?

    Thanks in advance for your help!

    Continue reading...

Compartilhe esta Página