morpheus.utils.module_utils

Functions

get_module_config(module_id, builder)

Returns the module configuration for the specified module id.

load_module(config, builder)

Loads a module that exists in the module registry.

make_nested_module(module_id, namespace, ...)

This function creates a nested module and registers it in the module registry.

register_module(module_id, namespace)

Registers a module if not exists in the module registry.

verify_module_meta_fields(config)

This function make sure the module configuration contains meta fields.

verify_module_registration(func)

Module availability in the module registry is verified by this function.

get_module_config(module_id, builder)[source]

Returns the module configuration for the specified module id.

Parameters
module_idstr

Unique identifier for a module in the module registry.

buildermrc.Builder

MRC Builder object.

Returns
configtyping.Dict

Module configuration.

load_module(config, builder)[source]

Loads a module that exists in the module registry.

Parameters
configtyping.Dict

Module configuration.

buildermrc.Builder

MRC Builder object.

Returns
module

Module object.

make_nested_module(module_id, namespace, ordered_modules_meta)[source]

This function creates a nested module and registers it in the module registry. This module unifies a chain of two or more modules into a single module.

Parameters
module_idstr

Unique identifier for a module in the module registry.

namespacestr

Namespace to virtually cluster the modules.

ordered_modules_metatyping.List[typing.Dict[str, str]]

The sequence in which the edges between the nodes are made will be determined by ordered modules meta.

register_module(module_id, namespace)[source]

Registers a module if not exists in the module registry.

Parameters
module_idstr

Unique identifier for a module in the module registry.

namespacestr

Namespace to virtually cluster the modules.

Returns
inner_func

Encapsulated function.

verify_module_meta_fields(config)[source]

This function make sure the module configuration contains meta fields.

Parameters
configtyping.Dict

Module configuration.

verify_module_registration(func)[source]

Module availability in the module registry is verified by this function.

Parameters
funcFunction that requires wrapping.
Returns
inner_func

Encapsulated function.

© Copyright 2023, NVIDIA. Last updated on Feb 3, 2023.