Quickstart has an error: ImportError: cannot import name 'Activation'

I am following really basic starter bot. by using this link. Quickstart . Now I successfully trained the nlu model by using this command in Jupyter !python -m rasa_nlu.train -c config.yml --data nlu.md -o models --fixed_model_name nlu --project current --verbose but after this when I am executing this command !python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue I am getting error which says ImportError: cannot import name 'Activation'. Can some one help. I have following versions of the library

print(tf.__version__)
print(rasa_core.__version__)
print(rasa_nlu.__version__)

1.12.0

0.14.0

0.15.0

Thanks a lot

Hi there @nirajdevpandey, I don’t see anywhere in our code where we import anything named Activation, must be a dependency of something else. Can you post the full traceback please?

Hi there!

The error is from TensorFlow which is in requirements.txt file of latest rasa_core. The https://rasa.com/docs/core/quickstart/?_ga=2.66812840.727704253.1556882608-65340665.1556108319 doesn’t satisfies latest rasa requirements instead running on old dependencies. I downgraded tf to 1.10 and now everything is working as expected. Thanks for your quick response though :slight_smile:

Ah, I see. To be clear, did you get this error when running the quickstart in the docs page or following the quickstart by running everything locally on your machine?

locally on machine. On the official docs page. Everything runs perfect :slight_smile:

Hm that is strange though, you shouldn’t have had to have downgraded to 1.10.0 :thinking:

Yeah… It was an urgent need to make existing project working. Had to downgrade tf. Nevertheless, can you please tell me which classifier is being used to detect query intent in Quickstart setup. and other hidden configuration. Thanks in advance.

I’m not sure which pipeline the quickstart runs on – my guess would be the pretrained_embeddings_spacy pipeline, which uses the SklearnIntentClassifier for intent classification. The reason why I think it’s that one is because the pretrained embeddings is the recommended pipeline for small amounts of NLU training data. You can see the whole pipeline and read about the other pipelines here. You can read specifically about the components here.

Well… Thanks a lot for your quick response. As far as I can see in the nlu configuration file I have following components only. Obviously, this is borrowed as it was on the https://rasa.com/docs/core/quickstart/?_ga=2.191353514.1496044598.1557149140-65340665.1556108319 doc.

language: en
pipeline: tensorflow_embedding

I have got my answer partially in the first link you provided. Thanks again :slight_smile:

Hi, I have the same issue, can you please tell me what you did?

I downgraded tensorflow to 1.10 and its working!

1 Like