  from scipy.interpolate import griddata
  
  from lib.image import batch_convert_color
  
  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  
  @dataclass
 
</s> remove from lib.training import TrainingDataGenerator
 </s> add from lib.training import PreviewDataGenerator, TrainingDataGenerator
from lib.training.generator import BatchType, ConfigType, DataGenerator
if TYPE_CHECKING:
    from plugins.train.trainer._base import ConfigType

  from scipy.interpolate import griddata
  
  from lib.image import batch_convert_color
  
if TYPE_CHECKING:
    from plugins.train.trainer._base import ConfigType

  logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
  
  
  @dataclass
keep keep keep add keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
lib/training/augmentation.py