caikit.core.augmentors.schemes ============================== .. py:module:: caikit.core.augmentors.schemes Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/caikit/core/augmentors/schemes/always_selection_scheme/index /autoapi/caikit/core/augmentors/schemes/base/index /autoapi/caikit/core/augmentors/schemes/random_multi_selection_scheme/index /autoapi/caikit/core/augmentors/schemes/random_single_selection_scheme/index Classes ------- .. autoapisummary:: caikit.core.augmentors.schemes.AlwaysSelectionScheme caikit.core.augmentors.schemes.SchemeBase caikit.core.augmentors.schemes.RandomMultiSelectionScheme caikit.core.augmentors.schemes.RandomSingleSelectionScheme Package Contents ---------------- .. py:class:: AlwaysSelectionScheme(preserve_order, augmentors, random_seed=1001) Bases: :py:obj:`caikit.core.augmentors.schemes.base.SchemeBase` .. py:method:: _execute(obj) Execute the merged scheme by always applying every contained augmentor (in a potentially shuffled ordering, based on the value of self.preserve_order). Args: obj (str | caikit.core.data_model.DataBase): Object to be augmented. Returns: str | caikit.core.data_model.DataBase: Augmented object of same type as input obj. .. py:class:: SchemeBase(preserve_order, augmentors, random_seed) .. py:attribute:: _preserve_order .. py:attribute:: _current_order .. py:attribute:: _augmentors .. py:attribute:: _init_state .. py:method:: execute(obj) Execute the merged scheme, i.e., augment the object by leveraging the encapsulated augmentors. Args: obj (str | caikit.core.data_model.DataBase): Object to be augmented. Returns: str | caikit.core.data_model.DataBase: Augmented object of same type as input obj. .. py:method:: reset() Reset the random state of all encapsulated augmentors and the scheme itself. .. py:class:: RandomMultiSelectionScheme(preserve_order, selection_probs, augmentors, random_seed=1001) Bases: :py:obj:`caikit.core.augmentors.schemes.base.SchemeBase` .. py:attribute:: _selection_probs .. py:method:: _execute(obj) Execute the merged scheme by sequentially applying augmentors (in a potentially shuffled ordering, based on the value of self.preserve_order). Args: obj (str | caikit.core.data_model.DataBase): Object to be augmented. Returns: str | caikit.core.data_model.DataBase: Augmented object of same type as input obj. .. py:class:: RandomSingleSelectionScheme(selection_probs, augmentors, random_seed=1001) Bases: :py:obj:`caikit.core.augmentors.schemes.base.SchemeBase` .. py:attribute:: _selection_probs .. py:method:: _execute(obj) Execute the merged scheme by picking one random augmentor and applying it. Args: obj (str | caikit.core.data_model.DataBase): Object to be augmented. Returns: str | caikit.core.data_model.DataBase: Augmented object of same type as input obj.