Skip to content

Commit

Permalink
successful generation
Browse files Browse the repository at this point in the history
  • Loading branch information
BBBmau committed Oct 18, 2024
1 parent 8d718ab commit 38d37c5
Show file tree
Hide file tree
Showing 5 changed files with 202 additions and 150 deletions.
319 changes: 169 additions & 150 deletions mmv1/products/vertexai/Models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,27 @@
--- !ruby/object:Api::Resource
name: Models
base_url: projects/{{project}}/locations/{{region}}/models
self_link: 'projects/{{project}}/locations/{{region}}/models/{{name}}'
min_version: beta
immutable: true
create_url: 'projects/{{project}}/locations/{{region}}/modelsPRE_CREATE_REPLACE_ME'
delete_url: '{{name}}'
self_link: '{{name}}'

references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation': 'https://cloud.google.com/vertex-ai/docs'
api: 'https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.models'
description: |-
A trained machine learning Model.
id_format: '{{name}}'
autogen_async: false
exclude_import: true
async: !ruby/object:Api::OpAsync
actions:
- create
- delete
operation: !ruby/object:Api::OpAsync::Operation
path: 'name'
base_url: '{{op_id}}'
wait_ms: 1000
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 40
result: !ruby/object:Api::OpAsync::Result
path: 'response'
resource_inside_response: true
Expand All @@ -40,15 +47,13 @@ async: !ruby/object:Api::OpAsync
error: !ruby/object:Api::OpAsync::Error
path: 'error'
message: 'message'
description: |-
A trained machine learning Model.
autogen_async: false
id_format: '{{name}}'
skip_sweeper: true
custom_code: !ruby/object:Provider::Terraform::CustomCode
decoder: templates/terraform/decoders/vertex_ai_models.go.erb
pre_create: templates/terraform/pre_create/vertex_ai_models.go.erb
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'vertex_ai_model'
skip_test: true
name: 'vertex_ai_model_basic'
skip_import_test: true
primary_resource_id: 'model'
vars:
name: 'test-model'
Expand All @@ -65,9 +70,9 @@ properties:
description:
The name of the Model. This value may be up to 60 characters, and
valid characters are [a-z0-9_]. The first character cannot be a number.
url_param_only: true
pattern: projects/{{project}}/locations/{{region}}/models/{{name}}
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
output: true
# url_param_only: true
custom_flatten: templates/terraform/custom_flatten/vertex_ai_name_from_model.go.erb
- !ruby/object:Api::Type::String
name: 'description'
description: Description of the Model.
Expand Down Expand Up @@ -99,27 +104,25 @@ properties:
Points to a YAML file stored on Google Cloud Storage describing additional information about the Model, that is specific to it.
- !ruby/object:Api::Type::NestedObject
name: 'predictSchemata'
output: true
description: |
The schemata that describe formats of the Model's predictions and explanations as given and returned via PredictionService.Predict and PredictionService.Explain.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: instanceSchemaUri
immutable: true
description: |
Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config.
- !ruby/object:Api::Type::String
name: parametersSchemaUri
immutable: true
description: |
Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters.
- !ruby/object:Api::Type::String
name: predictionSchemaUri
immutable: true
description: |
Points to a YAML file stored on Google Cloud Storage describing the format of a single prediction produced by this Model, which are returned via PredictResponse.predictions, ExplainResponse.explanations, and BatchPredictionJob.output_config.
- !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: instanceSchemaUri
immutable: true
description: |
Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config.
- !ruby/object:Api::Type::String
name: parametersSchemaUri
immutable: true
description: |
Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters.
- !ruby/object:Api::Type::String
name: predictionSchemaUri
immutable: true
description: |
Points to a YAML file stored on Google Cloud Storage describing the format of a single prediction produced by this Model, which are returned via PredictResponse.predictions, ExplainResponse.explanations, and BatchPredictionJob.output_config.
- !ruby/object:Api::Type::Array
name: 'supportedExportFormats'
output: true
description: |
Expand Down Expand Up @@ -152,123 +155,121 @@ properties:
name: 'containerSpec'
description: |
The specification of the container that is to be used when deploying this Model.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'imageUri'
required: true
immutable: true
description: URI of the Docker image to be used as the custom container for serving predictions.
- !ruby/object:Api::Type::Array
name: 'command'
immutable: true
description: Specifies the command that runs when the container starts. This overrides the container's ENTRYPOINT.
item_type: !ruby/object:Api::Type::String
- !ruby/object:Api::Type::Array
name: 'args'
immutable: true
description: Specifies arguments for the command that runs when the container starts.
item_type: !ruby/object:Api::Type::String
- !ruby/object:Api::Type::Array
name: 'env'
immutable: true
description: List of environment variables to set in the container.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'name'
required: true
description: name of the environment variable. Must be a valid C identifier.
- !ruby/object:Api::Type::String
name: 'value'
required: true
description: Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables.
- !ruby/object:Api::Type::Array
name: 'ports'
immutable: true
description: List of ports to expose from the container.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Integer
name: 'containerPort'
required: true
description: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive.
- !ruby/object:Api::Type::String
name: 'predictRoute'
immutable: true
description: HTTP path on the container to send prediction requests to.
- !ruby/object:Api::Type::String
name: 'healthRoute'
immutable: true
description: HTTP path on the container to send health checks to.
- !ruby/object:Api::Type::Array
name: 'grpcPorts'
immutable: true
description: List of ports to expose from the container.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Integer
name: 'containerPort'
required: true
description: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive.
- !ruby/object:Api::Type::String
name: 'deploymentTimeout'
immutable: true
description: Deployment timeout. Limit for deployment timeout is 2 hours.
- !ruby/object:Api::Type::String
name: 'sharedMemorySizeMb'
immutable: true
description: The amount of the VM memory to reserve as the shared memory for the model in megabytes.
- !ruby/object:Api::Type::NestedObject
name: 'startupProbe'
immutable: true
description: Specification for Kubernetes startup probe.
properties:
- !ruby/object:Api::Type::String
name: 'imageUri'
required: true
immutable: true
description: URI of the Docker image to be used as the custom container for serving predictions.
- !ruby/object:Api::Type::Array
name: 'command'
immutable: true
description: Specifies the command that runs when the container starts. This overrides the container's ENTRYPOINT.
item_type: Api::Type::String
- !ruby/object:Api::Type::Array
name: 'args'
immutable: true
description: Specifies arguments for the command that runs when the container starts.
item_type: Api::Type::String
- !ruby/object:Api::Type::Array
name: 'env'
immutable: true
description: List of environment variables to set in the container.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Integer
name: 'periodSeconds'
immutable: true
default_value: 10
description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeoutSeconds.
- !ruby/object:Api::Type::Integer
name: 'timeoutSeconds'
immutable: true
default_value: 1
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
- !ruby/object:Api::Type::NestedObject
name: 'exec'
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
properties:
- !ruby/object:Api::Type::String
name: 'command'
description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
- !ruby/object:Api::Type::NestedObject
name: 'healthProbe'
immutable: true
description: Specification for Kubernetes readiness probe.
- !ruby/object:Api::Type::String
name: 'name'
required: true
description: name of the environment variable. Must be a valid C identifier.
- !ruby/object:Api::Type::String
name: 'value'
required: true
description: Variables that reference a $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables.
- !ruby/object:Api::Type::Array
name: 'ports'
immutable: true
description: List of ports to expose from the container.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Integer
name: 'periodSeconds'
immutable: true
default_value: 10
description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeoutSeconds.
name: 'containerPort'
required: true
description: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive.
- !ruby/object:Api::Type::String
name: 'predictRoute'
immutable: true
description: HTTP path on the container to send prediction requests to.
- !ruby/object:Api::Type::String
name: 'healthRoute'
immutable: true
description: HTTP path on the container to send health checks to.
- !ruby/object:Api::Type::Array
name: 'grpcPorts'
immutable: true
description: List of ports to expose from the container.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Integer
name: 'timeoutSeconds'
immutable: true
default_value: 1
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
- !ruby/object:Api::Type::NestedObject
name: 'exec'
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
properties:
- !ruby/object:Api::Type::String
name: 'command'
description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
name: 'containerPort'
required: true
description: The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive.
- !ruby/object:Api::Type::String
name: 'deploymentTimeout'
immutable: true
description: Deployment timeout. Limit for deployment timeout is 2 hours.
- !ruby/object:Api::Type::String
name: 'sharedMemorySizeMb'
immutable: true
description: The amount of the VM memory to reserve as the shared memory for the model in megabytes.
- !ruby/object:Api::Type::NestedObject
name: 'startupProbe'
immutable: true
description: Specification for Kubernetes startup probe.
properties:
- !ruby/object:Api::Type::Integer
name: 'periodSeconds'
immutable: true
default_value: 10
description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeoutSeconds.
- !ruby/object:Api::Type::Integer
name: 'timeoutSeconds'
immutable: true
default_value: 1
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
- !ruby/object:Api::Type::NestedObject
name: 'exec'
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
properties:
- !ruby/object:Api::Type::String
name: 'command'
description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
- !ruby/object:Api::Type::NestedObject
name: 'healthProbe'
immutable: true
description: Specification for Kubernetes readiness probe.
properties:
- !ruby/object:Api::Type::Integer
name: 'periodSeconds'
immutable: true
default_value: 10
description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeoutSeconds.
- !ruby/object:Api::Type::Integer
name: 'timeoutSeconds'
immutable: true
default_value: 1
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
- !ruby/object:Api::Type::NestedObject
name: 'exec'
description: Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to periodSeconds.
properties:
- !ruby/object:Api::Type::String
name: 'command'
description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
- !ruby/object:Api::Type::String
name: 'artifactUri'
immutable: true
description: |
The path to the directory containing the Model artifact and any of its supporting files.
- !ruby/object:Api::Type::String
name: 'createTime'
output: true
Expand All @@ -284,12 +285,6 @@ properties:
description:
The display name of the Model. The name can be up to 128 characters long
and can consist of any UTF-8 characters.
required: true
- !ruby/object:Api::Type::String
name: 'metadataSchemaUri'
description: |-
Points to a YAML file stored on Google Cloud Storage describing additional information about the Model, that is specific to it. Unset if the Model does not have any additional information.
output: true
- !ruby/object:Api::Type::String
name: 'etag'
description: Used to perform consistent read-modify-write updates.
Expand All @@ -299,7 +294,7 @@ properties:
name: 'versionAliases'
description:
user provided version aliases so that a model version can be referenced via alias.
item_type: !ruby/object:Api::Type::String
item_type: Api::Type::String
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: The labels with user-defined metadata to organize your Models.
Expand Down Expand Up @@ -417,4 +412,28 @@ properties:
- bruteForceConfig
description: |-
Configuration options for using brute force search, which simply implements the
standard linear search in the database for each query.
standard linear search in the database for each query.
- !ruby/object:Api::Type::String
name: 'sourceModel'
at_least_one_of:
- model
- sourceModel
description: |
The resource name of the Model to copy. That Model must be in the same Project
- !ruby/object:Api::Type::ResourceRef
name: 'model'
resource: 'Model'
imports: 'displayName'
at_least_one_of:
- sourceModel
- model
description: |
The Model to create.
- !ruby/object:Api::Type::String
name: 'modelID'
description: |
Copy sourceModel into a new Model with this ID. The ID will become the final component of the model resource name.
- !ruby/object:Api::Type::String
name: 'parentModel'
description: |
Specify this field to copy sourceModel into this existing Model as a new version.
Loading

0 comments on commit 38d37c5

Please sign in to comment.