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

feat: enable feature store batch serve to Pandas DataFrame; fix: read instances uri for batch serve #983

Merged
5 changes: 5 additions & 0 deletions google/cloud/aiplatform/featurestore/entity_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def __init__(
@property
def featurestore_name(self) -> str:
"""Full qualified resource name of the managed featurestore in which this EntityType is."""
self.wait()
entity_type_name_components = self._parse_resource_name(self.resource_name)
return featurestore.Featurestore._format_resource_name(
project=entity_type_name_components["project"],
Expand All @@ -150,6 +151,7 @@ def get_feature(self, feature_id: str) -> "featurestore.Feature":
Returns:
featurestore.Feature - The managed feature resource object.
"""
self.wait()
entity_type_name_components = self._parse_resource_name(self.resource_name)

return featurestore.Feature(
Expand Down Expand Up @@ -1213,6 +1215,7 @@ def ingest_from_df(
project=self.project, credentials=self.credentials
)

self.wait()
entity_type_name_components = self._parse_resource_name(self.resource_name)
featurestore_id, entity_type_id = (
entity_type_name_components["featurestore"],
Expand All @@ -1222,6 +1225,8 @@ def ingest_from_df(
temp_bq_dataset_name = f"temp_{featurestore_id}_{uuid.uuid4()}".replace(
"-", "_"
)

# TODO(b/216497263): Add support for resource project does not match initializer.global_config.project
temp_bq_dataset_id = f"{initializer.global_config.project}.{temp_bq_dataset_name}"[
:1024
]
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/aiplatform/featurestore/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def __init__(
@property
def featurestore_name(self) -> str:
"""Full qualified resource name of the managed featurestore in which this Feature is."""
self.wait()
feature_path_components = self._parse_resource_name(self.resource_name)

return featurestore.Featurestore._format_resource_name(
Expand All @@ -144,6 +145,7 @@ def get_featurestore(self) -> "featurestore.Featurestore":
@property
def entity_type_name(self) -> str:
"""Full qualified resource name of the managed entityType in which this Feature is."""
self.wait()
feature_path_components = self._parse_resource_name(self.resource_name)

return featurestore.EntityType._format_resource_name(
Expand Down
Loading