Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rasa 2.8.2 cannot be initialized on Mac OS Monterey Public Beta 5 #9342

Closed
sxhysj opened this issue Aug 13, 2021 · 7 comments
Closed

Rasa 2.8.2 cannot be initialized on Mac OS Monterey Public Beta 5 #9342

sxhysj opened this issue Aug 13, 2021 · 7 comments
Labels

Comments

@sxhysj
Copy link

sxhysj commented Aug 13, 2021

Hi, does everyone meet the same problem?
I installed the RASA 2.8.2 successfully by using

pip install rasa==2.8.2

Afterwards, I tried to initialized the RASA project but failed, and it showed the following problem which may related to Tensorflow?

(rasa) abc@abc-macbook ~ % rasa init
Welcome to Rasa! 🤖

To get started quickly, an initial project will be created.
If you need some help, check out the documentation at https://rasa.com/docs/rasa.
Now let's start! 👇🏽

? Please enter a path where the project will be created [default: current directory] /Users/abc/gi
t/rasa_project8                                                                                        
? Directory '/Users/abc/git/rasa_project8' is not empty. Continue? Yes                            
Created project directory at '/Users/abc/git/rasa_project8'.
Finished creating project structure.
? Do you want to train an initial model? 💪🏽 Yes                                                      
Training an initial model...
The configuration for pipeline and policies was chosen automatically. It was written into the config file at '/Users/abc/git/rasa_project8/config.yml'.
Training NLU model...
2021-08-13 16:55:10 INFO     rasa.shared.nlu.training_data.training_data  - Training data stats:
2021-08-13 16:55:10 INFO     rasa.shared.nlu.training_data.training_data  - Number of intent examples: 69 (7 distinct intents)

2021-08-13 16:55:10 INFO     rasa.shared.nlu.training_data.training_data  -   Found intents: 'greet', 'mood_great', 'goodbye', 'deny', 'bot_challenge', 'mood_unhappy', 'affirm'
2021-08-13 16:55:10 INFO     rasa.shared.nlu.training_data.training_data  - Number of response examples: 0 (0 distinct responses)
2021-08-13 16:55:10 INFO     rasa.shared.nlu.training_data.training_data  - Number of entity examples: 0 (0 distinct entities)
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Starting to train component WhitespaceTokenizer
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Starting to train component RegexFeaturizer
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Starting to train component LexicalSyntacticFeaturizer
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Starting to train component CountVectorsFeaturizer
2021-08-13 16:55:10 INFO     rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer  - 80 vocabulary items were created for text attribute.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Starting to train component CountVectorsFeaturizer
2021-08-13 16:55:10 INFO     rasa.nlu.featurizers.sparse_featurizer.count_vectors_featurizer  - 697 vocabulary items were created for text attribute.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:10 INFO     rasa.nlu.model  - Starting to train component DIETClassifier
Epochs: 100%|██████████████████████████████| 100/100 [00:17<00:00,  5.79it/s, t_loss=1.24, i_acc=0.971]
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Starting to train component EntitySynonymMapper
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Starting to train component ResponseSelector
2021-08-13 16:55:27 INFO     rasa.nlu.selectors.response_selector  - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents.
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Starting to train component FallbackClassifier
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Finished training component.
2021-08-13 16:55:27 INFO     rasa.nlu.model  - Successfully saved model into '/var/folders/bq/yq_qpfq90pg0_n9ljlv5t1cm0000gn/T/tmp6co227xh/nlu'
NLU model training completed.
Training Core model...
2021-08-13 16:55:36 WARNING  rasa.shared.utils.common  - The UnexpecTED Intent Policy is currently experimental and might change or be removed in the future 🔬 Please share your feedback on it in the forum (https://forum.rasa.com) to help us make this feature ready for production.
Processed story blocks: 100%|████████████████████████████| 3/3 [00:00<00:00, 2094.71it/s, # trackers=1]
Processed story blocks: 100%|████████████████████████████| 3/3 [00:00<00:00, 1051.20it/s, # trackers=3]
Processed story blocks: 100%|████████████████████████████| 3/3 [00:00<00:00, 270.78it/s, # trackers=12]
Processed story blocks: 100%|█████████████████████████████| 3/3 [00:00<00:00, 66.82it/s, # trackers=39]
Processed rules: 100%|███████████████████████████████████| 2/2 [00:00<00:00, 3509.88it/s, # trackers=1]
Processed trackers: 100%|█████████████████████████████████| 3/3 [00:00<00:00, 1891.31it/s, # action=12]
Processed actions: 12it [00:00, 10773.04it/s, # examples=12]
Processed trackers: 100%|██████████████████████████████████| 2/2 [00:00<00:00, 3150.06it/s, # action=5]
Processed actions: 5it [00:00, 17787.55it/s, # examples=4]
Processed trackers: 100%|█████████████████████████████████| 3/3 [00:00<00:00, 1926.94it/s, # action=12]
Processed trackers: 100%|██████████████████████████████████████████████| 2/2 [00:00<00:00, 2154.79it/s]
Processed trackers: 100%|██████████████████████████████████████████████| 5/5 [00:00<00:00, 1387.65it/s]
Processed trackers: 100%|█████████████████████████████| 120/120 [00:00<00:00, 3925.17it/s, # intent=12]
Epochs:   0%|                                                                  | 0/100 [00:00<?, ?it/s]2021-08-13 16:55:41.663179: E tensorflow/core/framework/tensor.cc:555] Could not decode variant with type_name: "tensorflow::data::Optional".  Perhaps you forgot to register a decoder via REGISTER_UNARY_VARIANT_DECODE_FUNCTION?
2021-08-13 16:55:41.679172: E tensorflow/core/framework/tensor.cc:555] Could not decode variant with type_name: "tensorflow::data::Optional".  Perhaps you forgot to register a decoder via REGISTER_UNARY_VARIANT_DECODE_FUNCTION?
Traceback (most recent call last):
  File "/Users/abc/opt/anaconda3/envs/rasa/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/__main__.py", line 117, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/cli/scaffold.py", line 235, in run
    init_project(args, path)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/cli/scaffold.py", line 130, in init_project
    print_train_or_instructions(args, path)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/cli/scaffold.py", line 69, in print_train_or_instructions
    training_result = rasa.train(domain, config, training_files, output)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/api.py", line 109, in train
    return rasa.utils.common.run_in_loop(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/utils/common.py", line 296, in run_in_loop
    result = loop.run_until_complete(f)
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/model_training.py", line 108, in train_async
    return await _train_async_internal(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/model_training.py", line 288, in _train_async_internal
    await _do_training(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/model_training.py", line 352, in _do_training
    await _train_core_with_validated_data(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/model_training.py", line 549, in _train_core_with_validated_data
    await rasa.core.train.train(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/core/train.py", line 70, in train
    agent.train(training_data, **additional_arguments)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/core/agent.py", line 753, in train
    self.policy_ensemble.train(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/core/policies/ensemble.py", line 206, in train
    policy.train(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/core/policies/ted_policy.py", line 706, in train
    self.run_training(model_data, label_ids)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/core/policies/unexpected_intent_policy.py", line 451, in run_training
    super().run_training(model_data, label_ids)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/core/policies/ted_policy.py", line 656, in run_training
    self.model.fit(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/keras/engine/training.py", line 103, in _method_wrapper
    return method(self, *args, **kwargs)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/rasa/utils/tensorflow/temp_keras_modules.py", line 191, in fit
    tmp_logs = train_function(iterator)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 780, in __call__
    result = self._call(*args, **kwds)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 840, in _call
    return self._stateless_fn(*args, **kwds)
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 2829, in __call__
    return graph_function._filtered_call(args, kwargs)  # pylint: disable=protected-access
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1843, in _filtered_call
    return self._call_flat(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1923, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 545, in call
    outputs = execute.execute(
  File "/Users/abc/opt/anaconda3/envs/rasa/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError:  Cannot parse tensor from proto: dtype: DT_VARIANT
tensor_shape {
}
variant_val {
  type_name: "tensorflow::data::Optional"
  metadata: "\000"
}

	 [[{{node cond/else/_36/cond/OptionalNone_22/_0__cf__0}}]] [Op:__inference_train_function_30882]

Function call stack:
train_function%

Can anyone help with me? Thanks.

@sara-tagger
Copy link
Collaborator

Thanks for raising this issue, @akelad will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@akelad
Copy link
Contributor

akelad commented Aug 16, 2021

What version of tensorflow are you running? And is this on a mac with an M1 chip?

@sxhysj
Copy link
Author

sxhysj commented Aug 16, 2021

What version of tensorflow are you running? And is this on a mac with an M1 chip?

Python 3.8.11 (default, Aug 6 2021, 08:56:27)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow
print(tensorflow.version)
2.3.4

Not an M1 chip but a 2018 Macbook Pro 15'' with Intel Chip

@ErickGiffoni
Copy link
Contributor

Hello ! Have anyone found a possible workaround for this issue ?

Furthermore, I’d like to contribute, I’m with a group of 3 developers here.

@JEM-Mosig
Copy link
Contributor

We haven't been able to reproduce it yet. Might be interaction between Tensorflow and the OS somehow. You say this was no problem before you upgraded to the Mac OS Monterey Public Beta 5?

@sxhysj
Copy link
Author

sxhysj commented Aug 28, 2021

Sorry i did not try on the Mac OS Big Sur.

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
@sxhysj sxhysj closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants