in smdebug_rulesconfig/profiler_rules/rules.py [0:0]
def __init__(self, stddev=3, mode=None, n_outliers=10, scan_interval_us=60 * 1000 * 1000):
"""
This rule helps to detect outlier in step durations. Rule returns True if duration is larger than stddev * standard deviation.
:param stddev: factor by which to multiply the standard deviation. Default is 3
:param mode: select mode under which steps have been saved and on which Rule should run on. Per default rule will run on steps from EVAL and TRAIN phase.
:param n_outliers: How many outliers to ignore before rule returns True. Default 10.
:param scan_interval_us: interval with which timeline files are scanned. Default is 60000000 us.
"""
validate_positive_integer(self.__class__.__name__, "stddev", stddev)
assert mode is None or isinstance(mode, str), "Mode must be a string if specified!"
validate_positive_integer(self.__class__.__name__, "n_outliers", n_outliers)
validate_positive_integer(self.__class__.__name__, "scan_interval_us", scan_interval_us)
super().__init__(
stddev=stddev, mode=mode, n_outliers=n_outliers, scan_interval_us=scan_interval_us
)