-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Current behavior
If a seed is provided to an Augmenter, a new RandomState instance is created on each call to augment using the given seed. This causes an identical augmentation to be generated on each augment call, e.g.,
noise = tsaug.AddNoise(seed=42)
noise.augment(X) # new result
noise.augment(X) # same resultDesired behavior
Supplying a seed instantiates a RandomState() during __init__ and used on each subsequent call to augment instead of being created each time, e.g.,
noise = tsaug.AddNoise(seed=42)
noise.augment(X) # new result
noise.augment(X) # another new resultIn this situation, setting the seed allows randomness but from a reproducible starting point, which is the typical use-case for setting a seed (e.g., in a training pipeline in ML). Currently, there is no ability to have reproducibility and pseudo random results on each call to augment as far as I understand. If the behavior is updated, then the old behavior can be captured by repeatedly instantiating the Augmenter, i.e.,
tsaug.AddNoise(seed=42).augment(X) # new result
tsaug.AddNoise(seed=42).augment(X) # same result