#[non_exhaustive]pub struct TrialContext {
pub description: String,
pub parameters: Vec<Parameter>,
/* private fields */
}Available on crate feature
vizier-service only.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.description: StringA human-readable field which can store a description of this context. This will become part of the resulting Trial’s description field.
parameters: Vec<Parameter>If/when a Trial is generated or selected from this Context, its Parameters will match any parameters specified here. (I.e. if this context specifies parameter name:‘a’ int_value:3, then a resulting Trial will have int_value:3 for its parameter named ‘a’.) Note that we first attempt to match existing REQUESTED Trials with contexts, and if there are no matches, we generate suggestions in the subspace defined by the parameters specified here. NOTE: a Context without any Parameters matches the entire feasible search space.
Implementations§
Source§impl TrialContext
impl TrialContext
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_parameters<T, V>(self, v: T) -> Self
pub fn set_parameters<T, V>(self, v: T) -> Self
Sets the value of parameters.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::trial::Parameter;
let x = TrialContext::new()
.set_parameters([
Parameter::default()/* use setters */,
Parameter::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for TrialContext
impl Clone for TrialContext
Source§fn clone(&self) -> TrialContext
fn clone(&self) -> TrialContext
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 TrialContext
impl Debug for TrialContext
Source§impl Default for TrialContext
impl Default for TrialContext
Source§fn default() -> TrialContext
fn default() -> TrialContext
Returns the “default value” for a type. Read more
Source§impl Message for TrialContext
impl Message for TrialContext
Source§impl PartialEq for TrialContext
impl PartialEq for TrialContext
impl StructuralPartialEq for TrialContext
Auto Trait Implementations§
impl Freeze for TrialContext
impl RefUnwindSafe for TrialContext
impl Send for TrialContext
impl Sync for TrialContext
impl Unpin for TrialContext
impl UnwindSafe for TrialContext
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