Error with Using ConveRT

First, I have installed Rasa from source with the following commands:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
git clone https://github.com/RasaHQ/rasa.git
cd rasa
poetry install
pyenv install 3.7.6
pyenv local 3.7.6
python -m venv .venv
source .venv/bin/activate
poetry env info  # check to see the poetry can run
make install
pip3 install setuptools==41.0.0
pip3 install rasa[convert]

and I am able to train a Rasa chatbot with SpaCy. However, when I change the configurations to use

  - name: ConveRTTokenizer
  - name: ConveRTFeaturizer

I am experiencing the following error:

(.venv) (base) Shawns-MacBook-Pro:test shawn$ rasa train
The configuration for policies was chosen automatically. It was written into the config file at 'config.yml'.
2020-07-16 16:48:32 INFO     rasa.model  - Data (nlu-config) for NLU model section changed.
Training NLU model...
2020-07-16 16:48:32 INFO     absl  - Using /var/folders/c6/xkk87q5j74949w_k9_5r81nc0000gn/T/tfhub_modules to cache modules.
2020-07-16 16:48:39 INFO     rasa.nlu.components  - Added 'ConveRTTokenizer' to component cache. Key 'ConveRTTokenizer-bc8399d1de3d3e86edb2d659f234828b'.
2020-07-16 16:48:39 INFO     rasa.nlu.training_data.training_data  - Training data stats:
2020-07-16 16:48:39 INFO     rasa.nlu.training_data.training_data  - Number of intent examples: 43 (7 distinct intents)
2020-07-16 16:48:39 INFO     rasa.nlu.training_data.training_data  -   Found intents: 'mood_unhappy', 'deny', 'mood_great', 'greet', 'bot_challenge', 'goodbye', 'affirm'
2020-07-16 16:48:39 INFO     rasa.nlu.training_data.training_data  - Number of response examples: 0 (0 distinct responses)
2020-07-16 16:48:39 INFO     rasa.nlu.training_data.training_data  - Number of entity examples: 0 (0 distinct entities)
2020-07-16 16:48:39 INFO     rasa.nlu.model  - Starting to train component ConveRTTokenizer
Traceback (most recent call last):
  File "/Users/shawn/Documents/rasa/.venv/bin/rasa", line 11, in <module>
    load_entry_point('rasa', 'console_scripts', 'rasa')()
  File "/Users/shawn/Documents/rasa/rasa/__main__.py", line 109, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/Users/shawn/Documents/rasa/rasa/cli/train.py", line 77, in train
    nlu_additional_arguments=extract_nlu_additional_arguments(args),
  File "/Users/shawn/Documents/rasa/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 "/Users/shawn/Documents/rasa/rasa/train.py", line 114, in train_async
    nlu_additional_arguments=nlu_additional_arguments,
  File "/Users/shawn/Documents/rasa/rasa/train.py", line 207, in _train_async_internal
    old_model_zip_path=old_model,
  File "/Users/shawn/Documents/rasa/rasa/train.py", line 246, in _do_training
    additional_arguments=nlu_additional_arguments,
  File "/Users/shawn/Documents/rasa/rasa/train.py", line 541, in _train_nlu_with_validated_data
    **additional_arguments,
  File "/Users/shawn/Documents/rasa/rasa/nlu/train.py", line 90, in train
    interpreter = trainer.train(training_data, **kwargs)
  File "/Users/shawn/Documents/rasa/rasa/nlu/model.py", line 191, in train
    updates = component.train(working_data, self.config, **context)
  File "/Users/shawn/Documents/rasa/rasa/nlu/tokenizers/tokenizer.py", line 94, in train
    tokens = self.tokenize(example, attribute)
  File "/Users/shawn/Documents/rasa/rasa/nlu/tokenizers/convert_tokenizer.py", line 74, in tokenize
    split_token_strings = self._tokenize(token.text)[0]
  File "/Users/shawn/Documents/rasa/rasa/nlu/tokenizers/convert_tokenizer.py", line 54, in _tokenize
    return self.tokenize_signature(tf.convert_to_tensor([sentence]))[
  File "/Users/shawn/Documents/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1605, in __call__
    return self._call_impl(args, kwargs)
  File "/Users/shawn/Documents/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1645, in _call_impl
    return self._call_flat(args, self.captured_inputs, cancellation_manager)
  File "/Users/shawn/Documents/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1746, in _call_flat
    ctx, args, cancellation_manager=cancellation_manager))
  File "/Users/shawn/Documents/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 598, in call
    ctx=ctx)
  File "/Users/shawn/Documents/rasa/.venv/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
    inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError:  Trying to access resource using the wrong type. Expected N10tensorflow6lookup15LookupInterfaceE got N10tensorflow6lookup15LookupInterfaceE
	 [[node SubwordTokenizer/tokenize_1/WordpieceTokenizeWithOffsets/WordpieceTokenizeWithOffsets/WordpieceTokenizeWithOffsets (defined at /.venv/lib/python3.7/site-packages/tensorflow_hub/module_v2.py:102) ]] [Op:__inference_pruned_17396]

Function call stack:
pruned

For information, I have tensorflow==2.2.0 and tensorflow-text==2.1.1 and python==3.7.6 on my Macbook.

The issue is related to mac os wheel broken for 2.2.0rc2 · Issue #272 · tensorflow/text · GitHub.

This should now be fixed with the release of 2.3.0-rc1 which uses TF 2.3.0-rc*.

I am using rasa==2.0.0a1. After running pip install rasa[convert], I get the following errors:

ERROR: tensorflow 2.2.0 has requirement scipy==1.4.1; python_version >= "3", but you'll have scipy 1.5.2 which is incompatible.
ERROR: tensorflow-text 2.1.0rc0 has requirement tensorflow<2.2,>=2.1.0-rc0, but you'll have tensorflow 2.2.0 which is incompatible.

As you can see there is a contradiction since my tensorflow is too recent. What should I do here?

Thanks for pointing that out. We will have a look into that and fix it with the next alpha release. I guess you could manually update scipy to version 1.4.1 and tensforflow-text to version 2.2.1.