#[non_exhaustive]pub struct InputMetadata {
pub input_baselines: Vec<Value>,
pub input_tensor_name: String,
pub encoding: Encoding,
pub modality: String,
pub feature_value_domain: Option<FeatureValueDomain>,
pub indices_tensor_name: String,
pub dense_shape_tensor_name: String,
pub index_feature_mapping: Vec<String>,
pub encoded_tensor_name: String,
pub encoded_baselines: Vec<Value>,
pub visualization: Option<Visualization>,
pub group_name: String,
/* private fields */
}dataset-service or deployment-resource-pool-service or endpoint-service or job-service or model-service or pipeline-service only.Expand description
Metadata of the input of a feature.
Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow.
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.input_baselines: Vec<Value>Baseline inputs for this feature.
If no baseline is specified, Vertex AI chooses the baseline for this feature. If multiple baselines are specified, Vertex AI returns the average attributions across them in Attribution.feature_attributions.
For Vertex AI-provided Tensorflow images (both 1.x and 2.x), the shape of each baseline must match the shape of the input tensor. If a scalar is provided, we broadcast to the same shape as the input tensor.
For custom images, the element of the baselines must be in the same format as the feature’s input in the instance[]. The schema of any single instance may be specified via Endpoint’s DeployedModels’ Model’s PredictSchemata’s instance_schema_uri.
input_tensor_name: StringName of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow.
encoding: EncodingDefines how the feature is encoded into the input tensor. Defaults to IDENTITY.
modality: StringModality of the feature. Valid values are: numeric, image. Defaults to numeric.
feature_value_domain: Option<FeatureValueDomain>The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized.
indices_tensor_name: StringSpecifies the index of the values of the input tensor. Required when the input tensor is a sparse representation. Refer to Tensorflow documentation for more details: https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
dense_shape_tensor_name: StringSpecifies the shape of the values of the input if the input is a sparse representation. Refer to Tensorflow documentation for more details: https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor.
index_feature_mapping: Vec<String>A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR.
encoded_tensor_name: StringEncoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable.
An encoded tensor is generated if the input tensor is encoded by a lookup table.
encoded_baselines: Vec<Value>A list of baselines for the encoded tensor.
The shape of each baseline should match the shape of the encoded tensor. If a scalar is provided, Vertex AI broadcasts to the same shape as the encoded tensor.
visualization: Option<Visualization>Visualization configurations for image explanation.
group_name: StringName of the group that the input belongs to. Features with the same group name will be treated as one feature when computing attributions. Features grouped together can have different shapes in value. If provided, there will be one single attribution generated in Attribution.feature_attributions, keyed by the group name.
Implementations§
Source§impl InputMetadata
impl InputMetadata
Sourcepub fn set_input_baselines<T, V>(self, v: T) -> Self
pub fn set_input_baselines<T, V>(self, v: T) -> Self
Sets the value of input_baselines.
§Example
use wkt::Value;
let x = InputMetadata::new()
.set_input_baselines([
Value::default()/* use setters */,
Value::default()/* use (different) setters */,
]);Sourcepub fn set_input_tensor_name<T: Into<String>>(self, v: T) -> Self
pub fn set_input_tensor_name<T: Into<String>>(self, v: T) -> Self
Sets the value of input_tensor_name.
§Example
let x = InputMetadata::new().set_input_tensor_name("example");Sourcepub fn set_encoding<T: Into<Encoding>>(self, v: T) -> Self
pub fn set_encoding<T: Into<Encoding>>(self, v: T) -> Self
Sets the value of encoding.
§Example
use google_cloud_aiplatform_v1::model::explanation_metadata::input_metadata::Encoding;
let x0 = InputMetadata::new().set_encoding(Encoding::Identity);
let x1 = InputMetadata::new().set_encoding(Encoding::BagOfFeatures);
let x2 = InputMetadata::new().set_encoding(Encoding::BagOfFeaturesSparse);Sourcepub fn set_modality<T: Into<String>>(self, v: T) -> Self
pub fn set_modality<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_feature_value_domain<T>(self, v: T) -> Selfwhere
T: Into<FeatureValueDomain>,
pub fn set_feature_value_domain<T>(self, v: T) -> Selfwhere
T: Into<FeatureValueDomain>,
Sets the value of feature_value_domain.
§Example
use google_cloud_aiplatform_v1::model::explanation_metadata::input_metadata::FeatureValueDomain;
let x = InputMetadata::new().set_feature_value_domain(FeatureValueDomain::default()/* use setters */);Sourcepub fn set_or_clear_feature_value_domain<T>(self, v: Option<T>) -> Selfwhere
T: Into<FeatureValueDomain>,
pub fn set_or_clear_feature_value_domain<T>(self, v: Option<T>) -> Selfwhere
T: Into<FeatureValueDomain>,
Sets or clears the value of feature_value_domain.
§Example
use google_cloud_aiplatform_v1::model::explanation_metadata::input_metadata::FeatureValueDomain;
let x = InputMetadata::new().set_or_clear_feature_value_domain(Some(FeatureValueDomain::default()/* use setters */));
let x = InputMetadata::new().set_or_clear_feature_value_domain(None::<FeatureValueDomain>);Sourcepub fn set_indices_tensor_name<T: Into<String>>(self, v: T) -> Self
pub fn set_indices_tensor_name<T: Into<String>>(self, v: T) -> Self
Sets the value of indices_tensor_name.
§Example
let x = InputMetadata::new().set_indices_tensor_name("example");Sourcepub fn set_dense_shape_tensor_name<T: Into<String>>(self, v: T) -> Self
pub fn set_dense_shape_tensor_name<T: Into<String>>(self, v: T) -> Self
Sets the value of dense_shape_tensor_name.
§Example
let x = InputMetadata::new().set_dense_shape_tensor_name("example");Sourcepub fn set_index_feature_mapping<T, V>(self, v: T) -> Self
pub fn set_index_feature_mapping<T, V>(self, v: T) -> Self
Sets the value of index_feature_mapping.
§Example
let x = InputMetadata::new().set_index_feature_mapping(["a", "b", "c"]);Sourcepub fn set_encoded_tensor_name<T: Into<String>>(self, v: T) -> Self
pub fn set_encoded_tensor_name<T: Into<String>>(self, v: T) -> Self
Sets the value of encoded_tensor_name.
§Example
let x = InputMetadata::new().set_encoded_tensor_name("example");Sourcepub fn set_encoded_baselines<T, V>(self, v: T) -> Self
pub fn set_encoded_baselines<T, V>(self, v: T) -> Self
Sets the value of encoded_baselines.
§Example
use wkt::Value;
let x = InputMetadata::new()
.set_encoded_baselines([
Value::default()/* use setters */,
Value::default()/* use (different) setters */,
]);Sourcepub fn set_visualization<T>(self, v: T) -> Selfwhere
T: Into<Visualization>,
pub fn set_visualization<T>(self, v: T) -> Selfwhere
T: Into<Visualization>,
Sets the value of visualization.
§Example
use google_cloud_aiplatform_v1::model::explanation_metadata::input_metadata::Visualization;
let x = InputMetadata::new().set_visualization(Visualization::default()/* use setters */);Sourcepub fn set_or_clear_visualization<T>(self, v: Option<T>) -> Selfwhere
T: Into<Visualization>,
pub fn set_or_clear_visualization<T>(self, v: Option<T>) -> Selfwhere
T: Into<Visualization>,
Sets or clears the value of visualization.
§Example
use google_cloud_aiplatform_v1::model::explanation_metadata::input_metadata::Visualization;
let x = InputMetadata::new().set_or_clear_visualization(Some(Visualization::default()/* use setters */));
let x = InputMetadata::new().set_or_clear_visualization(None::<Visualization>);Sourcepub fn set_group_name<T: Into<String>>(self, v: T) -> Self
pub fn set_group_name<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for InputMetadata
impl Clone for InputMetadata
Source§fn clone(&self) -> InputMetadata
fn clone(&self) -> InputMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputMetadata
impl Debug for InputMetadata
Source§impl Default for InputMetadata
impl Default for InputMetadata
Source§fn default() -> InputMetadata
fn default() -> InputMetadata
Source§impl Message for InputMetadata
impl Message for InputMetadata
Source§impl PartialEq for InputMetadata
impl PartialEq for InputMetadata
Source§fn eq(&self, other: &InputMetadata) -> bool
fn eq(&self, other: &InputMetadata) -> bool
self and other values to be equal, and is used by ==.