#[non_exhaustive]pub struct ExamplesOverride {
pub neighbor_count: i32,
pub crowding_count: i32,
pub restrictions: Vec<ExamplesRestrictionsNamespace>,
pub return_embeddings: bool,
pub data_format: DataFormat,
/* private fields */
}Available on crate feature
prediction-service only.Expand description
Overrides for example-based explanations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.neighbor_count: i32The number of neighbors to return.
crowding_count: i32The number of neighbors to return that have the same crowding tag.
restrictions: Vec<ExamplesRestrictionsNamespace>Restrict the resulting nearest neighbors to respect these constraints.
return_embeddings: boolIf true, return the embeddings instead of neighbors.
data_format: DataFormatThe format of the data being provided with each call.
Implementations§
Source§impl ExamplesOverride
impl ExamplesOverride
pub fn new() -> Self
Sourcepub fn set_neighbor_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_neighbor_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_crowding_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_crowding_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_restrictions<T, V>(self, v: T) -> Self
pub fn set_restrictions<T, V>(self, v: T) -> Self
Sets the value of restrictions.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::ExamplesRestrictionsNamespace;
let x = ExamplesOverride::new()
.set_restrictions([
ExamplesRestrictionsNamespace::default()/* use setters */,
ExamplesRestrictionsNamespace::default()/* use (different) setters */,
]);Sourcepub fn set_return_embeddings<T: Into<bool>>(self, v: T) -> Self
pub fn set_return_embeddings<T: Into<bool>>(self, v: T) -> Self
Sets the value of return_embeddings.
§Example
ⓘ
let x = ExamplesOverride::new().set_return_embeddings(true);Sourcepub fn set_data_format<T: Into<DataFormat>>(self, v: T) -> Self
pub fn set_data_format<T: Into<DataFormat>>(self, v: T) -> Self
Sets the value of data_format.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::examples_override::DataFormat;
let x0 = ExamplesOverride::new().set_data_format(DataFormat::Instances);
let x1 = ExamplesOverride::new().set_data_format(DataFormat::Embeddings);Trait Implementations§
Source§impl Clone for ExamplesOverride
impl Clone for ExamplesOverride
Source§fn clone(&self) -> ExamplesOverride
fn clone(&self) -> ExamplesOverride
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExamplesOverride
impl Debug for ExamplesOverride
Source§impl Default for ExamplesOverride
impl Default for ExamplesOverride
Source§fn default() -> ExamplesOverride
fn default() -> ExamplesOverride
Returns the “default value” for a type. Read more
Source§impl Message for ExamplesOverride
impl Message for ExamplesOverride
Source§impl PartialEq for ExamplesOverride
impl PartialEq for ExamplesOverride
impl StructuralPartialEq for ExamplesOverride
Auto Trait Implementations§
impl Freeze for ExamplesOverride
impl RefUnwindSafe for ExamplesOverride
impl Send for ExamplesOverride
impl Sync for ExamplesOverride
impl Unpin for ExamplesOverride
impl UnwindSafe for ExamplesOverride
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
Mutably borrows from an owned value. Read more