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?