Is anyone else having problems trying to download the poly-ai model?

Hello all, I’m having a lot of difficulties trying to start rasa and each time it fails at the same step -

2020-09-22 15:29:44 INFO     absl  - Downloading TF-Hub Module 'http://models.poly-ai.com/convert/v1/model.tar.gz'.

Once it attempts this, I get a list of 404s. First of which is below -

rasa_1                | 2020-09-22 15:29:45 ERROR    rasa.core.agent  - Could not load model due to HTTP Error 404: Not Found.
rasa_1                | [2020-09-22 15:29:45 +0000] [1] [ERROR] Experienced exception while trying to serve
rasa_1                | Traceback (most recent call last):
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/utils/train_utils.py", line 169, in load_tf_hub_model
rasa_1                |     return tfhub.load(model_url)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py", line 97, in load
rasa_1                |     module_path = resolve(handle)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py", line 53, in resolve
rasa_1                |     return registry.resolver(handle)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/registry.py", line 42, in __call__
rasa_1                |     return impl(*args, **kwargs)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py", line 88, in __call__
rasa_1                |     self._lock_file_timeout_sec())
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/resolver.py", line 415, in atomic_download
rasa_1                |     download_fn(handle, tmp_dir)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py", line 83, in download
rasa_1                |     response = self._call_urlopen(request)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py", line 96, in _call_urlopen
rasa_1                |     return url.urlopen(request)
rasa_1                |   File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
rasa_1                |     return opener.open(url, data, timeout)
rasa_1                |   File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open
rasa_1                |     response = meth(req, response)
rasa_1                |   File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response
rasa_1                |     'http', request, response, code, msg, hdrs)
rasa_1                |   File "/usr/local/lib/python3.7/urllib/request.py", line 569, in error
rasa_1                |     return self._call_chain(*args)
rasa_1                |   File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
rasa_1                |     result = func(*args)
rasa_1                |   File "/usr/local/lib/python3.7/urllib/request.py", line 649, in http_error_default
rasa_1                |     raise HTTPError(req.full_url, code, msg, hdrs, fp)
rasa_1                | urllib.error.HTTPError: HTTP Error 404: Not Found

I tried this with rasa and rasa-sdk version 2.0.0a1 and with rasa version 1.10.13-full and rasa-sdk version 1.10.1-full. I even tried switching the config.yml to use the spacy pipeline, but it’s still failing. Here’s my config.yml -

language: "en"

pipeline:
  - name: ConveRTTokenizer
    intent_tokenization_flag: True
    # Set to true to spot multiple intents
    case_sensitive: False
    intent_split_symbol: "+"
  - name: ConveRTFeaturizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 100
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
  - name: MappingPolicy
  - name: FormPolicy
  - name: FallbackPolicy
    nlu_threshold: 0.6
    core_threshold: 0.3
    fallback_action_name: "fallback_action"

I had tried this through Docker using the base setup as specified in the docs. But when I tried doing this through virtualenv, I keep getting blocked at the tensorflow<2.2,>=2.1 requirement. See error below -

ERROR: Could not find a version that satisfies the requirement tensorflow==2.1 (from versions: 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0)

I’m quite blocked by this :frowning: . Can someone help?

yep the file is not on that URL anymore. You can follow this ticket:

1 Like

@elyase Thank you so much! I’ll keep an eye on the bug and await the fix.

@elyase @dakshvar22 - Looks like the fix was merged into master, but I’m still getting the same error when using the 2.0.0a1 image. Should I be using another version?

I am also facing this issue.

Any resolution for this?

@ganeshv As the fix was merged into master yesterday and 2.0.0a1 was cut from master before that, you wouldn’t be able to use the fix in 2.0.0a1. I am currently porting the fix for 1.10 version and will release that as a patch today. We are discussing internally about what can we do for the fix to appear in Rasa Open Source 2.0 release asap.

1 Like

@dakshvar22 Do we need to update RASA from 1.10 version to 2.0. Or we can use RASA 1.10 itself as currently, I am using 1.10

@ridhimagarg A new patch version for 1.10 will be released today with the fix.

2 Likes

Thanks for the quick reaction!

It seems to me that this dependency on an external url at runtime is really fragile, especially in combination with Docker. If the container is for any reason rebuilt before the patch is released, we are completely toast.

Are you guys planning to work on a “root cause” solution once the fire is out? Not sure if the dependencies could be included in the image. If not, maybe saving them to a directory that one could easily persist outside the container might be an idea (under /app or something).

1 Like

hey, @dakshvar22 facing same issue with the Rasa 1.9.7 version.

Any further updates on this? We’d prefer to stay with 2.0 since we are using some of the newer capabilities, but need to make a decision in the next 24 hours or so.

Appreciate the work you all are doing!

The issue is been fixed in Rasa 1.10.14 .

You can update rasa from 1.10.2 to 1.10.14 using

pip install rasa==1.10.14

Thanks to @RASA Team, for such a quick fix.

2 Likes

@rishivaca We’ll be tagging another release candidate for 2.0 which should have the fix for this. Thanks for being patient. :slight_smile:

Hi @dakshvar22. Is Rasa X 0.32.2 is also updated to pull the rasa image of version 1.10.14?

After updating to RASA 1.10.14 entity extraction is not performed well as before in 1.10.2 Do I need to change something?

pls help

@dakshvar22 - thanks for your help! I did find another problem, but considering that others haven’t reported it, I suspect it may be local to me.

Is anyone else having a key error come up? I’m now using 1.10.14 and this error comes up -

rasa_1                | 2020-09-24 11:53:20 INFO     absl  - Downloaded TF-Hub Module 'https://github.com/PolyAI-LDN/polyai-models/releases/download/v1.0/model.tar.gz'.
rasa_1                | 2020-09-24 11:53:21.214864: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
rasa_1                | 2020-09-24 11:53:39 DEBUG    root  - Could not load interpreter from 'models'.
rasa_1                | 2020-09-24 11:53:39 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
rasa_1                | 2020-09-24 11:53:39 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
rasa_1                | 2020-09-24 11:53:41 DEBUG    rasa.model  - Extracted model to '/tmp/tmp74wzxiz9'.
rasa_1                | 2020-09-24 11:54:00 ERROR    rasa.core.agent  - Could not load model due to 'token_pattern'.

The key error is as shown below -

rasa_1                | Traceback (most recent call last):
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/sanic/app.py", line 1167, in run
rasa_1                |     serve(**server_settings)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/sanic/server.py", line 892, in serve
rasa_1                |     trigger_events(before_start, loop)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/sanic/server.py", line 668, in trigger_events
rasa_1                |     loop.run_until_complete(result)
rasa_1                |   File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/run.py", line 257, in load_agent_on_start
rasa_1                |     action_endpoint=endpoints.action,
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 306, in load_agent
rasa_1                |     remote_storage=remote_storage,
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 973, in load_local_model
rasa_1                |     path_to_model_archive=model_archive,
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/agent.py", line 422, in load
rasa_1                |     interpreter = NaturalLanguageInterpreter.create(nlu_model)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/interpreter.py", line 54, in create
rasa_1                |     return RasaNLUInterpreter(model_directory=obj)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/interpreter.py", line 274, in __init__
rasa_1                |     self._load_interpreter()
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/core/interpreter.py", line 297, in _load_interpreter
rasa_1                |     self.interpreter = Interpreter.load(self.model_directory)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/nlu/model.py", line 301, in load
rasa_1                |     return Interpreter.create(model_metadata, component_builder, skip_validation)
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/nlu/model.py", line 328, in create
rasa_1                |     component_meta, model_metadata.model_dir, model_metadata, **context
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/nlu/components.py", line 744, in load_component
rasa_1                |     component_meta, model_dir, model_metadata, cached_component, **context
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/nlu/registry.py", line 231, in load_component_by_meta
rasa_1                |     component_meta, model_dir, metadata, cached_component, **kwargs
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py", line 662, in load
rasa_1                |     meta, vocabulary=vocabulary
rasa_1                |   File "/opt/venv/lib/python3.7/site-packages/rasa/nlu/featurizers/sparse_featurizer/count_vectors_featurizer.py", line 621, in _create_independent_vocab_vectorizers
rasa_1                |     token_pattern=parameters["token_pattern"],
rasa_1                | KeyError: 'token_pattern'

Nothing else has changed from my initial report (other than the fact that I’m now pulling the 1.10.14-full image for rasa and 1.10.1-full for rasa-sdk).

@dakshvar22 I am also facing similar issue with rasa/rasa:2.0.0a3-full Image, when I am trying to train my project. Can anyone let me know in which version or docker image it will be fixed. Thank you in advance for your help

docker run -v ${pwd}:/app rasa/rasa:2.0.0a3-full train

/opt/venv/lib/python3.7/site-packages/tensorflow_addons/utils/ensure_tf_install.py:68: UserWarning: Tensorflow Addons supports using Python ops for all Tensorflow versions above or equal to 2.2.0 and strictly below 2.3.0 (nightly versions are not supported). The versions of TensorFlow you are currently using is 2.3.0 and is not supported. Some things might work, some things might not. If you were to encounter a bug, do not file an issue. If you want to make sure you’re using a tested and supported configuration, either change the TensorFlow version or the TensorFlow Addons’s version. You can find the compatibility matrix in TensorFlow Addon’s readme:

UserWarning, 2020-09-24 17:59:21 INFO absl - Using /tmp/tfhub_modules to cache modules. 2020-09-24 17:59:21 INFO absl - Downloading TF-Hub Module ‘http://models.poly-ai.com/convert/v1/model.tar.gz’. The configuration for pipeline and policies was chosen automatically. It was written into the config file at ‘config.yml’. Training NLU model… Traceback (most recent call last): File “/opt/venv/lib/python3.7/site-packages/rasa/utils/train_utils.py”, line 140, in load_tf_hub_model return tfhub.load(model_url) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py”, line 97, in load module_path = resolve(handle) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py”, line 53, in resolve return registry.resolver(handle) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/registry.py”, line 42, in call return impl(*args, **kwargs) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 88, in call self._lock_file_timeout_sec()) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/resolver.py”, line 415, in atomic_download download_fn(handle, tmp_dir) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 83, in download response = self._call_urlopen(request) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 96, in _call_urlopen return url.urlopen(request) File “/usr/local/lib/python3.7/urllib/request.py”, line 222, in urlopen return opener.open(url, data, timeout) File “/usr/local/lib/python3.7/urllib/request.py”, line 531, in open response = meth(req, response) File “/usr/local/lib/python3.7/urllib/request.py”, line 641, in http_response ‘http’, request, response, code, msg, hdrs) File “/usr/local/lib/python3.7/urllib/request.py”, line 569, in error return self._call_chain(*args) File “/usr/local/lib/python3.7/urllib/request.py”, line 503, in _call_chain result = func(*args) File “/usr/local/lib/python3.7/urllib/request.py”, line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/opt/venv/bin/rasa”, line 8, in sys.exit(main()) File “/opt/venv/lib/python3.7/site-packages/rasa/main.py”, line 109, in main cmdline_arguments.func(cmdline_arguments) File “/opt/venv/lib/python3.7/site-packages/rasa/cli/train.py”, line 77, in train nlu_additional_arguments=extract_nlu_additional_arguments(args), File “/opt/venv/lib/python3.7/site-packages/rasa/train.py”, line 58, in train nlu_additional_arguments=nlu_additional_arguments, File “uvloop/loop.pyx”, line 1456, in uvloop.loop.Loop.run_until_complete File “/opt/venv/lib/python3.7/site-packages/rasa/train.py”, line 114, in train_async nlu_additional_arguments=nlu_additional_arguments, File “/opt/venv/lib/python3.7/site-packages/rasa/train.py”, line 207, in _train_async_internal old_model_zip_path=old_model, File “/opt/venv/lib/python3.7/site-packages/rasa/train.py”, line 246, in _do_training additional_arguments=nlu_additional_arguments, File “/opt/venv/lib/python3.7/site-packages/rasa/train.py”, line 541, in _train_nlu_with_validated_data **additional_arguments, File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/train.py”, line 75, in train trainer = Trainer(nlu_config, component_builder) File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/model.py”, line 146, in init self.pipeline = self._build_pipeline(cfg, component_builder) File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/model.py”, line 158, in _build_pipeline component = component_builder.create_component(component_cfg, cfg) File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/components.py”, line 758, in create_component component = registry.create_component_by_config(component_config, cfg) File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/registry.py”, line 163, in create_component_by_config return component_class.create(component_config, config) File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/components.py”, line 463, in create return cls(component_config) File “/opt/venv/lib/python3.7/site-packages/rasa/nlu/tokenizers/convert_tokenizer.py”, line 38, in init self.module = train_utils.load_tf_hub_model(TF_HUB_MODULE_URL) File “/opt/venv/lib/python3.7/site-packages/rasa/utils/train_utils.py”, line 144, in load_tf_hub_model return tfhub.load(model_url) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py”, line 97, in load module_path = resolve(handle) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py”, line 53, in resolve return registry.resolver(handle) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/registry.py”, line 42, in call return impl(*args, **kwargs) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 88, in call self._lock_file_timeout_sec()) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/resolver.py”, line 415, in atomic_download download_fn(handle, tmp_dir) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 83, in download response = self._call_urlopen(request) File “/opt/venv/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 96, in _call_urlopen return url.urlopen(request) File “/usr/local/lib/python3.7/urllib/request.py”, line 222, in urlopen return opener.open(url, data, timeout) File “/usr/local/lib/python3.7/urllib/request.py”, line 531, in open response = meth(req, response) File “/usr/local/lib/python3.7/urllib/request.py”, line 641, in http_response ‘http’, request, response, code, msg, hdrs) File “/usr/local/lib/python3.7/urllib/request.py”, line 569, in error return self._call_chain(*args) File “/usr/local/lib/python3.7/urllib/request.py”, line 503, in _call_chain result = func(*args) File “/usr/local/lib/python3.7/urllib/request.py”, line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

Hi @ganeshv. How to get these logs in Rasa-X?

Use the --debug flag when starting the rasa and the rasa action server through Docker.

I followed the docker-compose deployment method. I use the following commands

docker-compose up -d

docker-compose down

Could you help in more detail?