datumaro.cli.commands.require_project.modification.export#

Functions

build_parser([parser_ctor])

export_command(args)

get_sensitive_args()

datumaro.cli.commands.require_project.modification.export.build_parser(parser_ctor=<class 'argparse.ArgumentParser'>)[source]#
datumaro.cli.commands.require_project.modification.export.get_sensitive_args()[source]#
exception datumaro.cli.commands.require_project.modification.export.CliException[source]#

Bases: DatumaroError

class datumaro.cli.commands.require_project.modification.export.FilterModes(value)[source]#

Bases: Enum

An enumeration.

items = 1#
annotations = 2#
items_annotations = 3#
i = 1#
a = 2#
i_a = 3#
a_i = 3#
annotations_items = 3#
static parse(s)[source]#
classmethod make_filter_args(mode)[source]#
classmethod list_options()[source]#
class datumaro.cli.commands.require_project.modification.export.MultilineFormatter(keep_natural=False, **kwargs)[source]#

Bases: HelpFormatter

Keeps line breaks introduced with ‘|n’ separator and spaces introduced with ‘|s’, also removes the ‘code-block’ directives.

class datumaro.cli.commands.require_project.modification.export.ProjectBuildTargets(tree: Tree)[source]#

Bases: CrudProxy[BuildTarget]

MAIN_TARGET = 'project'#
BASE_STAGE = 'root'#
add_target(name) BuildTarget[source]#
add_stage(target, value, prev=None, name=None) str[source]#
remove_target(name: str)[source]#
remove_stage(target: str, name: str)[source]#
add_transform_stage(target: str, transform: str, params: Dict | None = None, name: str | None = None)[source]#
add_inference_stage(target: str, model: str, params: Dict | None = None, name: str | None = None)[source]#
add_filter_stage(target: str, expr: str, params: Dict | None = None, name: str | None = None)[source]#
add_convert_stage(target: str, format: str, params: Dict | None = None, name: str | None = None)[source]#
add_explore_stage(target: str, params: Dict | None = None, name: str | None = None)[source]#
static make_target_name(target: str, stage: str | None = None) str[source]#
classmethod split_target_name(name: str) Tuple[str, str][source]#
classmethod strip_target_name(name: str) str[source]#
make_pipeline(target: str) Pipeline[source]#
exception datumaro.cli.commands.require_project.modification.export.ProjectNotFoundError(path)[source]#

Bases: DatumaroError

Method generated by attrs for class ProjectNotFoundError.

path#
datumaro.cli.commands.require_project.modification.export.export_command(args)[source]#
datumaro.cli.commands.require_project.modification.export.generate_next_file_name(basename, basedir='.', sep='.', ext='')[source]#

If basedir does not contain basename, returns basename, otherwise generates a name by appending sep to the basename and the number, next to the last used number in the basedir for files with basename prefix. Optionally, appends ext.

datumaro.cli.commands.require_project.modification.export.load_project(project_dir, readonly=False)[source]#

load a Project.

datumaro.cli.commands.require_project.modification.export.make_file_name(s: str) str[source]#

Normalizes string, converts to lowercase, removes non-alpha characters, and converts spaces to hyphens.

datumaro.cli.commands.require_project.modification.export.scope_add(cm: ContextManager[T]) T[source]#
datumaro.cli.commands.require_project.modification.export.scoped(func, arg_name=None)[source]#

A function decorator, which allows to do actions with the current scope, such as registering error and exit callbacks and context managers.