#[non_exhaustive]pub struct Measurement {
pub elapsed_duration: Option<Duration>,
pub step_count: i64,
pub metrics: Vec<Metric>,
/* private fields */
}Available on crate features
job-service or vizier-service only.Expand description
A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values.
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.elapsed_duration: Option<Duration>Output only. Time that the Trial has been running at the point of this Measurement.
step_count: i64Output only. The number of steps the machine learning model has been trained for. Must be non-negative.
metrics: Vec<Metric>Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values.
Implementations§
Source§impl Measurement
impl Measurement
pub fn new() -> Self
Sourcepub fn set_elapsed_duration<T>(self, v: T) -> Self
pub fn set_elapsed_duration<T>(self, v: T) -> Self
Sets the value of elapsed_duration.
§Example
ⓘ
use wkt::Duration;
let x = Measurement::new().set_elapsed_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_elapsed_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_elapsed_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of elapsed_duration.
§Example
ⓘ
use wkt::Duration;
let x = Measurement::new().set_or_clear_elapsed_duration(Some(Duration::default()/* use setters */));
let x = Measurement::new().set_or_clear_elapsed_duration(None::<Duration>);Sourcepub fn set_step_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_step_count<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_metrics<T, V>(self, v: T) -> Self
pub fn set_metrics<T, V>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for Measurement
impl Clone for Measurement
Source§fn clone(&self) -> Measurement
fn clone(&self) -> Measurement
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 Measurement
impl Debug for Measurement
Source§impl Default for Measurement
impl Default for Measurement
Source§fn default() -> Measurement
fn default() -> Measurement
Returns the “default value” for a type. Read more
Source§impl Message for Measurement
impl Message for Measurement
Source§impl PartialEq for Measurement
impl PartialEq for Measurement
impl StructuralPartialEq for Measurement
Auto Trait Implementations§
impl Freeze for Measurement
impl RefUnwindSafe for Measurement
impl Send for Measurement
impl Sync for Measurement
impl Unpin for Measurement
impl UnwindSafe for Measurement
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