google.cloud.gcp_vertexai_featurestore_entitytype module – Creates a GCP VertexAI.FeaturestoreEntitytype resource

Note

This module is part of the google.cloud collection (version 1.13.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install google.cloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: google.cloud.gcp_vertexai_featurestore_entitytype.

Synopsis

  • An entity type is a type of object in a system that needs to be modeled and have stored information about. For example, driver is an entity type, and driver0 is an instance of an entity type driver.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.8

  • requests >= 2.18.4

  • google-auth >= 2.25.1

Parameters

Parameter

Comments

access_token

string

The access token used to authenticate.

auth_kind

string / required

The type of credential used.

Choices:

  • "accesstoken"

  • "application"

  • "machineaccount"

  • "serviceaccount"

description

string

Description of the EntityType.

env_type

string

Specifies which Ansible environment you’re running this module within.

This should not be set unless you know what you’re doing.

This only alters the User Agent string for any API requests.

featurestore

string / required

The name of the Featurestore to use, in the format projects/{project}/locations/{location}/featurestores/{featurestore}.

labels

dictionary

A set of key/value label pairs to assign to this EntityType.

monitoring_config

dictionary

The default monitoring configuration for all Features under this EntityType.

If this is populated with [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot analysis monitoring is enabled.

Otherwise, snapshot analysis monitoring is disabled.

categorical_threshold_config

dictionary

Threshold for categorical features of anomaly detection.

This is shared by all types of Featurestore Monitoring for categorical features (i.e.

Features with type (Feature.ValueType) BOOL or STRING).

value

string / required

Specify a threshold value that can trigger the alert.

For categorical feature, the distribution distance is calculated by L-inifinity norm.

Each feature must have a non-zero threshold if they need to be monitored.

Otherwise no alert will be triggered for that feature.

The default value is 0.3.

import_features_analysis

dictionary

The config for ImportFeatures Analysis Based Feature Monitoring.

anomaly_detection_baseline

string

Defines the baseline to do anomaly detection for feature values imported by each [entityTypes.importFeatureValues][] operation.

The value must be one of the values below: * LATEST_STATS: Choose the later one statistics generated by either most recent snapshot analysis or previous import features analysis.

If non of them exists, skip anomaly detection and only generate a statistics.

* MOST_RECENT_SNAPSHOT_STATS: Use the statistics generated by the most recent snapshot analysis if exists.

* PREVIOUS_IMPORT_FEATURES_STATS: Use the statistics generated by the previous import features analysis if exists.

state

string

Whether to enable / disable / inherite default hebavior for import features analysis.

The value must be one of the values below: * DEFAULT: The default behavior of whether to enable the monitoring.

EntityType-level config: disabled.

* ENABLED: Explicitly enables import features analysis.

EntityType-level config: by default enables import features analysis for all Features under it.

* DISABLED: Explicitly disables import features analysis.

EntityType-level config: by default disables import features analysis for all Features under it.

numerical_threshold_config

dictionary

Threshold for numerical features of anomaly detection.

This is shared by all objectives of Featurestore Monitoring for numerical features (i.e.

Features with type (Feature.ValueType) DOUBLE or INT64).

value

string / required

Specify a threshold value that can trigger the alert.

For numerical feature, the distribution distance is calculated by Jensen–Shannon divergence.

Each feature must have a non-zero threshold if they need to be monitored.

Otherwise no alert will be triggered for that feature.

The default value is 0.3.

snapshot_analysis

dictionary

The config for Snapshot Analysis Based Feature Monitoring.

disabled

boolean

The monitoring schedule for snapshot analysis.

For EntityType-level config: unset / disabled = true indicates disabled by default for Features under it; otherwise by default enable snapshot analysis monitoring with monitoringInterval for Features under it.

Choices:

  • false ← (default)

  • true

monitoring_interval

string

Configuration of the snapshot analysis based monitoring pipeline running interval.

The value is rolled up to full day.

A duration in seconds with up to nine fractional digits, terminated by ‘s’.

Example: “3.5s”.

monitoring_interval_days

integer

Configuration of the snapshot analysis based monitoring pipeline running interval.

The value indicates number of days.

The default value is 1.

If both FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days and [FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval][] are set when creating/updating EntityTypes/Features, FeaturestoreMonitoringConfig.SnapshotAnalysis.monitoring_interval_days will be used.

Default: 1

staleness_days

integer

Customized export features time window for snapshot analysis.

Unit is one day.

The default value is 21 days.

Minimum value is 1 day.

Maximum value is 4000 days.

Default: 21

name

string / required

The name of the EntityType.

This value may be up to 60 characters, and valid characters are [a-z0-9_].

The first character cannot be a number.

offline_storage_ttl_days

integer

Config for data retention policy in offline storage.

TTL in days for feature values that will be stored in offline storage.

The Feature Store offline storage periodically removes obsolete feature values older than offlineStorageTtlDays since the feature generation time.

If unset (or explicitly set to 0), default to 4000 days TTL.

Default: 4000

project

string

The Google Cloud Platform project to use.

scopes

list / elements=string

Array of scopes to be used.

service_account_contents

jsonarg

The contents of a Service Account JSON file,

either in a dictionary or as a JSON string that represents it.

service_account_email

string

An optional service account email address if machineaccount is

selected and the user does not wish to use the default email.

service_account_file

path

The path of a Service Account JSON file if serviceaccount

is selected as type.

state

string

Whether the resource should exist in GCP.

Choices:

  • "present" ← (default)

  • "absent"

Notes

Note

Examples

- name: Create Featurestore Entitytype
  google.cloud.gcp_vertexai_featurestore_entitytype:
    state: present
    name: my_featurestore_entitytype
    featurestore: "projects/{{ gcp_project }}/locations/{{ gcp_region }}/featurestores/{{ featurestore }}"
    # featurestore: "{{ _myfs.name }}"  # use previously registered variable
    monitoring_config:
      snapshot_analysis:
        disabled: false
        monitoring_interval_days: 1
        staleness_days: 30
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Whether the resource was changed.

Returned: always

createTime

string

The timestamp of when the featurestore was created in RFC3339 UTC “Zulu” format, with nanosecond resolution and up to nine fractional digits.

Returned: success

etag

string

Used to perform consistent read-modify-write updates.

Returned: success

state

string

The current state of the resource.

Returned: always

updateTime

string

The timestamp of when the featurestore was last updated in RFC3339 UTC “Zulu” format, with nanosecond resolution and up to nine fractional digits.

Returned: success

Authors

  • Google Inc. (@googlecloudplatform)