Upgrading to v1.8

I just found out v 1.8 is out with a new neat rasa data validate stories command

as part of the install I hit this error:

ERROR: tensorflow-cpu 1.15.0 has requirement tensorboard<1.16.0,>=1.15.0, but you'll have tensorboard 2.1.0 which is incompatible.

I’m wondering what that might affect? training still seems to function well. I’m just running on a laptop so no gpu.

rasa previously had a dependency on an older version of tensorflow that also only installed under python <= 3.7 maybe that’s fixed now…

diff of pip freeze

-rasa==1.7.4
-rasa-sdk==1.7.0
-redis==3.3.11
+rasa==1.8.0
+rasa-sdk==1.8.0
+redis==3.4.1

-tensorboard==1.15.0
+tensorboard==2.1.0
+tensorflow==2.1.0
+tensorflow-addons==0.8.2
 tensorflow-cpu==1.15.0
 tensorflow-cpu-estimator==1.15.1
 tensorflow-datasets==2.0.0
+tensorflow-estimator==2.1.0

can someone share a working config for v1.8? Following the migration guide,
it seems I’m messing up the yaml config format.

with previous config

rasa/nlu/components.py:394:
FutureWarning: ‘EmbeddingIntentClassifier’ is deprecated and will be removed in version 2.0.
Use ‘DIETClassifier’ instead.

but edited and added as below, now I get this on training

AttributeError: module ‘rasa.core.policies.registry’ has no attribute ‘DIETClassifier’

I’m using this pretty basic config.yml

language: en
pipeline: supervised_embeddings

policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
  - name: MappingPolicy

  - name: DIETClassifier
    intent_classification: True
    entity_recognition: False
    use_masked_language_model: False
    BILOU_flag: False
    number_of_transformer_layers: 0

additionally using a few extra featurizers as per the recommendation here

(short answer)

this config.yml seems to work. I also had to pip install tensorflow-text

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

pipeline:
  - name: ConveRTTokenizer
  - name: ConveRTFeaturizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 1
    intent_classification: True
    entity_recognition: False
    use_masked_language_model: False
    BILOU_flag: False
    number_of_transformer_layers: 0
  - name: EntitySynonymMapper
  - name: ResponseSelector


# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
  - name: MappingPolicy

I’m not sure why

  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer

is there twice, once without any params. Is that a typo in the docs?

1 Like

I went through messing with 1.8 yesterday as well. Not sure why the CountVectorsFeaturizer is there twice either.

I can separate out this question, but thought it was related. I found that the DIETClassifier is much slower than EmbeddingIntentClassifier and CRFEntityExtractor. As a rough measurement on a small training set that took about 5 minutes to train on a similar pipeline with EmbeddingIntentClassifier and CRFEntityExtractor (300 epochs), the DIETClassifier took about 20 minutes with 50 epochs. Will there be an alternative to DIETClassifier after EmbeddingIntentClassifier and CRFEntityExtractor are deprecated?

I’ve noticed it’s slower too. I don’t quite follow about epochs and there are a number of warnings on that too. Can you config a lower number yourself to speed up training, at least while in development? I had put in epochs: 1 myself to try to shut up some of the warnings (but I still get them)

I was talking to someone at rasa using github actions to tune and test the model with lots of different hyperparameters on a push commit. depending on how much CPU time actions give you that would be a nice way to offload some of those tasks.

It should be

 - name: CountVectorsFeaturizer
 - name: CountVectorsFeaturizer
   analyzer: "char_wb"
   min_ngram: 1
   max_ngram: 4

where word level and n-gram level features are both added.

But I do have trouble with making the new DIETClassifier work exactly the same as before.

I guess RASA wants us to use DIETClassifier as the default ? I would love to see some parameter tuning guide to DIETClassifier, either community sourced or by the Rasa devs. I did create a separate thread here to see if someone can give some more details about parameter tuning. I hope, there is a configuration that would work the same as before (same accuracy, same time complexity). I tried the settings provided in the migration guide, but some of my integration tests fail, meaning that the training results is not the same as before.

Thusitha

1 Like

@ttlekich, CountVectorsFeaturizer is there twice because the default analyzer is “word”, so it runs once for “word” and once for “char wb”.

so maybe this would be less ambiguous:

 - name: CountVectorsFeaturizer
   analyzer: "word"
 - name: CountVectorsFeaturizer
   analyzer: "char_wb"
   min_ngram: 1
   max_ngram: 4

Hey,

I have the same error after updating Rasa to 1.10.0.

I updated my config.yml file :

language: "fr"  # your two-letter language code

pipeline:
  - name: WhitespaceTokenizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "word"
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100
  - name: WhitespaceTokenizer
    case_sensitive: false
  - name: CRFEntityExtractor
    BILOU_flag: true
  - name: "DucklingHTTPExtractor"
    url: "http://localhost:8000"
    dimensions: ["time", "number", "amount-of-money", "distance"]
    locale: "fr_FR"
    timezone: "Europe/Paris"
    timeout : 3
    
policies:
- name: DIETClassifier
  epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
  epochs: 100
featurizer:
- name: MaxHistoryTrackerFeaturizer
  max_history: 5
  state_featurizer:
  - name: BinarySingleStateFeaturizer
- name: FallbackPolicy
  nlu_threshold: 0.7
  core_threshold: 0.4
  fallback_action_name: utter_oupsomethingfailed
- name: FormPolicy

Did you find a solution to your problem?

Thanks, Valentin