datumaro.components.contexts.importer#

Classes

FailingImportErrorPolicy()

ImportContext([progress_reporter, error_policy])

Method generated by attrs for class ImportContext.

ImportErrorPolicy()

NullImportContext([progress_reporter, ...])

Method generated by attrs for class ImportContext.

class datumaro.components.contexts.importer.ImportErrorPolicy[source]#

Bases: object

report_item_error(error: Exception, *, item_id: Tuple[str, str]) None[source]#

Allows to report a problem with a dataset item. If this function returns, the extractor must skip the item.

report_annotation_error(error: Exception, *, item_id: Tuple[str, str]) None[source]#

Allows to report a problem with a dataset item annotation. If this function returns, the extractor must skip the annotation.

fail(error: Exception) NoReturn[source]#
class datumaro.components.contexts.importer.FailingImportErrorPolicy[source]#

Bases: ImportErrorPolicy

class datumaro.components.contexts.importer.ImportContext(progress_reporter=None, error_policy=None)[source]#

Bases: object

Method generated by attrs for class ImportContext.

progress_reporter: ProgressReporter#
error_policy: ImportErrorPolicy#
class datumaro.components.contexts.importer.NullImportContext(progress_reporter=None, error_policy=None)[source]#

Bases: ImportContext

Method generated by attrs for class ImportContext.

progress_reporter: ProgressReporter#
error_policy: ImportErrorPolicy#