Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: construct the request directly in sample code
- Loading branch information
Showing
8 changed files
with
94 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,8 @@ def read_feature_values_sample( | |
featurestore_id: str, | ||
entity_type_id: str, | ||
entity_id: str, | ||
feature_selector: str, | ||
location: str = "us-central1", | ||
api_endpoint: str = "us-central1-aiplatform.googleapis.com", | ||
timeout: int = 300, | ||
): | ||
# The AI Platform services require regional API endpoints. | ||
client_options = {"api_endpoint": api_endpoint} | ||
|
@@ -34,6 +32,9 @@ def read_feature_values_sample( | |
client_options=client_options | ||
) | ||
entity_type = f"projects/{project}/locations/{location}/featurestores/{featurestore_id}/entityTypes/{entity_type_id}" | ||
feature_selector = aiplatform.FeatureSelector( | ||
id_matcher=aiplatform.IdMatcher(ids=["age", "gender", "liked_genres"]) | ||
This comment has been minimized.
Sorry, something went wrong.
diemtvu
|
||
) | ||
read_feature_values_request = aiplatform.ReadFeatureValuesRequest( | ||
entity_type=entity_type, entity_id=entity_id, feature_selector=feature_selector | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just make sure my previous comment is not lost (this is one thing I hate about github :)). Anwyay, remove all sample related to monitoring config.