caikit.core.augmentors.schemes

Submodules

Classes

AlwaysSelectionScheme

SchemeBase

RandomMultiSelectionScheme

RandomSingleSelectionScheme

Package Contents

class caikit.core.augmentors.schemes.AlwaysSelectionScheme(preserve_order, augmentors, random_seed=1001)[source]

Bases: caikit.core.augmentors.schemes.base.SchemeBase

_execute(obj)[source]

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.

class caikit.core.augmentors.schemes.SchemeBase(preserve_order, augmentors, random_seed)[source]
_preserve_order
_current_order
_augmentors
_init_state
execute(obj)[source]

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.

reset()[source]

Reset the random state of all encapsulated augmentors and the scheme itself.

class caikit.core.augmentors.schemes.RandomMultiSelectionScheme(preserve_order, selection_probs, augmentors, random_seed=1001)[source]

Bases: caikit.core.augmentors.schemes.base.SchemeBase

_selection_probs
_execute(obj)[source]

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.

class caikit.core.augmentors.schemes.RandomSingleSelectionScheme(selection_probs, augmentors, random_seed=1001)[source]

Bases: caikit.core.augmentors.schemes.base.SchemeBase

_selection_probs
_execute(obj)[source]

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.