Table: gcp_vertex_ai_model - Query GCP Vertex AI Models using SQL
Google Cloud's Vertex AI is a unified ML platform for building, deploying, and scaling AI applications. It offers a suite of tools and services for data scientists and ML engineers, which includes the ability to manage models. A model in Vertex AI is a resource that represents a machine learning solution, which can be trained and deployed to serve predictions.
Table Usage Guide
The gcp_vertex_ai_model
table provides insights into Vertex AI models within Google Cloud Platform. As a data scientist or ML engineer, explore model-specific details through this table, including model type, training details, and associated metadata. Utilize it to manage and monitor your AI models, such as those serving high traffic, the training data used, and the status of each model.
Examples
Basic info
Explore which AI models are active within your Google Cloud Platform, gaining insights into their creation time and associated networks. This can be particularly useful for managing and auditing your AI resources.
select name, display_name, create_time, version_id, container_spec, deployed_modelsfrom gcp_vertex_ai_model;
select name, display_name, create_time, version_id, container_spec, deployed_modelsfrom gcp_vertex_ai_model;
List models created in the last 30 days
Determine the areas in which new models have been established within the past month. This can be useful for tracking recent changes and developments in your AI models.
select name, display_name, create_timefrom gcp_vertex_ai_modelwhere create_time >= current_date - interval '30 days';
select name, display_name, create_timefrom gcp_vertex_ai_modelwhere create_time >= date('now', '-30 days');
Get the model source for the models
Determine the source of the model, whether it was imported from a TensorFlow model or a custom model, to understand the origin of the model and its compatibility with other tools and services.
select name, display_name, case when model_source_info ->> 'source_type' = '1' then 'Model Generated by AutoML' when model_source_info ->> 'source_type' = '2' then 'Model Imported from Custom' when model_source_info ->> 'source_type' = '3' then 'Model Imported from BigQuery ML' when model_source_info ->> 'source_type' = '4' then 'Model Saved from Model Garden' when model_source_info ->> 'source_type' = '5' then 'Model Saved from Genie' end as model_sourcefrom gcp_vertex_ai_model;
select name, display_name, case when model_source_info ->> 'source_type' = '1' then 'Model Generated by AutoML' when model_source_info ->> 'source_type' = '2' then 'Model Imported from Custom' when model_source_info ->> 'source_type' = '3' then 'Model Imported from BigQuery ML' when model_source_info ->> 'source_type' = '4' then 'Model Saved from Model Garden' when model_source_info ->> 'source_type' = '5' then 'Model Saved from Genie' end as model_sourcefrom gcp_vertex_ai_model;
List the model that is deployed to a specific endpoint
Explore models that have been deployed to a specific endpoint, gaining insights into the models serving predictions for a particular application or service.
select name, display_name, d ->> 'endpoint' as endpoint, d ->> 'deployed_model_id' as deployed_model_idfrom gcp_vertex_ai_model, jsonb_array_elements(deployed_models) as dwhere d ->> 'endpoint' = 'projects/123456789/endpoints/123456789';
select name, display_name, json_extract(deployed_models, '$[*].endpoint') as endpoint, json_extract(deployed_models, '$[*].deployed_model_id') as deployed_model_idfrom gcp_vertex_ai_modelwhere json_extract(deployed_models, '$[*].endpoint') = 'projects/123456789/endpoints/123456789';
List models that support 'csv' format for input storage
Explore models that support 'csv' format for input storage, gaining insights into the models that can process data in this format. This can be useful for managing and optimizing your data processing pipelines.
select name, display_name, supported_input_storage_formatsfrom gcp_vertex_ai_modelwhere supported_input_storage_formats ? 'csv';
select name, display_name, json_extract(supported_input_storage_formats, '$.csv') as supported_input_storage_formatsfrom gcp_vertex_ai_modelwhere json_type(supported_input_storage_formats, '$.csv') = 'string';
Schema for gcp_vertex_ai_model
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
artifact_uri | text | The path to the directory containing the Model artifact and its supporting files. | |
container_spec | jsonb | The specification of the container that is to be used when deploying this model. | |
create_time | timestamp with time zone | Timestamp when this Model was uploaded into Vertex AI. | |
deployed_models | jsonb | The pointers to DeployedModels created from this Model. | |
description | text | The description of the Model. | |
display_name | text | The display name of the Model. | |
encryption_spec | jsonb | Customer-managed encryption key spec for a Model. | |
etag | text | Used to perform consistent read-modify-write updates. | |
explanation_spec | jsonb | The default explanation specification for this Model. | |
labels | jsonb | The labels with user-defined metadata to organize your Models. | |
location | text | The GCP multi-region, region, or zone in which the resource is located. | |
metadata | jsonb | An additional information about the model; the schema of the metadata can be found in metadata_schema_uri, immutable. | |
metadata_artifact | text | The resource name of the Artifact that was created in MetadataStore when creating the model. | |
metadata_schema_uri | text | Points to a YAML file stored on Google Cloud Storage describing additional information about the model. | |
model_source_info | jsonb | Source of a model. | |
name | text | = | The resource name of the Model. |
original_model_info | jsonb | If this model is a copy of another model, this contains info about the original. | |
pipeline_job | text | Populated if the model is produced by a pipeline job. | |
predict_schemata | jsonb | The schemata that describe formats of the model's predictions and explanations. | |
project | text | =, !=, ~~, ~~*, !~~, !~~* | The GCP Project in which the resource is located. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
supported_deployment_resources_types | jsonb | The configuration types this model supports for deployment. | |
supported_export_formats | jsonb | The formats in which this model may be exported. If empty, this model is not available for export. | |
supported_input_storage_formats | jsonb | The formats this Model supports in BatchPredictionJob.input_config. | |
supported_output_storage_formats | jsonb | The formats this Model supports in BatchPredictionJob.output_config. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
training_pipeline | text | The resource name of the TrainingPipeline that uploaded this model, if any. | |
update_time | timestamp with time zone | Timestamp when this Model was most recently updated. | |
version_aliases | jsonb | User provided version aliases so that a model version can be referenced via alias. | |
version_create_time | timestamp with time zone | Timestamp when this version was created. | |
version_description | text | The description of this version. | |
version_id | text | The version ID of the model. | |
version_update_time | timestamp with time zone | Timestamp when this version was most recently updated. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- gcp
You can pass the configuration to the command with the --config
argument:
steampipe_export_gcp --config '<your_config>' gcp_vertex_ai_model