I am passing the values of lables as below to create a featurestore with labels. But after creation of the featurestore, I do not see the featurestore created with labels. Is it still not supported in VertexAI
fs = aiplatform.Featurestore.create(
featurestore_id=featurestore_id,
labels=dict(project='retail', env='prod'),
online_store_fixed_node_count=online_store_fixed_node_count,
sync=sync
)
As mentioned in this featurestore documentation:
A featurestore is a top-level container for entity types, features, and feature values.
With this, the GCP console UI "labels" are the "labels" at the Feature level.
Once a featurestore is created, you will need to create an entity and then create a Feature that has the labels parameter as shown on the below sample python code.
from google.cloud import aiplatform
test_label = {'key1' : 'value1'}
def create_feature_sample(
project: str,
location: str,
feature_id: str,
value_type: str,
entity_type_id: str,
featurestore_id: str,
):
aiplatform.init(project=project, location=location)
my_feature = aiplatform.Feature.create(
feature_id=feature_id,
value_type=value_type,
entity_type_name=entity_type_id,
featurestore_id=featurestore_id,
labels=test_label,
)
my_feature.wait()
return my_feature
create_feature_sample('your-project','us-central1','test_feature3','STRING','test_entity3','test_fs3')
Below is the screenshot of the GCP console which shows that labels for test_feature3 feature has the values defined in the above sample python code.
You may refer to this creation of feature documentation using python for more details.
On the other hand, you may still view the labels you defined for your featurestore using the REST API as shown on the below sample.
curl -X GET \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
"https://<your-location>-aiplatform.googleapis.com/v1/projects/<your-project>/locations/<your-location>/featurestores"
Below is the result of the REST API which also shows the value of the labels I defined for my "test_fs3" featurestore.