What can I help you with?
NVIDIA Morpheus (25.02.01)

morpheus.controllers.monitor_controller.MonitorController

class MonitorController(position, description, smoothing, unit, delayed_start, determine_count_fn, log_level, tqdm_class=None, text_color=<IndicatorsTextColor.cyan: 6>, font_style=<IndicatorsFontStyle.bold: 0>)[source]

Bases: object

Controls and displays throughput numbers at a specific point in the pipeline.

Parameters
position: int

Specifies the monitor’s position on the console.

descriptionstr, default = “Progress”

Name to show for this Monitor Stage in the console window.

smoothingfloat

Smoothing parameter to determine how much the throughput should be averaged. 0 = Instantaneous, 1 = Average.

unitstr

Units to show in the rate value.

delayed_startbool

When delayed_start is enabled, the progress bar will not be shown until the first message is received. Otherwise, the progress bar is shown on pipeline startup and will begin timing immediately. In large pipelines, this option may be desired to give a more accurate timing.

determine_count_fntyping.Callable[[typing.Any], int]

Custom function for determining the count in a message. Gets called for each message. Allows for correct counting of batched and sliced messages.

log_levelmorpheus.utils.logger.LogLevels, default = ‘INFO’

Enable this stage when the configured log level is at log_level or lower.

tqdm_class: `tqdm`, default = None

Custom implementation of tqdm if required.

Attributes
delayed_start
progress

Methods

auto_count_fn(msg) This is a helper function that is used to determine the count of messages received by the monitor.
ensure_progress_bar() Ensures that the progress bar is initialized and ready for display.
is_enabled() Returns a boolean indicating whether or not the logger is enabled.
progress_sink(msg) Receives a message and determines the count of the message.
refresh_progress(_) Refreshes the progress bar display.
sink_on_completed() Stops the progress bar and prevents the monitors from writing over each other when the last stage completes.

SupportedTypes

auto_count_fn(msg)[source]

This is a helper function that is used to determine the count of messages received by the monitor.

Parameters
msg: SupportedTypes

Message that determines the count of the message

Returns
Message count.
ensure_progress_bar()[source]

Ensures that the progress bar is initialized and ready for display.

is_enabled()[source]

Returns a boolean indicating whether or not the logger is enabled.

progress_sink(msg)[source]

Receives a message and determines the count of the message. The progress bar is displayed and the progress is updated.

Parameters
msg: SupportedTypes

Message that determines the count of the message

Returns
SupportedTypes
refresh_progress(_)[source]

Refreshes the progress bar display.

sink_on_completed()[source]

Stops the progress bar and prevents the monitors from writing over each other when the last stage completes.

Previous morpheus.controllers.monitor_controller
Next morpheus.controllers.rss_controller
© Copyright 2024, NVIDIA. Last updated on Mar 3, 2025.