pub struct QualityIssueLabel {
pub issue_id: String,
pub issue_type: LabeledIssueType,
pub subtype: Option<QualityIssueSubtype>,
pub document_id: String,
pub field_name: String,
pub original_value: Option<String>,
pub modified_value: Option<String>,
pub severity: u8,
pub processor: String,
pub metadata: HashMap<String, String>,
}Expand description
A label describing a data quality issue for ML training.
Fields§
§issue_id: StringUnique identifier for this issue
issue_type: LabeledIssueTypeType of quality issue
subtype: Option<QualityIssueSubtype>More specific subtype
document_id: StringID of the affected document/record
field_name: StringName of the affected field
original_value: Option<String>Original value before modification (if available)
modified_value: Option<String>Modified/corrupted value (if applicable)
severity: u8Severity level (1-5)
processor: StringName of the processor that created this issue
metadata: HashMap<String, String>Additional metadata
Implementations§
Source§impl QualityIssueLabel
impl QualityIssueLabel
Sourcepub fn new(
issue_type: LabeledIssueType,
document_id: impl Into<String>,
field_name: impl Into<String>,
processor: impl Into<String>,
) -> Self
pub fn new( issue_type: LabeledIssueType, document_id: impl Into<String>, field_name: impl Into<String>, processor: impl Into<String>, ) -> Self
Create a new quality issue label.
Sourcepub fn with_subtype(self, subtype: QualityIssueSubtype) -> Self
pub fn with_subtype(self, subtype: QualityIssueSubtype) -> Self
Set the subtype.
Sourcepub fn with_original(self, value: impl Into<String>) -> Self
pub fn with_original(self, value: impl Into<String>) -> Self
Set the original value.
Sourcepub fn with_modified(self, value: impl Into<String>) -> Self
pub fn with_modified(self, value: impl Into<String>) -> Self
Set the modified value.
Sourcepub fn with_values(
self,
original: impl Into<String>,
modified: impl Into<String>,
) -> Self
pub fn with_values( self, original: impl Into<String>, modified: impl Into<String>, ) -> Self
Set both original and modified values.
Sourcepub fn with_severity(self, severity: u8) -> Self
pub fn with_severity(self, severity: u8) -> Self
Set the severity level.
Sourcepub fn with_metadata(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add metadata.
Sourcepub fn missing_value(
document_id: impl Into<String>,
field_name: impl Into<String>,
processor: impl Into<String>,
) -> Self
pub fn missing_value( document_id: impl Into<String>, field_name: impl Into<String>, processor: impl Into<String>, ) -> Self
Create a missing value label.
Sourcepub fn typo(
document_id: impl Into<String>,
field_name: impl Into<String>,
original: impl Into<String>,
modified: impl Into<String>,
processor: impl Into<String>,
) -> Self
pub fn typo( document_id: impl Into<String>, field_name: impl Into<String>, original: impl Into<String>, modified: impl Into<String>, processor: impl Into<String>, ) -> Self
Create a typo label.
Trait Implementations§
Source§impl Clone for QualityIssueLabel
impl Clone for QualityIssueLabel
Source§fn clone(&self) -> QualityIssueLabel
fn clone(&self) -> QualityIssueLabel
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 QualityIssueLabel
impl Debug for QualityIssueLabel
Source§impl<'de> Deserialize<'de> for QualityIssueLabel
impl<'de> Deserialize<'de> for QualityIssueLabel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QualityIssueLabel
impl RefUnwindSafe for QualityIssueLabel
impl Send for QualityIssueLabel
impl Sync for QualityIssueLabel
impl Unpin for QualityIssueLabel
impl UnwindSafe for QualityIssueLabel
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