morpheus.utils.control_message_utils

Functions

cm_default_failure_context_manager([...]) Decorator function to set the default failure context manager for ControlMessage processing.
cm_ensure_payload_not_null(control_message) Ensures that the payload of a ControlMessage is not None.
cm_set_failure(control_message, reason) Sets the failure metadata on a ControlMessage.
cm_skip_processing_if_failed(func) Decorator function to skip processing if the ControlMessage has failed.

Classes

CMDefaultFailureContextManager(control_message) Default Context manager for handling ControlMessage failures.
cm_default_failure_context_manager(raise_on_failure=False)[source]

Decorator function to set the default failure context manager for ControlMessage processing.

Parameters
raise_on_failurebool, optional

Whether to raise an exception on failure, by default False.

Returns
decoratortyping.Callable

The decorated function.

cm_ensure_payload_not_null(control_message)[source]

Ensures that the payload of a ControlMessage is not None.

Parameters
control_messageControlMessage

The ControlMessage to check.

Raises
ValueError

If the payload is None.

cm_set_failure(control_message, reason)[source]

Sets the failure metadata on a ControlMessage.

Parameters
control_messageControlMessage

The ControlMessage to set the failure metadata on.

reasonstr

The reason for the failure.

Returns
control_messageControlMessage

The modified ControlMessage with the failure metadata set.

cm_skip_processing_if_failed(func)[source]

Decorator function to skip processing if the ControlMessage has failed.

Parameters
functyping.Callable

The function to decorate.

Returns
wrappertyping.Callable

The decorated function.

Previous morpheus.utils.concat_df
Next morpheus.utils.control_message_utils.CMDefaultFailureContextManager
© Copyright 2023, NVIDIA. Last updated on Feb 2, 2024.