Skip to main content

QualityIssueLabel

Struct QualityIssueLabel 

Source
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: String

Unique identifier for this issue

§issue_type: LabeledIssueType

Type of quality issue

§subtype: Option<QualityIssueSubtype>

More specific subtype

§document_id: String

ID of the affected document/record

§field_name: String

Name of the affected field

§original_value: Option<String>

Original value before modification (if available)

§modified_value: Option<String>

Modified/corrupted value (if applicable)

§severity: u8

Severity level (1-5)

§processor: String

Name of the processor that created this issue

§metadata: HashMap<String, String>

Additional metadata

Implementations§

Source§

impl QualityIssueLabel

Source

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.

Source

pub fn with_subtype(self, subtype: QualityIssueSubtype) -> Self

Set the subtype.

Source

pub fn with_original(self, value: impl Into<String>) -> Self

Set the original value.

Source

pub fn with_modified(self, value: impl Into<String>) -> Self

Set the modified value.

Source

pub fn with_values( self, original: impl Into<String>, modified: impl Into<String>, ) -> Self

Set both original and modified values.

Source

pub fn with_severity(self, severity: u8) -> Self

Set the severity level.

Source

pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Self

Add metadata.

Source

pub fn missing_value( document_id: impl Into<String>, field_name: impl Into<String>, processor: impl Into<String>, ) -> Self

Create a missing value label.

Source

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.

Source

pub fn format_variation( 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 format variation label.

Source

pub fn duplicate( document_id: impl Into<String>, original_doc_id: impl Into<String>, processor: impl Into<String>, ) -> Self

Create a duplicate label.

Trait Implementations§

Source§

impl Clone for QualityIssueLabel

Source§

fn clone(&self) -> QualityIssueLabel

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QualityIssueLabel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for QualityIssueLabel

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for QualityIssueLabel

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,