SklearnIntentClassifier rasa 3.0

Help me fix this error. Thanks

SklearnIntentClassifier rasa 3.0

raise GraphSchemaValidationException(rasa.engine.exceptions.GraphSchemaValidationException: 1 components are missing required components which have to run before themselves: The following components require a DenseFeaturizer: train_SklearnIntentClassifier5. Please add the required components to your model configuration.

file config language: vi pipeline:

  • name: WhitespaceTokenizer
  • name: RegexFeaturizer
  • name: LexicalSyntacticFeaturizer
  • name: CountVectorsFeaturizer
  • name: CountVectorsFeaturizer analyzer: char_wb min_ngram: 1 max_ngram: 4
  • name: SklearnIntentClassifier C: [1, 2, 5, 10, 20, 100] kernel: “linear” epochs: 100
  • name: EntitySynonymMapper
  • name: ResponseSelector epochs: 100

The error message states that you need to include a dense featurizer in your pipeline. It’s also documented here.

You can find a description of the featurizers here followed by a list of the available featurizers. The two featurizers in your pipeline are both sparse featurizers.

I would try adding the LanguageModelFeaturizer to your pipeline.

- name: LanguageModelFeaturizer
  model_name: "bert"
  model_weights: "sentence-transformers/all-MiniLM-L6-v2"
1 Like

Thanks.

pipeline:

  • name: “SpacyNLP”

    model: “vi_core_news_lg” case_sensitive: False

  • name: “SpacyTokenizer”

  • name: “SpacyFeaturizer” pooling: mean

  • name: RegexFeaturizer

  • name: LexicalSyntacticFeaturizer

  • name: CountVectorsFeaturizer

  • name: CountVectorsFeaturizer

    analyzer: “char_wb”

    min_ngram: 1

    max_ngram: 4

  • name: “CRFEntityExtractor”

  • name: “classifiers.sklearn_intent_classifier.SklearnIntentClassifier”

    C: [1, 2, 5, 10, 20, 100]

    kernel: “linear”

and it works.