def _add_dynamic_transform_opts(parser): """Options related to transforms. Options that specified in the definitions of each transform class at `onmt/transforms/*.py`. """ for name, transform_cls in AVAILABLE_TRANSFORMS.items(): transform_cls.add_options(parser)
def _validate_transforms_opts(cls, opt): """Check options used by transforms.""" for name, transform_cls in AVAILABLE_TRANSFORMS.items(): if name in opt._all_transform: transform_cls._validate_options(opt)