autointent.modules.BaseEmbedding#

class autointent.modules.BaseEmbedding#

Bases: autointent.modules.base.BaseModule, abc.ABC

Base class for embedding modules.

get_implicit_initialization_params()#

Return default params used in __init__ method.

Some parameters of the module may be inferred using context rather from __init__ method. But they need to be logged for reproducibility during loading from disk.

Returns:

Dictionary of default params

Return type:

dict[str, Any]

get_train_data(context)#

Get train data.

Parameters:

context (autointent.Context) – Context to get train data from

Returns:

Tuple of train utterances and train labels

Return type:

tuple[list[str], autointent.custom_types.ListOfLabels]