#[non_exhaustive]pub struct StudySpec {
pub metrics: Vec<MetricSpec>,
pub parameters: Vec<ParameterSpec>,
pub algorithm: Algorithm,
pub observation_noise: ObservationNoise,
pub measurement_selection_type: MeasurementSelectionType,
pub study_stopping_config: Option<StudyStoppingConfig>,
pub automated_stopping_spec: Option<AutomatedStoppingSpec>,
/* private fields */
}job-service or vizier-service only.Expand description
Represents specification of a Study.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.metrics: Vec<MetricSpec>Required. Metric specs for the Study.
parameters: Vec<ParameterSpec>Required. The set of parameters to tune.
algorithm: AlgorithmThe search algorithm specified for the Study.
observation_noise: ObservationNoiseThe observation noise level of the study. Currently only supported by the Vertex AI Vizier service. Not supported by HyperparameterTuningJob or TrainingPipeline.
measurement_selection_type: MeasurementSelectionTypeDescribe which measurement selection type will be used
study_stopping_config: Option<StudyStoppingConfig>Conditions for automated stopping of a Study. Enable automated stopping by configuring at least one condition.
automated_stopping_spec: Option<AutomatedStoppingSpec>Implementations§
Source§impl StudySpec
impl StudySpec
Sourcepub fn set_metrics<T, V>(self, v: T) -> Self
pub fn set_metrics<T, V>(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::study_spec::ParameterSpec;
let x = StudySpec::new()
.set_parameters([
ParameterSpec::default()/* use setters */,
ParameterSpec::default()/* use (different) setters */,
]);Sourcepub fn set_algorithm<T: Into<Algorithm>>(self, v: T) -> Self
pub fn set_algorithm<T: Into<Algorithm>>(self, v: T) -> Self
Sourcepub fn set_observation_noise<T: Into<ObservationNoise>>(self, v: T) -> Self
pub fn set_observation_noise<T: Into<ObservationNoise>>(self, v: T) -> Self
Sets the value of observation_noise.
§Example
use google_cloud_aiplatform_v1::model::study_spec::ObservationNoise;
let x0 = StudySpec::new().set_observation_noise(ObservationNoise::Low);
let x1 = StudySpec::new().set_observation_noise(ObservationNoise::High);Sourcepub fn set_measurement_selection_type<T: Into<MeasurementSelectionType>>(
self,
v: T,
) -> Self
pub fn set_measurement_selection_type<T: Into<MeasurementSelectionType>>( self, v: T, ) -> Self
Sets the value of measurement_selection_type.
§Example
use google_cloud_aiplatform_v1::model::study_spec::MeasurementSelectionType;
let x0 = StudySpec::new().set_measurement_selection_type(MeasurementSelectionType::LastMeasurement);
let x1 = StudySpec::new().set_measurement_selection_type(MeasurementSelectionType::BestMeasurement);Sourcepub fn set_study_stopping_config<T>(self, v: T) -> Selfwhere
T: Into<StudyStoppingConfig>,
pub fn set_study_stopping_config<T>(self, v: T) -> Selfwhere
T: Into<StudyStoppingConfig>,
Sets the value of study_stopping_config.
§Example
use google_cloud_aiplatform_v1::model::study_spec::StudyStoppingConfig;
let x = StudySpec::new().set_study_stopping_config(StudyStoppingConfig::default()/* use setters */);Sourcepub fn set_or_clear_study_stopping_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<StudyStoppingConfig>,
pub fn set_or_clear_study_stopping_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<StudyStoppingConfig>,
Sets or clears the value of study_stopping_config.
§Example
use google_cloud_aiplatform_v1::model::study_spec::StudyStoppingConfig;
let x = StudySpec::new().set_or_clear_study_stopping_config(Some(StudyStoppingConfig::default()/* use setters */));
let x = StudySpec::new().set_or_clear_study_stopping_config(None::<StudyStoppingConfig>);Sourcepub fn set_automated_stopping_spec<T: Into<Option<AutomatedStoppingSpec>>>(
self,
v: T,
) -> Self
pub fn set_automated_stopping_spec<T: Into<Option<AutomatedStoppingSpec>>>( self, v: T, ) -> Self
Sets the value of automated_stopping_spec.
Note that all the setters affecting automated_stopping_spec are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::DecayCurveAutomatedStoppingSpec;
let x = StudySpec::new().set_automated_stopping_spec(Some(
google_cloud_aiplatform_v1::model::study_spec::AutomatedStoppingSpec::DecayCurveStoppingSpec(DecayCurveAutomatedStoppingSpec::default().into())));Sourcepub fn decay_curve_stopping_spec(
&self,
) -> Option<&Box<DecayCurveAutomatedStoppingSpec>>
pub fn decay_curve_stopping_spec( &self, ) -> Option<&Box<DecayCurveAutomatedStoppingSpec>>
The value of automated_stopping_spec
if it holds a DecayCurveStoppingSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_decay_curve_stopping_spec<T: Into<Box<DecayCurveAutomatedStoppingSpec>>>(
self,
v: T,
) -> Self
pub fn set_decay_curve_stopping_spec<T: Into<Box<DecayCurveAutomatedStoppingSpec>>>( self, v: T, ) -> Self
Sets the value of automated_stopping_spec
to hold a DecayCurveStoppingSpec.
Note that all the setters affecting automated_stopping_spec are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::DecayCurveAutomatedStoppingSpec;
let x = StudySpec::new().set_decay_curve_stopping_spec(DecayCurveAutomatedStoppingSpec::default()/* use setters */);
assert!(x.decay_curve_stopping_spec().is_some());
assert!(x.median_automated_stopping_spec().is_none());
assert!(x.convex_automated_stopping_spec().is_none());Sourcepub fn median_automated_stopping_spec(
&self,
) -> Option<&Box<MedianAutomatedStoppingSpec>>
pub fn median_automated_stopping_spec( &self, ) -> Option<&Box<MedianAutomatedStoppingSpec>>
The value of automated_stopping_spec
if it holds a MedianAutomatedStoppingSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_median_automated_stopping_spec<T: Into<Box<MedianAutomatedStoppingSpec>>>(
self,
v: T,
) -> Self
pub fn set_median_automated_stopping_spec<T: Into<Box<MedianAutomatedStoppingSpec>>>( self, v: T, ) -> Self
Sets the value of automated_stopping_spec
to hold a MedianAutomatedStoppingSpec.
Note that all the setters affecting automated_stopping_spec are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::MedianAutomatedStoppingSpec;
let x = StudySpec::new().set_median_automated_stopping_spec(MedianAutomatedStoppingSpec::default()/* use setters */);
assert!(x.median_automated_stopping_spec().is_some());
assert!(x.decay_curve_stopping_spec().is_none());
assert!(x.convex_automated_stopping_spec().is_none());Sourcepub fn convex_automated_stopping_spec(
&self,
) -> Option<&Box<ConvexAutomatedStoppingSpec>>
pub fn convex_automated_stopping_spec( &self, ) -> Option<&Box<ConvexAutomatedStoppingSpec>>
The value of automated_stopping_spec
if it holds a ConvexAutomatedStoppingSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_convex_automated_stopping_spec<T: Into<Box<ConvexAutomatedStoppingSpec>>>(
self,
v: T,
) -> Self
pub fn set_convex_automated_stopping_spec<T: Into<Box<ConvexAutomatedStoppingSpec>>>( self, v: T, ) -> Self
Sets the value of automated_stopping_spec
to hold a ConvexAutomatedStoppingSpec.
Note that all the setters affecting automated_stopping_spec are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::ConvexAutomatedStoppingSpec;
let x = StudySpec::new().set_convex_automated_stopping_spec(ConvexAutomatedStoppingSpec::default()/* use setters */);
assert!(x.convex_automated_stopping_spec().is_some());
assert!(x.decay_curve_stopping_spec().is_none());
assert!(x.median_automated_stopping_spec().is_none());Trait Implementations§
impl StructuralPartialEq for StudySpec
Auto Trait Implementations§
impl Freeze for StudySpec
impl RefUnwindSafe for StudySpec
impl Send for StudySpec
impl Sync for StudySpec
impl Unpin for StudySpec
impl UnsafeUnpin for StudySpec
impl UnwindSafe for StudySpec
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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