validator module

class datumaro.components.validator.Severity(value)[source]

Bases: enum.Enum

An enumeration.

warning = 1
error = 2
class datumaro.components.validator.TaskType(value)[source]

Bases: enum.Enum

An enumeration.

classification = 1
detection = 2
segmentation = 3
class datumaro.components.validator.Validator[source]

Bases: datumaro.components.cli_plugin.CliPlugin

validate(dataset: datumaro.components.extractor.IExtractor) Dict[source]

Returns the validation results of a dataset based on task type.

Parameters

dataset (IDataset) – Dataset to be validated

Raises

ValueError

Returns

Dict with validation statistics, reports and summary.

Return type

validation_results (dict)

compute_statistics(dataset: datumaro.components.extractor.IExtractor) Dict[source]

Computes statistics of the dataset based on task type.

Parameters

dataset (IDataset) – a dataset to be validated

Returns

A dict object containing statistics of the dataset.

Return type

stats (dict)

generate_reports(stats: Dict) List[Dict][source]