ERROR rasa.core.agent - Could not load model due to Error initializing graph component for node 'run_classifiers.[custom_commponent].[CustomClass]12

Not sure if this is a bug or something else is wrong, but when this worked in Rasa2 and has worked on and off in Rasa3.

It appears that modifying config.yml requires retraining, not just restarting. Each time there is a retrain, a custom component gets cached, and that cached version gets placed in run_classifiers module, and the name appended with an integer. However, the error occurred not only with custom component, but also with LanguageModelFeaturizer.

I’ve erased the whole cache at .rasa before retraining and the error still occurs. The config.yml looks like this, and all the other yml configs pass as valid yaml.

recipe: default.v1

# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
# https://rasa.com/docs/rasa/components#languagemodelfeaturizer
language: en

pipeline:
  - name: SpacyNLP
    model: "en_core_web_md"
    # model: "en_core_web_lg"
  - name: SpacyTokenizer
  - name: SpacyEntityExtractor
  - name: SpacyFeaturizer
    pooling: mean
  - name: CountVectorsFeaturizer
    analyzer: char_wb
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 100
    constrain_similarities: true
    # model_confidence: cosine
    model_confidence: softmax
    # model_confidence: linear_norm
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 64
    constrain_similarities: true
  - name: FallbackClassifier
    threshold: 0.3
    ambiguity_threshold: 0.1
  - name: LanguageModelFeaturizer
    # Name of the language model to use
    model_name: "bert"
    # Pre-Trained weights to be loaded
    model_weights: "rasa/LaBSE"
    # An optional path to a specific directory to download and cache the pre-trained model weights.
    # The `default` cache_dir is the same as https://huggingface.co/transformers/serialization.html#cache-directory .
    cache_dir: null
 - name: "classifiers.custom_commponent.CustomClass"

I’ve added --force to rasa train.

Any ideas why LanguageModelFeaturizer would also have some errors too?

python -m rasa train core --force

seems --force still loads from cache?

2021-12-31 17:32:44 INFO     rasa.engine.training.hooks  - Restored component 'MemoizationPolicy' from cache.
2021-12-31 17:32:44 INFO     rasa.engine.training.hooks  - Restored component 'RulePolicy' from cache.
2021-12-31 17:32:44 INFO     rasa.engine.training.hooks  - Restored component 'TEDPolicy' from cache.
2021-12-31 17:32:44 INFO     rasa.engine.training.hooks  - Restored component 'UnexpecTEDIntentPolicy' from cache.
Your Rasa model is trained and saved at 'models/core-20211231-173244-thin-fork.tar.gz'.

By modifying rasa graph.py. _load_component() I can see my component was raising an exception but it is intercepted by rasa and not displayed. Doesn’t explain LanguageModelFeaturizer issues though. I’ll try to understand this better and file a github issue.

Can you explain more about how you were able to see the underlying component error?