morpheus.cli.utils

Functions

get_config_from_ctx(ctx)

get_enum_keys(enum_class)

get_enum_members(enum_class)

get_log_levels()

Returns a list of all available logging levels in string format

get_package_relative_file(filename)

get_pipeline_from_ctx(ctx)

is_enum(enum_class)

is_pybind_enum(cls)

Determines if the given cls is an enum.

load_labels_file(labels_file)

parse_enum(_, _2, value, enum_class[, ...])

parse_log_level(ctx, param, value)

Click callback that parses a command line value into a logging level

prepare_command([parse_config])

show_defaults(f)

Ensures the click.Context has show_defaults set to True.

str_to_file_type(file_type_str)

without_empty_args(f)

Removes keyword arguments that have a None value

Classes

MorpheusRelativePath(*args, **kwargs)

A specialization of the click.Path class that falls back to using package relative paths if the file cannot be found.

get_config_from_ctx(ctx)[source]

get_enum_keys(enum_class)[source]

get_enum_members(enum_class)[source]

get_log_levels()[source]

Returns a list of all available logging levels in string format

get_package_relative_file(filename)[source]

get_pipeline_from_ctx(ctx)[source]

is_enum(enum_class)[source]

is_pybind_enum(cls)[source]

Determines if the given cls is an enum. C++ enums exposed via pybind11 do not inherit from Enum, but do expose the __members__ convention. https://docs.python.org/3.8/library/enum.html?highlight=__members__#iteration

load_labels_file(labels_file)[source]

parse_enum(_, _2, value, enum_class, case_sensitive=True)[source]

parse_log_level(ctx, param, value)[source]

Click callback that parses a command line value into a logging level

prepare_command(parse_config=False)[source]

show_defaults(f)[source]

Ensures the click.Context has show_defaults set to True. (Seems like a bug currently)

str_to_file_type(file_type_str)[source]

without_empty_args(f)[source]

Removes keyword arguments that have a None value

© Copyright 2023, NVIDIA. Last updated on Apr 11, 2023.