#[non_exhaustive]pub struct ActiveLearningConfig {
pub sample_config: Option<SampleConfig>,
pub training_config: Option<TrainingConfig>,
pub human_labeling_budget: Option<HumanLabelingBudget>,
/* private fields */
}job-service only.Expand description
Parameters that configure the active learning pipeline. Active learning will label the data incrementally by several iterations. For every iteration, it will select a batch of data based on the sampling strategy.
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.sample_config: Option<SampleConfig>Active learning data sampling config. For every active learning labeling iteration, it will select a batch of data based on the sampling strategy.
training_config: Option<TrainingConfig>CMLE training config. For every active learning labeling iteration, system will train a machine learning model on CMLE. The trained model will be used by data sampling algorithm to select DataItems.
human_labeling_budget: Option<HumanLabelingBudget>Required. Max human labeling DataItems. The rest part will be labeled by machine.
Implementations§
Source§impl ActiveLearningConfig
impl ActiveLearningConfig
pub fn new() -> Self
Sourcepub fn set_sample_config<T>(self, v: T) -> Selfwhere
T: Into<SampleConfig>,
pub fn set_sample_config<T>(self, v: T) -> Selfwhere
T: Into<SampleConfig>,
Sets the value of sample_config.
§Example
use google_cloud_aiplatform_v1::model::SampleConfig;
let x = ActiveLearningConfig::new().set_sample_config(SampleConfig::default()/* use setters */);Sourcepub fn set_or_clear_sample_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SampleConfig>,
pub fn set_or_clear_sample_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SampleConfig>,
Sets or clears the value of sample_config.
§Example
use google_cloud_aiplatform_v1::model::SampleConfig;
let x = ActiveLearningConfig::new().set_or_clear_sample_config(Some(SampleConfig::default()/* use setters */));
let x = ActiveLearningConfig::new().set_or_clear_sample_config(None::<SampleConfig>);Sourcepub fn set_training_config<T>(self, v: T) -> Selfwhere
T: Into<TrainingConfig>,
pub fn set_training_config<T>(self, v: T) -> Selfwhere
T: Into<TrainingConfig>,
Sets the value of training_config.
§Example
use google_cloud_aiplatform_v1::model::TrainingConfig;
let x = ActiveLearningConfig::new().set_training_config(TrainingConfig::default()/* use setters */);Sourcepub fn set_or_clear_training_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<TrainingConfig>,
pub fn set_or_clear_training_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<TrainingConfig>,
Sets or clears the value of training_config.
§Example
use google_cloud_aiplatform_v1::model::TrainingConfig;
let x = ActiveLearningConfig::new().set_or_clear_training_config(Some(TrainingConfig::default()/* use setters */));
let x = ActiveLearningConfig::new().set_or_clear_training_config(None::<TrainingConfig>);Sourcepub fn set_human_labeling_budget<T: Into<Option<HumanLabelingBudget>>>(
self,
v: T,
) -> Self
pub fn set_human_labeling_budget<T: Into<Option<HumanLabelingBudget>>>( self, v: T, ) -> Self
Sets the value of human_labeling_budget.
Note that all the setters affecting human_labeling_budget are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::active_learning_config::HumanLabelingBudget;
let x = ActiveLearningConfig::new().set_human_labeling_budget(Some(HumanLabelingBudget::MaxDataItemCount(42)));Sourcepub fn max_data_item_count(&self) -> Option<&i64>
pub fn max_data_item_count(&self) -> Option<&i64>
The value of human_labeling_budget
if it holds a MaxDataItemCount, None if the field is not set or
holds a different branch.
Sourcepub fn set_max_data_item_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_max_data_item_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of human_labeling_budget
to hold a MaxDataItemCount.
Note that all the setters affecting human_labeling_budget are
mutually exclusive.
§Example
let x = ActiveLearningConfig::new().set_max_data_item_count(42);
assert!(x.max_data_item_count().is_some());
assert!(x.max_data_item_percentage().is_none());Sourcepub fn max_data_item_percentage(&self) -> Option<&i32>
pub fn max_data_item_percentage(&self) -> Option<&i32>
The value of human_labeling_budget
if it holds a MaxDataItemPercentage, None if the field is not set or
holds a different branch.
Sourcepub fn set_max_data_item_percentage<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_data_item_percentage<T: Into<i32>>(self, v: T) -> Self
Sets the value of human_labeling_budget
to hold a MaxDataItemPercentage.
Note that all the setters affecting human_labeling_budget are
mutually exclusive.
§Example
let x = ActiveLearningConfig::new().set_max_data_item_percentage(42);
assert!(x.max_data_item_percentage().is_some());
assert!(x.max_data_item_count().is_none());Trait Implementations§
Source§impl Clone for ActiveLearningConfig
impl Clone for ActiveLearningConfig
Source§fn clone(&self) -> ActiveLearningConfig
fn clone(&self) -> ActiveLearningConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more