def _check_data(self) -> None:
    if (TEXT not in self.data_signature):
        raise InvalidConfigException(f"No text features specified. Cannot train '{self.__class__.__name__}' model.")
    if self.config[INTENT_CLASSIFICATION]:
        if (LABEL not in self.data_signature):
            raise InvalidConfigException(f"No label features specified. Cannot train '{self.__class__.__name__}' model.")
        if self.config[SHARE_HIDDEN_LAYERS]:
            different_sentence_signatures = False
            different_sequence_signatures = False
            if ((SENTENCE in self.data_signature[TEXT]) and (SENTENCE in self.data_signature[LABEL])):
                different_sentence_signatures = (self.data_signature[TEXT][SENTENCE] != self.data_signature[LABEL][SENTENCE])
            if ((SEQUENCE in self.data_signature[TEXT]) and (SEQUENCE in self.data_signature[LABEL])):
                different_sequence_signatures = (self.data_signature[TEXT][SEQUENCE] != self.data_signature[LABEL][SEQUENCE])
            if (different_sentence_signatures or different_sequence_signatures):
                raise ValueError('If hidden layer weights are shared, data signatures for text_features and label_features must coincide.')
    if (self.config[ENTITY_RECOGNITION] and ((ENTITIES not in self.data_signature) or (ENTITY_ATTRIBUTE_TYPE not in self.data_signature[ENTITIES]))):
        logger.debug(f"You specified '{self.__class__.__name__}' to train entities, but no entities are present in the training data. Skipping training of entities.")
        self.config[ENTITY_RECOGNITION] = False
def _check_data(self) -> None:
    if (TEXT not in self.data_signature):
        raise InvalidConfigException(f"No text features specified. Cannot train '{self.__class__.__name__}' model.")
    if self.config[INTENT_CLASSIFICATION]:
        if (LABEL not in self.data_signature):
            raise InvalidConfigException(f"No label features specified. Cannot train '{self.__class__.__name__}' model.")
        if self.config[SHARE_HIDDEN_LAYERS]:
            different_sentence_signatures = False
            different_sequence_signatures = False
            if ((SENTENCE in self.data_signature[TEXT]) and (SENTENCE in self.data_signature[LABEL])):
                different_sentence_signatures = (self.data_signature[TEXT][SENTENCE] != self.data_signature[LABEL][SENTENCE])
            if ((SEQUENCE in self.data_signature[TEXT]) and (SEQUENCE in self.data_signature[LABEL])):
                different_sequence_signatures = (self.data_signature[TEXT][SEQUENCE] != self.data_signature[LABEL][SEQUENCE])
            if (different_sentence_signatures or different_sequence_signatures):
                raise ValueError('If hidden layer weights are shared, data signatures for text_features and label_features must coincide.')
    if (self.config[ENTITY_RECOGNITION] and ((ENTITIES not in self.data_signature) or (ENTITY_ATTRIBUTE_TYPE not in self.data_signature[ENTITIES]))):
        logger.debug(f"You specified '{self.__class__.__name__}' to train entities, but no entities are present in the training data. Skipping training of entities.")
        self.config[ENTITY_RECOGNITION] = False