in smdebug_rulesconfig/profiler_rules/rules.py [0:0]
def __init__(self, increase=5, patience=1000, window=10, scan_interval_us=60 * 1000 * 1000):
"""
This rule helps to detect large increase in memory usage on GPUs. The rule computes the moving average of continous datapoints and compares it against the moving average of previous iteration.
:param increase: defines the threshold for absolute memory increase.Default is 5%. So if moving average increase from 5% to 6%, the rule will fire.
:param patience: defines how many continous datapoints to capture before Rule runs the first evluation. Default is 1000
:param window: window size for computing moving average of continous datapoints
:param scan_interval_us: interval with which timeline files are scanned. Default is 60000000 us.
"""
validate_positive_integer(self.__class__.__name__, "increase", increase)
validate_positive_integer(self.__class__.__name__, "patience", patience)
validate_positive_integer(self.__class__.__name__, "window", window)
validate_positive_integer(self.__class__.__name__, "scan_interval_us", scan_interval_us)
super().__init__(
increase=increase, patience=patience, window=window, scan_interval_us=scan_interval_us
)