MCPcopy
hub / github.com/RasaHQ/rasa / get_signature

Method get_signature

rasa/utils/tensorflow/model_data.py:664–687  ·  view source on GitHub ↗

Get signature of RasaModelData. Signature stores the shape and whether features are sparse or not for every key. Returns: A dictionary of key and sub-key to a list of feature signatures (same structure as the data attribute).

(
        self, data: Optional[Data] = None
    )

Source from the content-addressed store, hash-verified

662 return self._convert_train_test_split(output_values, solo_values)
663
664 def get_signature(
665 self, data: Optional[Data] = None
666 ) -> Dict[Text, Dict[Text, List[FeatureSignature]]]:
667 """Get signature of RasaModelData.
668
669 Signature stores the shape and whether features are sparse or not for every key.
670
671 Returns:
672 A dictionary of key and sub-key to a list of feature signatures
673 (same structure as the data attribute).
674 """
675 if not data:
676 data = self.data
677
678 return {
679 key: {
680 sub_key: [
681 FeatureSignature(f.is_sparse, f.units, f.number_of_dimensions)
682 for f in features
683 ]
684 for sub_key, features in attribute_data.items()
685 }
686 for key, attribute_data in data.items()
687 }
688
689 def shuffled_data(self, data: Data) -> Data:
690 """Shuffle model data.

Callers 11

__init__Method · 0.80
run_trainingMethod · 0.80
_load_tf_modelMethod · 0.80
_load_model_classMethod · 0.80
_load_model_classMethod · 0.80

Calls 2

FeatureSignatureClass · 0.85
itemsMethod · 0.80