- 1.71.0 (latest)
- 1.70.0
- 1.69.0
- 1.68.0
- 1.67.1
- 1.66.0
- 1.65.0
- 1.63.0
- 1.62.0
- 1.60.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.1
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.39.0
- 1.38.1
- 1.37.0
- 1.36.4
- 1.35.0
- 1.34.0
- 1.33.1
- 1.32.0
- 1.31.1
- 1.30.1
- 1.29.0
- 1.28.1
- 1.27.1
- 1.26.1
- 1.25.0
- 1.24.1
- 1.23.0
- 1.22.1
- 1.21.0
- 1.20.0
- 1.19.1
- 1.18.3
- 1.17.1
- 1.16.1
- 1.15.1
- 1.14.0
- 1.13.1
- 1.12.1
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.1
- 1.7.1
- 1.6.2
- 1.5.0
- 1.4.3
- 1.3.0
- 1.2.0
- 1.1.1
- 1.0.1
- 0.9.0
- 0.8.0
- 0.7.1
- 0.6.0
- 0.5.1
- 0.4.0
- 0.3.1
Feature(
feature_name: str,
featurestore_id: Optional[str] = None,
entity_type_id: Optional[str] = None,
project: Optional[str] = None,
location: Optional[str] = None,
credentials: Optional[google.auth.credentials.Credentials] = None,
)
Managed feature resource for Vertex AI.
Inheritance
builtins.object > google.cloud.aiplatform.base.VertexAiResourceNoun > builtins.object > google.cloud.aiplatform.base.FutureManager > google.cloud.aiplatform.base.VertexAiResourceNounWithFutureManager > FeatureProperties
entity_type_name
Full qualified resource name of the managed entityType in which this Feature is.
featurestore_name
Full qualified resource name of the managed featurestore in which this Feature is.
Methods
Feature
Feature(
feature_name: str,
featurestore_id: Optional[str] = None,
entity_type_id: Optional[str] = None,
project: Optional[str] = None,
location: Optional[str] = None,
credentials: Optional[google.auth.credentials.Credentials] = None,
)
Retrieves an existing managed feature given a feature resource name or a feature ID.
Example Usage:
my_feature = aiplatform.Feature(
feature_name='projects/123/locations/us-central1/featurestores/my_featurestore_id/ entityTypes/my_entity_type_id/features/my_feature_id'
)
or
my_feature = aiplatform.Feature(
feature_name='my_feature_id',
featurestore_id='my_featurestore_id',
entity_type_id='my_entity_type_id',
)
Name | Description |
feature_name |
str
Required. A fully-qualified feature resource name or a feature ID. Example: "projects/123/locations/us-central1/featurestores/my_featurestore_id/entityTypes/my_entity_type_id/features/my_feature_id" or "my_feature_id" when project and location are initialized or passed, with featurestore_id and entity_type_id passed. |
featurestore_id |
str
Optional. Featurestore ID of an existing featurestore to retrieve feature from, when feature_name is passed as Feature ID. |
entity_type_id |
str
Optional. EntityType ID of an existing entityType to retrieve feature from, when feature_name is passed as Feature ID. The EntityType must exist in the Featurestore if provided by the featurestore_id. |
project |
str
Optional. Project to retrieve feature from. If not set, project set in aiplatform.init will be used. |
location |
str
Optional. Location to retrieve feature from. If not set, location set in aiplatform.init will be used. |
credentials |
auth_credentials.Credentials
Optional. Custom credentials to use to retrieve this Feature. Overrides credentials set in aiplatform.init. |
Type | Description |
ValueError | If only one of featurestore_id or entity_type_id is provided. |
create
create(
feature_id: str,
value_type: str,
entity_type_name: str,
featurestore_id: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Dict[str, str]] = None,
project: Optional[str] = None,
location: Optional[str] = None,
credentials: Optional[google.auth.credentials.Credentials] = None,
request_metadata: Optional[Sequence[Tuple[str, str]]] = (),
sync: bool = True,
)
Creates a Feature resource in an EntityType.
Example Usage:
my_feature = aiplatform.Feature.create(
feature_id='my_feature_id',
value_type='INT64',
entity_type_name='projects/123/locations/us-central1/featurestores/my_featurestore_id/ entityTypes/my_entity_type_id'
)
or
my_feature = aiplatform.Feature.create(
feature_id='my_feature_id',
value_type='INT64',
entity_type_name='my_entity_type_id',
featurestore_id='my_featurestore_id',
)
Name | Description |
feature_id |
str
Required. The ID to use for the Feature, which will become the final component of the Feature's resource name, which is immutable. This value may be up to 60 characters, and valid characters are |
value_type |
str
Required. Immutable. Type of Feature value. One of BOOL, BOOL_ARRAY, DOUBLE, DOUBLE_ARRAY, INT64, INT64_ARRAY, STRING, STRING_ARRAY, BYTES. |
entity_type_name |
str
Required. A fully-qualified entityType resource name or an entity_type ID of an existing entityType to create Feature in. The EntityType must exist in the Featurestore if provided by the featurestore_id. Example: "projects/123/locations/us-central1/featurestores/my_featurestore_id/entityTypes/my_entity_type_id" or "my_entity_type_id" when project and location are initialized or passed, with featurestore_id passed. |
featurestore_id |
str
Optional. Featurestore ID of an existing featurestore to create Feature in if |
description |
str
Optional. Description of the Feature. |
labels |
Dict[str, str]
Optional. The labels with user-defined metadata to organize your Features. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one Feature (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. |
project |
str
Optional. Project to create Feature in if |
location |
str
Optional. Location to create Feature in if |
credentials |
auth_credentials.Credentials
Optional. Custom credentials to use to create Features. Overrides credentials set in aiplatform.init. |
request_metadata |
Sequence[Tuple[str, str]]
Optional. Strings which should be sent along with the request as metadata. |
sync |
bool
Optional. Whether to execute this creation synchronously. If False, this method will be executed in concurrent Future and any downstream object will be immediately returned and synced when the Future has completed. |
get_entity_type
get_entity_type()
Retrieves the managed entityType in which this Feature is.
get_featurestore
get_featurestore()
Retrieves the managed featurestore in which this Feature is.
list
list(
entity_type_name: str,
featurestore_id: Optional[str] = None,
filter: Optional[str] = None,
order_by: Optional[str] = None,
project: Optional[str] = None,
location: Optional[str] = None,
credentials: Optional[google.auth.credentials.Credentials] = None,
)
Lists existing managed feature resources in an entityType, given an entityType resource name or an entity_type ID.
Example Usage:
my_features = aiplatform.Feature.list(
entity_type_name='projects/123/locations/us-central1/featurestores/my_featurestore_id/ entityTypes/my_entity_type_id'
)
or
my_features = aiplatform.Feature.list(
entity_type_name='my_entity_type_id',
featurestore_id='my_featurestore_id',
)
Name | Description |
entity_type_name |
str
Required. A fully-qualified entityType resource name or an entity_type ID of an existing entityType to list features in. The EntityType must exist in the Featurestore if provided by the featurestore_id. Example: "projects/123/locations/us-central1/featurestores/my_featurestore_id/entityTypes/my_entity_type_id" or "my_entity_type_id" when project and location are initialized or passed, with featurestore_id passed. |
featurestore_id |
str
Optional. Featurestore ID of an existing featurestore to list features in, when entity_type_name is passed as entity_type ID. |
filter |
str
Optional. Lists the Features that match the filter expression. The following filters are supported: - |
order_by |
str
Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: - |
project |
str
Optional. Project to list features in. If not set, project set in aiplatform.init will be used. |
location |
str
Optional. Location to list features in. If not set, location set in aiplatform.init will be used. |
credentials |
auth_credentials.Credentials
Optional. Custom credentials to use to list features. Overrides credentials set in aiplatform.init. |
search
search(
query: Optional[str] = None,
page_size: Optional[int] = None,
project: Optional[str] = None,
location: Optional[str] = None,
credentials: Optional[google.auth.credentials.Credentials] = None,
)
Searches existing managed Feature resources.
Example Usage:
my_features = aiplatform.Feature.search()
Name | Description |
query |
str
Optional. Query string that is a conjunction of field-restricted queries and/or field-restricted filters. Field-restricted queries and filters can be combined using |
page_size |
int
Optional. The maximum number of Features to return. The service may return fewer than this value. If unspecified, at most 100 Features will be returned. The maximum value is 100; any value greater than 100 will be coerced to 100. |
project |
str
Optional. Project to list features in. If not set, project set in aiplatform.init will be used. |
location |
str
Optional. Location to list features in. If not set, location set in aiplatform.init will be used. |
credentials |
auth_credentials.Credentials
Optional. Custom credentials to use to list features. Overrides credentials set in aiplatform.init. |
update
update(
description: Optional[str] = None,
labels: Optional[Dict[str, str]] = None,
request_metadata: Optional[Sequence[Tuple[str, str]]] = (),
)
Updates an existing managed feature resource.
Example Usage:
my_feature = aiplatform.Feature(
feature_name='my_feature_id',
featurestore_id='my_featurestore_id',
entity_type_id='my_entity_type_id',
)
my_feature.update(
description='update my description',
)
Name | Description |
description |
str
Optional. Description of the Feature. |
labels |
Dict[str, str]
Optional. The labels with user-defined metadata to organize your Features. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one Feature (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. |
request_metadata |
Sequence[Tuple[str, str]]
Optional. Strings which should be sent along with the request as metadata. |