# Cannot train NLU model after changing pipeline

**URL:** <https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286>\
**Category:** Rasa Open Source\
**Created:** [December 10, 2019, 9:24am UTC](https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286 "2019-12-10T09:24:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krogsager](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/krogsager/32/95_2.png) [@Krogsager](https://forum.rasa.com/u/Krogsager)\
**Post date:** [December 10, 2019, 9:24am UTC](https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286/1 "2019-12-10T09:24:20Z")

</div>

I don’t understand why training fails after I’ve added Duckling to my pipeline. Training fra Rasa X, traceback from docker console.

**config.yml**

```auto
language: dk
pipeline:
  - name: supervised_embeddings
  - name: DucklingHTTPExtractor
    url: 'http://localhost:8000'
    dimensions:
      - time
    locale: da_DK
    timezone: Europe/Berlin
    timeout: 3
policies:
  - name: MemoizationPolicy
  - name: KerasPolicy
  - name: MappingPolicy
  - name: FallbackPolicy
    nlu_threshold: 0.3
    core_threshold: 0.3

```

**Traceback**

```auto
Training NLU model... 2019-12-10 09:10:43 ERROR    
rasax.community.api.blueprints.models
  - 500, Internal Server Error, 
body='b'{
	"version":"1.5.1",
	"status":"failure",
	"message":"An unexpected error occurred during training. Error: Cannot find class \'supervised_embeddings\' from global namespace. Please check that there is no typo in the class name and that you have imported the class into the global namespace.",
	"reason":"TrainingError",
	"details":{},
	"help":null,
	"code":500
}

```

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [December 12, 2019, 2:28pm UTC](https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286/2 "2019-12-12T14:28:25Z")

</div>

Hi @Krogsager,

you are combining a preconfigured NLU pipeline ([preconfigured pipelines](https://rasa.com/docs/rasa/nlu/choosing-a-pipeline/#section-supervised-embeddings-pipeline)) with an actual component.

You should have this instead:

```auto
language: "en"

pipeline:
- name: "WhitespaceTokenizer"
- name: "RegexFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "CountVectorsFeaturizer"
- name: "CountVectorsFeaturizer"
  analyzer: "char_wb"
  min_ngram: 1
  max_ngram: 4
- name: "EmbeddingIntentClassifier"
  - name: DucklingHTTPExtractor
    url: 'http://localhost:8000'
    dimensions:
      - time
    locale: da_DK
    timezone: Europe/Berlin
    timeout: 3

```

---

<div class="post-metadata">

**Author:** ![Krogsager](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/krogsager/32/95_2.png) [@Krogsager](https://forum.rasa.com/u/Krogsager)\
**Post date:** [December 12, 2019, 2:46pm UTC](https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286/3 "2019-12-12T14:46:50Z")

</div>

I see. Do I have to monitor [this page](https://rasa.com/docs/rasa/nlu/choosing-a-pipeline/#section-supervised-embeddings-pipeline) to keep the configuration up to date?

> Here are the default components that make up the `supervised_embeddings` pipeline

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [December 12, 2019, 5:31pm UTC](https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286/4 "2019-12-12T17:31:45Z")

</div>

Fortunately, the changes to the default pipeline configuration are very rare. What behavior would you expect / prefer? Mixing pipeline templates and individual components is a bit tricky, cause there can be multiple instances of some components, but for some components multiple components don’t make sense.

---

<div class="post-metadata">

**Author:** ![Krogsager](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/krogsager/32/95_2.png) [@Krogsager](https://forum.rasa.com/u/Krogsager)\
**Post date:** [December 13, 2019, 7:25am UTC](https://forum.rasa.com/t/cannot-train-nlu-model-after-changing-pipeline/22286/5 "2019-12-13T07:25:12Z")

</div>

The config is rather opaque and complicated. It is something I set up and forget about. I doubt that I will ever want/dare to change the setup from the default components of supervised\_embeddings. I just think “how do I add x feature?”, in this case Duckling, so for me the _ideal behavior_ would be so the config file was more forgiving to use.
