#[non_exhaustive]pub struct DoubleValueSpec {
pub min_value: f64,
pub max_value: f64,
pub default_value: Option<f64>,
/* private fields */
}Available on crate features
job-service or vizier-service only.Expand description
Value specification for a parameter in DOUBLE type.
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.min_value: f64Required. Inclusive minimum value of the parameter.
max_value: f64Required. Inclusive maximum value of the parameter.
default_value: Option<f64>A default value for a DOUBLE parameter that is assumed to be a
relatively good starting point. Unset value signals that there is no
offered starting point.
Currently only supported by the Vertex AI Vizier service. Not supported by HyperparameterTuningJob or TrainingPipeline.
Implementations§
Source§impl DoubleValueSpec
impl DoubleValueSpec
pub fn new() -> Self
Sourcepub fn set_min_value<T: Into<f64>>(self, v: T) -> Self
pub fn set_min_value<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn set_max_value<T: Into<f64>>(self, v: T) -> Self
pub fn set_max_value<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn set_default_value<T>(self, v: T) -> Self
pub fn set_default_value<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_default_value<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_default_value<T>(self, v: Option<T>) -> Self
Sets or clears the value of default_value.
§Example
ⓘ
let x = DoubleValueSpec::new().set_or_clear_default_value(Some(42.0));
let x = DoubleValueSpec::new().set_or_clear_default_value(None::<f32>);Trait Implementations§
Source§impl Clone for DoubleValueSpec
impl Clone for DoubleValueSpec
Source§fn clone(&self) -> DoubleValueSpec
fn clone(&self) -> DoubleValueSpec
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 DoubleValueSpec
impl Debug for DoubleValueSpec
Source§impl Default for DoubleValueSpec
impl Default for DoubleValueSpec
Source§fn default() -> DoubleValueSpec
fn default() -> DoubleValueSpec
Returns the “default value” for a type. Read more
Source§impl Message for DoubleValueSpec
impl Message for DoubleValueSpec
Source§impl PartialEq for DoubleValueSpec
impl PartialEq for DoubleValueSpec
impl StructuralPartialEq for DoubleValueSpec
Auto Trait Implementations§
impl Freeze for DoubleValueSpec
impl RefUnwindSafe for DoubleValueSpec
impl Send for DoubleValueSpec
impl Sync for DoubleValueSpec
impl Unpin for DoubleValueSpec
impl UnwindSafe for DoubleValueSpec
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