nemo_curator.utils.performance_utils
Module Contents
Classes
API
Statistics for tracking stage performance metrics. Attributes: stage_name: Name of the processing stage. process_time: Total processing time in seconds. actor_idle_time: Time the actor spent idle in seconds. input_data_size_mb: Size of input data in megabytes. num_items_processed: Number of items processed in this stage. custom_metrics: Custom metrics to track.
Add two StagePerfStats.
Add two StagePerfStats together, if right is 0, returns itself.
Returns (metric_name, metric_value) pairs custom_metrics are flattened into the format (custom.<metric_name>, metric_value)
Reset the stats.
Convert the stats to a dictionary.
Tracker for stage performance stats. Tracks processing time and other metrics at a per process_data call level.
Reset internal counters.
Log the stats of the stage. Args: verbose: Whether to log the stats verbosely. Returns: A tuple of the stage name and the stage performance stats.
Reinitialize the stage timer. Args: stage: The stage to reinitialize the timer for. stage_input_size: The size of the stage input.
Time the processing of the stage. Args: num_items: The number of items being processed.