-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #485 from inspec/CHEF-5570-MAGIC-MODULE-vertex_ai-…
…Model CHEF-5570-MAGIC-MODULE-vertex_ai-Model - Resource Implementation
- Loading branch information
Showing
37 changed files
with
1,922 additions
and
0 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: About the google_vertex_ai_models resource | ||
platform: gcp | ||
--- | ||
|
||
## Syntax | ||
A `google_vertex_ai_models` is used to test a Google Model resource | ||
|
||
## Examples | ||
``` | ||
describe google_vertex_ai_models(parent: "projects/#{gcp_project_id}/locations/#{model['region']}", region: ' value_region') do | ||
it { should exist } | ||
end | ||
``` | ||
|
||
## Properties | ||
Properties that can be accessed from the `google_vertex_ai_models` resource: | ||
|
||
See [google_vertex_ai_model.md](google_vertex_ai_model.md) for more detailed information | ||
* `model_source_infos`: an array of `google_vertex_ai_model` model_source_info | ||
* `names`: an array of `google_vertex_ai_model` name | ||
* `metadata`: an array of `google_vertex_ai_model` metadata | ||
* `update_times`: an array of `google_vertex_ai_model` update_time | ||
* `etags`: an array of `google_vertex_ai_model` etag | ||
* `descriptions`: an array of `google_vertex_ai_model` description | ||
* `deployed_models`: an array of `google_vertex_ai_model` deployed_models | ||
* `create_times`: an array of `google_vertex_ai_model` create_time | ||
* `explanation_specs`: an array of `google_vertex_ai_model` explanation_spec | ||
* `encryption_specs`: an array of `google_vertex_ai_model` encryption_spec | ||
* `pipeline_jobs`: an array of `google_vertex_ai_model` pipeline_job | ||
* `predict_schemata`: an array of `google_vertex_ai_model` predict_schemata | ||
* `version_update_times`: an array of `google_vertex_ai_model` version_update_time | ||
* `supported_export_formats`: an array of `google_vertex_ai_model` supported_export_formats | ||
* `original_model_infos`: an array of `google_vertex_ai_model` original_model_info | ||
* `metadata_artifacts`: an array of `google_vertex_ai_model` metadata_artifact | ||
* `supported_input_storage_formats`: an array of `google_vertex_ai_model` supported_input_storage_formats | ||
* `metadata_schema_uris`: an array of `google_vertex_ai_model` metadata_schema_uri | ||
* `container_specs`: an array of `google_vertex_ai_model` container_spec | ||
* `version_ids`: an array of `google_vertex_ai_model` version_id | ||
* `artifact_uris`: an array of `google_vertex_ai_model` artifact_uri | ||
* `training_pipelines`: an array of `google_vertex_ai_model` training_pipeline | ||
* `display_names`: an array of `google_vertex_ai_model` display_name | ||
* `supported_deployment_resources_types`: an array of `google_vertex_ai_model` supported_deployment_resources_types | ||
* `supported_output_storage_formats`: an array of `google_vertex_ai_model` supported_output_storage_formats | ||
* `version_aliases`: an array of `google_vertex_ai_model` version_aliases | ||
* `version_create_times`: an array of `google_vertex_ai_model` version_create_time | ||
* `version_descriptions`: an array of `google_vertex_ai_model` version_description | ||
* `labels`: an array of `google_vertex_ai_model` labels | ||
|
||
## Filter Criteria | ||
This resource supports all of the above properties as filter criteria, which can be used | ||
with `where` as a block or a method. | ||
|
||
## GCP Permissions |
54 changes: 54 additions & 0 deletions
54
libraries/google/vertexai/property/model_container_spec.rb
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/vertexai/property/model_container_spec_env' | ||
require 'google/vertexai/property/model_container_spec_ports' | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelContainerSpec | ||
attr_reader :predict_route | ||
|
||
attr_reader :image_uri | ||
|
||
attr_reader :env | ||
|
||
attr_reader :args | ||
|
||
attr_reader :command | ||
|
||
attr_reader :ports | ||
|
||
attr_reader :health_route | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@predict_route = args['predictRoute'] | ||
@image_uri = args['imageUri'] | ||
@env = GoogleInSpec::VertexAI::Property::ModelContainerSpecEnvArray.parse(args['env'], to_s) | ||
@args = args['args'] | ||
@command = args['command'] | ||
@ports = GoogleInSpec::VertexAI::Property::ModelContainerSpecPortsArray.parse(args['ports'], to_s) | ||
@health_route = args['healthRoute'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelContainerSpec" | ||
end | ||
end | ||
end | ||
end | ||
end |
45 changes: 45 additions & 0 deletions
45
libraries/google/vertexai/property/model_container_spec_env.rb
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelContainerSpecEnv | ||
attr_reader :name | ||
|
||
attr_reader :value | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@name = args['name'] | ||
@value = args['value'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelContainerSpecEnv" | ||
end | ||
end | ||
|
||
class ModelContainerSpecEnvArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return ModelContainerSpecEnv.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| ModelContainerSpecEnv.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
42 changes: 42 additions & 0 deletions
42
libraries/google/vertexai/property/model_container_spec_ports.rb
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelContainerSpecPorts | ||
attr_reader :container_port | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@container_port = args['containerPort'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelContainerSpecPorts" | ||
end | ||
end | ||
|
||
class ModelContainerSpecPortsArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return ModelContainerSpecPorts.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| ModelContainerSpecPorts.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
45 changes: 45 additions & 0 deletions
45
libraries/google/vertexai/property/model_deployed_models.rb
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelDeployedModels | ||
attr_reader :deployed_model_id | ||
|
||
attr_reader :endpoint | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@deployed_model_id = args['deployedModelId'] | ||
@endpoint = args['endpoint'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelDeployedModels" | ||
end | ||
end | ||
|
||
class ModelDeployedModelsArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return ModelDeployedModels.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| ModelDeployedModels.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
34 changes: 34 additions & 0 deletions
34
libraries/google/vertexai/property/model_encryption_spec.rb
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelEncryptionSpec | ||
attr_reader :kms_key_name | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@kms_key_name = args['kmsKeyName'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelEncryptionSpec" | ||
end | ||
end | ||
end | ||
end | ||
end |
56 changes: 56 additions & 0 deletions
56
libraries/google/vertexai/property/model_explanation_spec.rb
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/vertexai/property/model_explanation_spec_metadata' | ||
require 'google/vertexai/property/model_explanation_spec_metadata_inputs' | ||
require 'google/vertexai/property/model_explanation_spec_metadata_outputs' | ||
require 'google/vertexai/property/model_explanation_spec_parameters' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_examples' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_examples_example_gcs_source_gcs_source' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_examples_presets' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_blur_baseline_config' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_integrated_gradients_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_sampled_shapley_attribution' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_blur_baseline_config' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma' | ||
require 'google/vertexai/property/model_explanation_spec_parameters_xrai_attribution_smooth_grad_config_feature_noise_sigma_noise_sigma' | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelExplanationSpec | ||
attr_reader :parameters | ||
|
||
attr_reader :metadata | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@parameters = GoogleInSpec::VertexAI::Property::ModelExplanationSpecParameters.new(args['parameters'], to_s) | ||
@metadata = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadata.new(args['metadata'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelExplanationSpec" | ||
end | ||
end | ||
end | ||
end | ||
end |
45 changes: 45 additions & 0 deletions
45
libraries/google/vertexai/property/model_explanation_spec_metadata.rb
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/vertexai/property/model_explanation_spec_metadata_inputs' | ||
require 'google/vertexai/property/model_explanation_spec_metadata_outputs' | ||
module GoogleInSpec | ||
module VertexAI | ||
module Property | ||
class ModelExplanationSpecMetadata | ||
attr_reader :feature_attributions_schema_uri | ||
|
||
attr_reader :latent_space_source | ||
|
||
attr_reader :outputs | ||
|
||
attr_reader :inputs | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@feature_attributions_schema_uri = args['featureAttributionsSchemaUri'] | ||
@latent_space_source = args['latentSpaceSource'] | ||
@outputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataOutputs.new(args['outputs'], to_s) | ||
@inputs = GoogleInSpec::VertexAI::Property::ModelExplanationSpecMetadataInputs.new(args['inputs'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} ModelExplanationSpecMetadata" | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.