Enum google_api_proto::google::cloud::aiplatform::v1::explanation_metadata::output_metadata::DisplayNameMapping
source · pub enum DisplayNameMapping {
IndexDisplayNameMapping(Value),
DisplayNameMappingKey(String),
}
Expand description
Defines how to map [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] to [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name].
If neither of the fields are specified, [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name] will not be populated.
Variants§
IndexDisplayNameMapping(Value)
Static mapping between the index and display name.
Use this if the outputs are a deterministic n-dimensional array, e.g. a list of scores of all the classes in a pre-defined order for a multi-classification Model. It’s not feasible if the outputs are non-deterministic, e.g. the Model produces top-k classes or sort the outputs by their values.
The shape of the value must be an n-dimensional array of strings. The number of dimensions must match that of the outputs to be explained. The [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name] is populated by locating in the mapping with [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index].
DisplayNameMappingKey(String)
Specify a field name in the prediction to look for the display name.
Use this if the prediction contains the display names for the outputs.
The display names in the prediction must have the same shape of the outputs, so that it can be located by [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] for a specific output.
Implementations§
source§impl DisplayNameMapping
impl DisplayNameMapping
sourcepub fn merge(
field: &mut Option<DisplayNameMapping>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<DisplayNameMapping>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl Clone for DisplayNameMapping
impl Clone for DisplayNameMapping
source§fn clone(&self) -> DisplayNameMapping
fn clone(&self) -> DisplayNameMapping
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DisplayNameMapping
impl Debug for DisplayNameMapping
source§impl PartialEq for DisplayNameMapping
impl PartialEq for DisplayNameMapping
source§fn eq(&self, other: &DisplayNameMapping) -> bool
fn eq(&self, other: &DisplayNameMapping) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DisplayNameMapping
Auto Trait Implementations§
impl Freeze for DisplayNameMapping
impl RefUnwindSafe for DisplayNameMapping
impl Send for DisplayNameMapping
impl Sync for DisplayNameMapping
impl Unpin for DisplayNameMapping
impl UnwindSafe for DisplayNameMapping
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request