#[non_exhaustive]pub struct DeployedModel {Show 16 fields
pub id: String,
pub model: String,
pub model_version_id: String,
pub display_name: String,
pub create_time: Option<Timestamp>,
pub explanation_spec: Option<ExplanationSpec>,
pub disable_explanations: bool,
pub service_account: String,
pub disable_container_logging: bool,
pub enable_access_logging: bool,
pub private_endpoints: Option<PrivateEndpoints>,
pub faster_deployment_config: Option<FasterDeploymentConfig>,
pub status: Option<Status>,
pub system_labels: HashMap<String, String>,
pub speculative_decoding_spec: Option<SpeculativeDecodingSpec>,
pub prediction_resources: Option<PredictionResources>,
/* private fields */
}Expand description
A deployment of a Model. Endpoints contain one or more DeployedModels.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringImmutable. The ID of the DeployedModel. If not provided upon deployment, Vertex AI will generate a value for this ID.
This value should be 1-10 characters, and valid characters are /[0-9]/.
model: StringRequired. The resource name of the Model that this is the deployment of. Note that the Model may be in a different location than the DeployedModel’s Endpoint.
The resource name may contain version id or version alias to specify the
version.
Example: projects/{project}/locations/{location}/models/{model}@2
or
projects/{project}/locations/{location}/models/{model}@golden
if no version is specified, the default version will be deployed.
model_version_id: StringOutput only. The version ID of the model that is deployed.
display_name: StringThe display name of the DeployedModel. If not provided upon creation, the Model’s display_name is used.
create_time: Option<Timestamp>Output only. Timestamp when the DeployedModel was created.
explanation_spec: Option<ExplanationSpec>Explanation configuration for this DeployedModel.
When deploying a Model using EndpointService.DeployModel, this value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of explanation_spec is not populated, the value of the same field of Model.explanation_spec is inherited. If the corresponding Model.explanation_spec is not populated, all fields of the explanation_spec will be used for the explanation configuration.
disable_explanations: boolIf true, deploy the model without explainable feature, regardless the existence of Model.explanation_spec or explanation_spec.
service_account: StringThe service account that the DeployedModel’s container runs as. Specify the email address of the service account. If this service account is not specified, the container runs as a service account that doesn’t have access to the resource project.
Users deploying the Model must have the iam.serviceAccounts.actAs
permission on this service account.
disable_container_logging: boolFor custom-trained Models and AutoML Tabular Models, the container of the
DeployedModel instances will send stderr and stdout streams to
Cloud Logging by default. Please note that the logs incur cost,
which are subject to Cloud Logging
pricing.
User can disable container logging by setting this flag to true.
enable_access_logging: boolIf true, online prediction access logs are sent to Cloud Logging. These logs are like standard server access logs, containing information like timestamp and latency for each prediction request.
Note that logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option.
private_endpoints: Option<PrivateEndpoints>Output only. Provide paths for users to send predict/explain/health requests directly to the deployed model services running on Cloud via private services access. This field is populated if network is configured.
faster_deployment_config: Option<FasterDeploymentConfig>Configuration for faster model deployment.
status: Option<Status>Output only. Runtime status of the deployed model.
system_labels: HashMap<String, String>System labels to apply to Model Garden deployments. System labels are managed by Google for internal use only.
speculative_decoding_spec: Option<SpeculativeDecodingSpec>Optional. Spec for configuring speculative decoding.
prediction_resources: Option<PredictionResources>The prediction (for example, the machine) resources that the DeployedModel uses. The user is billed for the resources (at least their minimal amount) even if the DeployedModel receives no traffic. Not all Models support all resources types. See Model.supported_deployment_resources_types. Required except for Large Model Deploy use cases.
Implementations§
Source§impl DeployedModel
impl DeployedModel
pub fn new() -> Self
Sourcepub fn set_model_version_id<T: Into<String>>(self, v: T) -> Self
pub fn set_model_version_id<T: Into<String>>(self, v: T) -> Self
Sets the value of model_version_id.
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
Sourcepub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
pub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_explanation_spec<T: Into<Option<ExplanationSpec>>>(
self,
v: T,
) -> Self
pub fn set_explanation_spec<T: Into<Option<ExplanationSpec>>>( self, v: T, ) -> Self
Sets the value of explanation_spec.
Sourcepub fn set_disable_explanations<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_explanations<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_explanations.
Sourcepub fn set_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
Sourcepub fn set_disable_container_logging<T: Into<bool>>(self, v: T) -> Self
pub fn set_disable_container_logging<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_container_logging.
Sourcepub fn set_enable_access_logging<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_access_logging<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_access_logging.
Sourcepub fn set_private_endpoints<T: Into<Option<PrivateEndpoints>>>(
self,
v: T,
) -> Self
pub fn set_private_endpoints<T: Into<Option<PrivateEndpoints>>>( self, v: T, ) -> Self
Sets the value of private_endpoints.
Sourcepub fn set_faster_deployment_config<T: Into<Option<FasterDeploymentConfig>>>(
self,
v: T,
) -> Self
pub fn set_faster_deployment_config<T: Into<Option<FasterDeploymentConfig>>>( self, v: T, ) -> Self
Sets the value of faster_deployment_config.
Sourcepub fn set_system_labels<T, K, V>(self, v: T) -> Self
pub fn set_system_labels<T, K, V>(self, v: T) -> Self
Sets the value of system_labels.
Sourcepub fn set_speculative_decoding_spec<T: Into<Option<SpeculativeDecodingSpec>>>(
self,
v: T,
) -> Self
pub fn set_speculative_decoding_spec<T: Into<Option<SpeculativeDecodingSpec>>>( self, v: T, ) -> Self
Sets the value of speculative_decoding_spec.
Sourcepub fn set_prediction_resources<T: Into<Option<PredictionResources>>>(
self,
v: T,
) -> Self
pub fn set_prediction_resources<T: Into<Option<PredictionResources>>>( self, v: T, ) -> Self
Sets the value of prediction_resources.
Note that all the setters affecting prediction_resources are mutually
exclusive.
Sourcepub fn dedicated_resources(&self) -> Option<&Box<DedicatedResources>>
pub fn dedicated_resources(&self) -> Option<&Box<DedicatedResources>>
The value of prediction_resources
if it holds a DedicatedResources, None if the field is not set or
holds a different branch.
Sourcepub fn set_dedicated_resources<T: Into<Box<DedicatedResources>>>(
self,
v: T,
) -> Self
pub fn set_dedicated_resources<T: Into<Box<DedicatedResources>>>( self, v: T, ) -> Self
Sets the value of prediction_resources
to hold a DedicatedResources.
Note that all the setters affecting prediction_resources are
mutually exclusive.
Sourcepub fn automatic_resources(&self) -> Option<&Box<AutomaticResources>>
pub fn automatic_resources(&self) -> Option<&Box<AutomaticResources>>
The value of prediction_resources
if it holds a AutomaticResources, None if the field is not set or
holds a different branch.
Sourcepub fn set_automatic_resources<T: Into<Box<AutomaticResources>>>(
self,
v: T,
) -> Self
pub fn set_automatic_resources<T: Into<Box<AutomaticResources>>>( self, v: T, ) -> Self
Sets the value of prediction_resources
to hold a AutomaticResources.
Note that all the setters affecting prediction_resources are
mutually exclusive.
The value of prediction_resources
if it holds a SharedResources, None if the field is not set or
holds a different branch.
Sets the value of prediction_resources
to hold a SharedResources.
Note that all the setters affecting prediction_resources are
mutually exclusive.
Trait Implementations§
Source§impl Clone for DeployedModel
impl Clone for DeployedModel
Source§fn clone(&self) -> DeployedModel
fn clone(&self) -> DeployedModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more